开发者

Setting up mvc application on IIS7?

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开发者_如何学JAVA 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 :)


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜