Web.config changing file default location
I've have a tricky question for you:
In Visual C# IDE, how do you change the location of a file within a seperate folder?
So for example
The inital path of this folder was Webproject/folder1/Default.aspx in VS 2008, I converted this to 2010 and needed to rename the Default.aspx to folder1Default.aspx to make it work in 2010, because I couldnt have more than one Default.aspx. Now when I attempt to navigate to this folder, it can't open this as the default page. How can I set this page to be the default location for this specific folder? If the path were Webproject/folder1/folder1Default.aspx, how could I change this location using the web.config file?
You did this, but there should be only 1 default or index file which are defined in IIS or config file.
<location path="folder1"> <system.webServer> <defaultDocument enabled="true"> <files> <add value="folder1Default.aspx"/> </files> </defaultDocument> </system.webServer> </location>
I have done it like this in config file
<system.webServer> <defaultDocument> <files> <remove value="default.aspx" /> <remove value="iisstart.htm" /> <remove value="index.html" /> <remove value="index.htm" /> <remove value="Default.asp" /> <remove value="Default.htm" /> <add value="folder1Default.aspx" /> </files> </defaultDocument> </system.webServer>