[ C# MVC 5 ] Deployment to windows 7 IIS


1)Turn on IIS Feature

Control Panel > Programs and Features > Turn Windows features on or off.


2) Run(Window+R) > “inetmgr” to Open The IIS console

NOTE : if you could not find “inetmgr”, make sure that you have selected in “Turn Windows features on or off” in step 1.

Internet Information Services > Web Management Tools > IIS Management Console

3) Change to “.NET Framework” of “DefaultAppPool” in “Application Pools” to v4.0



The below warning is normal, and will not effects the showing of the webpage.


Debugging MVC Project


We can choose the browser to open.

This will open that browser in the random port ( i.e. http://localhost:41787/ ).

NOTE : The localhost URL ( i.e. http://localhost:41787/ ) can be access only the local machine. We could not use http://whateverIP:41787/ to access from outside.


Publish MVC Project

Right click at the Project in visual studio > Publish

Create Profile

choosing : “Web Deploy”

For example, below profile is publish to localhost.


or we can publish using Old-fashioned “File System” Publish method like so.

NOTE : If you have encounter white page, make sure that you have selected in “IIS > World Wide Web Services > Common HTTP Features > Static Content” in step 1.

Test URL



If we face the “Handler StaticFile Error”, the solution is in the URL below.



ref : https://www.asp.net/mvc/overview/deployment/visual-studio-web-deployment/deploying-to-iis


Tips : 

Right click > Edit bindings …




Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s