adiraharjo
New Member
I can not get Forms-Based Authentication to work.<BR>I am not sure if I am doing something wrong or if is the my "host". <BR>Here is my web.config file.<BR><BR><configuration><BR> <system.web><BR> <BR> <customErrors mode="Off" /> <BR><BR> <authorization><BR> <deny users="?" /><BR> </authorization><BR> <authentication mode= "Forms"><BR> <forms name=".ASPXAUTH" loginUrl="login.aspx" /><BR> </authentication> <BR><BR> </system.web><BR></configuration><BR><BR>Then on my page:<BR>http://aaront.com/Secure/login.aspx<BR>I get the following error.<BR><BR>System.Configuration.ConfigurationException: It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS. (\premfs2sitespremium7aarontrawebrootSecureweb.con fig line 9) at System.Web.Configuration.HttpConfigurationSystem.C acheLookup(String vpath) at System.Web.Configuration.HttpConfigurationSystem.C omposeConfig(String reqPath, IHttpMapPath configmap) at System.Web.HttpContext.GetCompleteConfigRecord(Str ing reqpath, IHttpMapPath configmap) at System.Web.HttpContext.GetCompleteConfig() at System.Web.Configuration.HttpCapabilitiesBase.GetC onfigCapabilities(String configKey, HttpRequest request) at System.Web.HttpRequest.get_Browser() at <BR>.<BR>.<BR>.<BR><BR>Thank you<BR>AaronYou can only create settings for the <authentication> section in the Web.config located in the *root* of your application. So it may be that you are trying to create the setting lower down than the root, or that you do not have access granted to change the Web.config at that level. I know that's the case when you get the free .NET hosting provided by Brinkster.