4

I've created a MVC website using Visual Studio 2010 and would like to deploy it to my newly installed local IIS7. The website works perfectly running from Visual Studio on the development server that it comes with.

Here are the steps I've done:

1) Opened IIS7 Manager.

2) Under Sites created a new site called Foo.

-- I used the DefaultAppPool which is set to .net4 integrated

-- I created a empty directory and used it as the default path

-- I set the port to 54321

3) I then in Visual Studio used the publish button with local IIS and the site set as Foo.

IIS Manager now shows the following under sites:

 Foo
     bin
     content
     scripts
     views

When I go to localhost:54321 I am given a message saying it can't list the directory. If I put a index.html file in this directory it will launch the file as expected. I guess I'm missing something big here. I published my site to this directory. When I go to localhost:54321 I expected it to launch the index view of the home controller, but it just tries to list the directory.

Found the answer here: ASP.NET MVC on IIS 7.5

Can't answer my own question cause I have less than 100 points :)

Community
  • 1
  • 1
corsen
  • 485
  • 1
  • 4
  • 14

1 Answers1

3

The new server is missing the ASP.NET MVC 3.0. Install it using standalone ASP.NET MVC 3 installer.

amit_g
  • 30,880
  • 8
  • 61
  • 118
  • The installer said, that this does not apply. – corsen Oct 02 '11 at 23:35
  • 1
    Is IIS able to serve the aspx pages? Create a Test.aspx page in the root of the site and see if you could get IIS to serve it. Have a very simple code (say <%= DateTime.Now.ToString() %>) in it. If that also doesn't work, run the aspnet_regiis -ir from Framework directory (%Windir%\Microsoft.NET\Framework\v4.0.30319). – amit_g Oct 03 '11 at 00:21