Trouble with Forms Authentication with IIS7

Discussion in 'Site Programming, Development and Design' started by yihsheng, Mar 2, 2012.

  1. 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>
     
  2. Elshadriel

    Elshadriel Winhost Staff

    What's the error message you're getting?
     
  3. 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.
     
  4. Resolution

    I am having a similar issue, did you find the problem?
     
  5. Elshadriel

    Elshadriel Winhost Staff

Share This Page