user857521
user857521

Reputation:

Correct path to publish to IIS

I've managed to deploy my website to test through Publish Web in VS2012 using the connection criteria below. This launches fine and works as expected but I need to keep clicking the publish button each time to get the page to launch.

enter image description here

However, rather than keep publishing each time, I'm trying to run it directly from IIS by opening IIS (inetmgr) select the site folder and browse. However, it tries to launch localhost/MyWebsite/ and not the full path localhost/MyWebsite/home.aspx so I get a blank page.

The project also has the home.aspx set as start page. Can anyone point out why I can't get this to run from IIS where it's already published? It's probably something obvious but I can't see it.

enter image description here

Upvotes: 0

Views: 729

Answers (3)

Hiren Dhaduk
Hiren Dhaduk

Reputation: 2780

Insted of setting default document from IIS set it from web.config . so that you no need to set default document every time .

Web.config

<configuration>
<system.webServer>
  <defaultDocument enabled="true">
     <files>
        <add value="home.html" />
     </files>
  </defaultDocument>

Upvotes: 0

JB King
JB King

Reputation: 11910

In IIS, you specifying that you want to browse that site which is "localhost/MyWebSite/" you could go into "Content View" and select "Home.aspx" and then select browse if you want the full path to that file for another solution.

Upvotes: 0

Moondustt
Moondustt

Reputation: 884

ON IIS, go to DEFAULT and add HOME.aspx, on the top of the list.

Upvotes: 3

Related Questions