Tstar
Tstar

Reputation: 35

How to deploy ASP.NET MVC3 app to localhost with IIS7

I searched alot among tutorials but I'm so confused now.

  1. I Created an ASP.MVC3 application with VS2010 named tile-shop2,
  2. installed IIS7,
  3. in IIS7 manager in Default Web Site section created a new app named tile-shop2 with ASP.NET V4.0 Application pool, and Physical path is the place that application is created (document, Visual Studio 2010, Projects, ...)
  4. in VS2010, right clicked on the name of project and clicked Publish,
  5. in VS2010 in Project menu => tile-shop2 properties => Web => Servers => ticked Use Local IIS Web server

when I run VS I see this window:

enter image description here

and when in browser searched localhost/tile-shop2 I see list of directoris in Solution Explorer, and when I click on one of them, Error 404.8 appears. (I run aspnet_regiis and IIS7 works itself) Can anybody please tell me what is wrong here? Thanks so much

Upvotes: 1

Views: 1156

Answers (1)

Adrian Thompson Phillips
Adrian Thompson Phillips

Reputation: 7148

It sounds like the IIS application is pointing to the folder containing your web project and not the published web project contents.

You want to create a folder within your IIS root ('C:\inetpub\MyProject') and point your IIS application's physical path to this same publish folder, rather than your Visual Studio project folder. You then need to publish the website to this folder using Visual Studio.

Upvotes: 2

Related Questions