I want to apply Forms Authentication to my website, it is working with my VS2010 or VS2005 (I used both). When I upload to shared hosting server which is IIS7, it does not work. I suspect is web config problem. Can anyone help? Here is the portion of the setting: <system.web> <authentication mode="Forms"> <forms loginUrl="/Default.aspx" defaultUrl="main.aspx" name=".ASPXFORMSAUTH" protection="All" /> </authentication> <authorization> <deny users="?" /> </authorization> ... ... ... </system.web> <location path="Admin"> <system.webServer> <security> <authorization> <remove users="*" roles="" verbs="" /> <add accessType="Deny" users="?" /> <add accessType="Allow" roles="admin" /> </authorization> </security> </system.webServer> </location>
there is no error message. It should allow me to access page under "Admin" folder but it redirects me to the default page as I do not have the permission.
http://weblogs.asp.net/gurusarkar/a...-particular-page-or-folder-in-web-config.aspx I think you're supposed to use system.web, not system.webServer.