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 :)

3
  • Is this a web site "project" or a web application project? Commented Oct 2, 2011 at 23:09
  • It is a web application project. Commented Oct 2, 2011 at 23:19
  • possible duplicate of ASP.NET MVC on IIS 7.5 Commented Oct 3, 2011 at 0:05

1 Answer 1

3

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

Sign up to request clarification or add additional context in comments.

2 Comments

The installer said, that this does not apply.
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).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.