How can I deploy an MVC 4 application to IIS 6?

10,161

first setup extensionless urls based on Phil Haack's blog post: ASP.NET MVC on IIS 6 Walkthrough.

Second Source click here

Share:
10,161
Greg Barth
Author by

Greg Barth

Working at a utility company doing .NET development, SQL Server work, and application support.

Updated on June 04, 2022

Comments

  • Greg Barth
    Greg Barth almost 2 years

    I'm working on my first MVC application (also my first web project) and want to deploy it to a test server running Windows Server 2003 with IIS 6. It's a simple CRUD app built with VS 2012 using .NET 4, Entity Framework 5. I built the DB first on SQL Server 2005 since my manager wanted to see the DB first. I used the EF Power Tools Beta 4 to reverse-engineer back to Code First. I customized the T4 templates to allow for Data Annotations.

    The app works fine using IIS Express on my development PC, but I want to get an initial version out to our test server, which unfortunately, is running IIS 6. Nobody where I work has experience with MVC...just ASP.NET with VB, and I'm having trouble finding good step-by-step instructions on how to deploy it.

  • Dan Sorensen
    Dan Sorensen over 10 years
    Make sure you deploy the required DLLs too. There are a number of Microsoft provided DLLs in your project bin folder that is not installed on IIS 6.
  • Greg Barth
    Greg Barth over 10 years
    Thanks very much for your responses Vijay and Dan. Both are very helpful with this deployment. I've tried to do the deployment by manually creating a virtual directory, copying in all the files and folders, and then setting up the routing to use .aspx extensions. The Phil Haack blog post was very helpful. Now however, I seem to be getting a SQL Server login error. Looks like the web server's not passing my UserID through from my PC to the database server. Any ideas?
  • Greg Barth
    Greg Barth over 10 years
    More info: [SqlException (0x80131904): Login failed for user 'domainobfiscated\WEBDEV2$'.]..... [ProviderIncompatibleException: The provider did not return a ProviderManifestToken string.] System.Data.Common.DbProviderServices.GetProviderManifestTok‌​en(Db... System.Data.Entity.ModelConfiguration.... [ProviderIncompatibleException: An error occurred while getting provider information from the database. This can be caused by Entity Framework using an incorrect connection string. Check the inner exceptions for details and ensure that the connection string is correct.]...
  • Greg Barth
    Greg Barth over 10 years
    I'm trying to use Windows Authentication, but it seems that my UserID is not properly passed through the web server to the SQL DB (running on another box).
  • Greg Barth
    Greg Barth over 10 years
    Just to clarify - my last two comments about "Login failed..." were posted and answered in another post, but it turned out that the app was deployed, ASP.NET, MVC 4, and EF were running. I thought it better to separate that issue out to another post\question at stackoverflow.com/questions/20320914/…