Search code examples
asp.netasp.net-mvcvisual-studio-2012publishmsdeploy

What is a good solution to publish an asp.net mvc application. Many issues with VS2012 Publish tool


I'm having a lot of issues with the Visual Studio 2012 Publish feature.

I am looking an easy way to publish my Asp.Net MVC 4 application. Today I have my development machine and a web server. Every time I update the application, I have to manually copy and paste the files I want. This is a very cumbersome work.

I have tried VS2012 publish tool and encountered so many problems.

  1. I am properly configuring ftp to work on passive mode but VS2012 keeps saying that passive mode is not activated.

  2. Since there is no "checkbox" to alternate from passive mode to normal mode, I had to modify the xml file no set it to not operate with passive mode.

The deployment now succeeds, and now I'm receiving the following error:

  c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET
  Files\root\ee6c89b7\bf969ee8\App_Web_crjs1ytd.16.cs(33,0): 
  Error CS0234: 'The type or namespace name 'sistema_DocType' does not exist in the namespace 'gedaiapp.Models' (are you missing an assembly reference?)

There is nothing wrong with my application on my local machine and I am able to build it and run in the web server when I copy/paste the files, I do now understand why it doesn't work when I use the publish feature.

I have already tried deleting all files in the temp folder, cleaned the entire solution and project and rebuilt all.


Solution

  • This question is not easy to answer because it is not know if this is an internal corporate environment or a small environment and you're just copying a few files over the internet to a single server.

    If you're in an internal corporate environment and have a large number of files/servers you need to copy to, you may want to look at replication (3rd party software or homegrown application).

    I'm with you in that the publish tool is not up to current standards. My challenge with this tool is the lack of Secure FTP options for this application. This should be standard with any version of Visual Studio.

    I'm currently using the IIS SFTP and Filezilla (SFTP) for my transport needs as the alternative to the lack of encrypted features in Visual Studio.