locked
default document doesn't work in web.config but defaultURL does. What is going on? RRS feed

  • Question

  • User-858993849 posted

    default document doesn't work in web.config but defaultURL does.  What is going on?

    Thursday, February 7, 2013 8:51 AM

Answers

  • User71929859 posted

    Hello,

    Default Document and DefaultUrl in forms authentication are completely two different things. When you set the default document in either IIS or in web.config file, it will get load when the user request the website by domain name or IP address without specifically mentioning a page. The defaultUrl of forms authentication is where it will redirect once the user logs in. There is no relationship between those two.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, February 12, 2013 11:46 AM

All replies

  • User-1315512054 posted

    Hello,

    What is your IIS version? You could also check at how to set default page in IIS 7.

    Regards

    Thursday, February 7, 2013 10:46 AM
  • User-858993849 posted

    I am doing exactly what it recommends, but it doesn't pay any attention to it.

    The only way i can get a default document to work is if I do this. 

    <authentication mode="Forms">
    			<forms loginUrl="Login.aspx" timeout="3600" defaultUrl="/App_Pages/Main.aspx" slidingExpiration="false" enableCrossAppRedirects="true"/>
    		</authentication>

    Thursday, February 7, 2013 10:57 AM
  • User71929859 posted

    Hello,

    Default Document and DefaultUrl in forms authentication are completely two different things. When you set the default document in either IIS or in web.config file, it will get load when the user request the website by domain name or IP address without specifically mentioning a page. The defaultUrl of forms authentication is where it will redirect once the user logs in. There is no relationship between those two.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, February 12, 2013 11:46 AM