I have a directory and I want to allow users which are only logged into. Also there is a web page in root directory which has several data and all visitors can see them. Web.config file:
<system.web>
<compilation debug="true"/>
<customErrors mode="Off"/>
<authentication mode="Forms">
<forms name=".Artucltd" loginUrl="loginpage.aspx"
protection="All" path="the_path" timeout="30"
cookieless="UseDeviceProfile" />
</authentication>
<authorization>
<deny users ="?" />
<allow users="*"/>
</authorization>
</system.web>
This is custom login which controls username and password from MSSQL 2008 database. Everything works fine but I have a problem which is:
When I want to open default web page (http://localhost/test), system is automatically redirect to开发者_运维知识库 loginpage.aspx (not to Default.aspx). But I want to see Default.aspx and navigate to other pages. Loginpage.aspx is in root folder which is not protected and I want to do it same. In protected folder, there is another Default.aspx page and other protected pages. How can I get rid of this redirection? Should I specify this protected folder as application and put another Web.config file?
Processes that I tried up-to-now:
Changed name of Default.aspx page in protected folder
in IIS, default page is Default.aspx
in Visual Studio 2010, I set default page as Default.aspx in root folder.
But no luck!
Well, I found solution: http://support.microsoft.com/kb/316871
精彩评论