Click here to Skip to main content
15,895,799 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi,
i have a problem about athentication and authorization . this is my web.config :

XML
<?xml version="1.0" encoding="UTF-8"?>
<configuration>

  <location path="Contactus.aspx">
    <system.web>
      <authorization>
        <allow users="*" />
      </authorization>
    </system.web>
  </location>
  <location path="About.aspx">
    <system.web>
      <authorization>
        <allow users="*" />
      </authorization>
    </system.web>
  </location>
  <location path="Register.aspx">
    <system.web>
      <authorization>
        <allow users="*" />
      </authorization>
    </system.web>
  </location>
  <location path="Default.aspx">
    <system.web>
      <authorization>
        <allow users="*" />
      </authorization>
    </system.web>
  </location>


    <system.web>
    <customErrors mode="Off" defaultRedirect="ErrorPage.aspx">
    </customErrors>
    <globalization enableClientBasedCulture="true" culture="auto" uiCulture="auto" />

    <authentication mode="Forms">
      <forms loginUrl="~/Login.aspx" timeout="120" defaultUrl="~/Default.aspx" path="/" slidingExpiration="false" name="IVClientInformation" enableCrossAppRedirects="false" requireSSL="false" protection="All" cookieless="AutoDetect" />
    </authentication>
    <authorization>
      <deny users="?" />
    </authorization>
</configuration>


I can view my pages according the security model and authentication works fine, but problem is that when I use my url to view website Login.aspx loads instead of Default.aspx . I add a question about this problem few days ago and no acceptable answer found, some people asked about anonymous right on IIS , but host helpdesk told me that my app has the anonymous right. Please help , sorry 4 bad English.
Posted
Updated 30-Oct-10 7:02am
v2
Comments
Keith Barrow 31-Oct-10 10:43am    
Please can you clarify what you mean by "I can view my pages according the security model and authentication works fine, but problem is that when I use my url to view website Login.aspx loads instead of Default.aspx". The login page *should* be displayed instead of any page in the secured area until you are authenticated.
Areff 1-Nov-10 3:58am    
i mean it, that app's authentication works fine and when some user logs in , he/she can view the authenticated pages .

i solved my problem by removing membership & profile tags from web.config.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900