MasterGinyu Posted March 19, 2004 Posted March 19, 2004 Hey I am getting an error while trying to use Form authentication. It is it erroring out in the web.conf file giving this Parser Error Msg "It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level." <?xml version="1.0" encoding="utf-8" ?> <!-- Web.Config Configuration File --> <configuration> <location path="clientAdmin"> <system.web> <authorization> <deny users="?"/> </authorization> </system.web> </location> <system.web> <customErrors mode="Off"/> <authentication mode="Forms"> <forms name=".ASPXCLIENT" loginUrl="clientAdmin/login.aspx" protection="all" timeout="20" /> </authentication> </system.web> </configuration> It has the error at the <authentication mode="Forms"> line. Let me know if you can help. Thanks Quote
Administrators PlausiblyDamp Posted March 19, 2004 Administrators Posted March 19, 2004 Is the folder containing the web.config configuered as a virtual director in IIS? If not it needs to be. Also IIRC you can only set the authentication mode in the applications root directory - if you are trying to do this in a sub-dir then that will also cause this error. Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
MasterGinyu Posted March 19, 2004 Author Posted March 19, 2004 Is there anyway i can do it without configuring IIS. I think i understand what you are trying to say but not quite. Right now the files files that are trying to run are located in wwwroot/demo/clientAdmin/........what can i do to properly setup this. Quote
Administrators PlausiblyDamp Posted March 19, 2004 Administrators Posted March 19, 2004 As far as I'm aware the only thing you can do is make the clientAdmin folder a virtual directory under IIS or move the config to the demo folder. Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
MasterGinyu Posted March 19, 2004 Author Posted March 19, 2004 Yeah I tried to move the config into the demo folder and same error occured. I will do my best to figure this out. Thanks for your help Quote
MasterGinyu Posted March 19, 2004 Author Posted March 19, 2004 Is it possible to have a web.conf in each subdir...or will this cause a problem? Quote
Administrators PlausiblyDamp Posted March 19, 2004 Administrators Posted March 19, 2004 It is possible to have a web.config in each sub dir, but certain tags can only appear in the application's root though. What are you trying to do - there may be an alternate way of acheiving this. Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
MasterGinyu Posted March 19, 2004 Author Posted March 19, 2004 I am simply trying to keep my website organized. I want to keep all pages having to deal with client administration in a folder and so on with other items. The client administration folder needs to be authenicated to access any documents in that folder. This is the object I am trying to achieve. I have setup a simple test to try to simulate this action. I have a file outside the clientAdmin folder that has a link to a file inside the clientAdmin folder. According to what i have read on forms authentication, it should require the login page to be displayed and thus authenticate the user before displaying any page within the folder. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.