How to host MVC3 Hello World application on localhost and configure IIS

I am having problems deploying my MVC3 application to my localhost. I am looking for details for creating and deploying an ASP MVC 3 application on my local system. I tried to deploy this, but ran into a problem after the problem. Instead of tracking each problem separately (and I may have to do it anyway), I would like to create a guidebook for the same group that see this message.

I am looking for steps, including installing libraries (ASP MVC3, IIS, etc.) on a Win7 SP1 machine with VS2010 installed. Also, how do I configure IIS and how do I publish? The goal will be to deploy this web application on another Win7 machine in the house, but localhost will be the first step. In addition, it would be useful to know what steps are needed to make a site accessible from another computer on the same network.

Here is what I have done so far:

  • Created ASP MVC 3 application with VS2010
  • Built and launched
  • Installed by IIS
  • In IIS - “Added Application” to “Default Web Site” with the alias: “Hello”

    4a. "Hello" runs on DefaultAppPool, .Net 4.0; Integrated piping

    4b. "Hello" has the physical path C: \ inetpub \ Hello

  • In VS2010 - right-click on the project and select "Publish" using FTP
  • web browser: go to "localhost / Hello"

500.19 - Internal server error:

Config Error: This configuration section cannot be used at this path. This happens when the section is locked at a parent level. Locking is either by default (overrideModeDefault="Deny"), or set explicitly by a location tag with overrideMode="Deny" or the legacy allowOverride="false" 

Configuration file:

 \\?\C:\inetpub\wwwroot\web.config 

Requested URL:

 http://localhost:80/Hello 

Physical path:

 C:\inetpub\Hello 

Configuration Source:

68: <validation validateIntegratedModeConfiguration="false" />

69: <modules runAllManagedModulesForAllRequests="true" />

70: </system.webServer>

+7
source share
3 answers

Download and install ASP MVC 3

Create MVC3 Hello World App in Visual Studio

Install IIS from Windows Properties / Turn Windows Features On or Off on Windows.

Then you need to set up the website in IIS. I created one on port 81. Open IIS Manager and "Add Site" to the "Sites" node.

For this website, I created this on D: \ WebSite and configured it to run in DefaultAppPool configured for .NET 4.0 on port 81.

In most cases, IIS is installed after installing the .NET Framework, so you need to run some commands to register ASP.NET in IIS.

run cmd.exe as administrator and run aspnet_regiis -i in C: \ Windows \ Microsoft.NET \ Framework64 \ v4.0.30319

Initially, I had a problem publishing the project to the destination, but for some reason the publishing method: "FTP" in the Target Location "D: \ WebSite" seems to work quite well and publishes only the minimally necessary files.

+8
source

traditionally you can only use your server using ftp. Although this does not make much sense for ftp for a server that runs locally. However, Microsoft recently introduced a web deployment tool that works very well. After installing them, you have the opportunity to create a deployable package

0
source

In the Publish dialog box, select the File system option instead of FTP and specify the path that you set in IIS

0
source

All Articles