In this article I'm going to explain how to run asp.net mvc4 project with iis7. This is the first time I'm working in asp.net MVC4 with VS-2010 and .NET4.0. When run my project at first time its run with a port number. So I create a virtual directory and run it on IIS7, the app comes up with a blank web page. After a long struggle i found the following solution from net.
Steps to run ASP.NET MVC 4 project in iis7:
Follow the below steps to configure the MVC4 Application framework4.0 in the IIS7.0 (Windows 7)
Step 1: Click start and click Web Platform Installer (WPI)
Step 2: Choose tab Products from the top and In the left pane select All.
Step 3: Install IIS 7 Recommended Configuration.
Step 4: Right click the your project solution (here Firstmvcsite)and select Properties.
Step 5: Select Web in the left pane --> Under Servers, select the Use Local IIS Web server radio button --> Select the Create Virtual Directory button.
If you get the message like "Unable to create the virtual directory. To access Web sites on the local IIS Web server, you must run Visual Studio under an Administrator account".
Just click start --> find Visual Studio --> right click and Run as Administrator.
Now you do the Step 5 again you will get success message.
Step 6: Go to start --> Run --> type inetmgr, and go to Internet Information Services (IIS) Manager and drill down in the Default Web Site and choose your site(here Firstmvcsite) and select Browse *:80(http) in the right pane.
Now you will see your project run without port number.
That's all. If this post is useful for you , please share this knowledge to your friends. Thanks!
Steps to run ASP.NET MVC 4 project in iis7:
Follow the below steps to configure the MVC4 Application framework4.0 in the IIS7.0 (Windows 7)
Step 1: Click start and click Web Platform Installer (WPI)
Step 2: Choose tab Products from the top and In the left pane select All.
Step 3: Install IIS 7 Recommended Configuration.
Step 4: Right click the your project solution (here Firstmvcsite)and select Properties.
If you get the message like "Unable to create the virtual directory. To access Web sites on the local IIS Web server, you must run Visual Studio under an Administrator account".
Just click start --> find Visual Studio --> right click and Run as Administrator.
Now you do the Step 5 again you will get success message.
Step 6: Go to start --> Run --> type inetmgr, and go to Internet Information Services (IIS) Manager and drill down in the Default Web Site and choose your site(here Firstmvcsite) and select Browse *:80(http) in the right pane.
Now you will see your project run without port number.
That's all. If this post is useful for you , please share this knowledge to your friends. Thanks!
5 comments:
Thanks for the post! This helped me get started with ASP.Net MVC4 IIS7.x Configuration.
I did all this but I can't see my website in the default website list.. any idea?
"I did all this but I can't see my website in the default website list.. any idea?"
I have the same problem.... :(
Thank you, It's working correctly :)
"I did all this but I can't see my website in the default website list.. any idea?"
I have the same problem, what was the fix?
Post a Comment
Share your thoughts here...