How to change aplication startup path on page in IIS

I have an asp net project with name: DocCat , same name of application in IIS. When i open my asp net application from visual studio(iis express) it has path like this:
http://localhost:49727/Pages/Main.aspx

But when i want to open it in IIS i have this path :
http://localhost:49727/DocCat/
and it open only folders , not my startup page. I need to rename start page path of my web application in IIS, to http://localhost:49727/Pages/Main.aspx
what can i do for this?

I tried :

1) Add this code to Webcongif file :

  <system.webServer>
        <defaultDocument>
            <files>
              <add  value="Pages/Main.aspx" />
            </files>
        </defaultDocument>
    </system.webServer>     

2)Set default document to Main.aspx or Pages/Main.aspx
3) Add virtual catalogue with virtual path Pages/Main.aspx and physical path : BigCar/BigCar/Pages
How can i rename startup path in IIS?

Edit. Suggested question didn't solve my problem - because startuo page in IIS open FOLDER , not the page - likle this :
http://imgur.com/a/O5XGJ

Upvotes: 1

Views: 2175

Answers (3)

If you are newbie in IIS like me i think this might help you:

Now all work for me!

Upvotes: 0

ThatChris
ThatChris

Reputation: 752

If you browse to your site in IIS, you will find a config option called default document. Make sure you add Main.aspx to that list, preferably to the top.

Edit: If you have all your pages in a subfolder you would need to either move the default document into the root or create a default.aspx in the root and redirect from that page load as IIS cannot use pages in subfolders as the default document.

Upvotes: 1

Krzysiek Szymczak
Krzysiek Szymczak

Reputation: 150

Did you enable default documents in the IIS manager?

https://technet.microsoft.com/en-us/library/cc754807(v=ws.10).aspx

Upvotes: 1

Related Questions