c# - Web.config changing file default location -
i've have tricky question you:
in visual c# ide
, how change location of file within seperate folder?
so example
the inital path of folder webproject/folder1/default.aspx in vs 2008, converted 2010 , needed rename default.aspx folder1default.aspx make work in 2010, because couldnt have more 1 default.aspx. when attempt navigate folder, can't open default page. how can set page default location specific folder?
if path webproject/folder1/folder1default.aspx, how change location using web.config file?
thanks.
you did this, there should 1 default or index file 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 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>
Comments
Post a Comment