0

I have developed an ASP.NET MVC 4 website using C# running on my local machine, and I want to publish it to our company's web server (as an aside, how many developers truly understand MVC?). We don't use Azure, code-first or any of the other techniques which every article on the subject seems to assume; instead we have a database-first entity model. Both the test and the live website must link to the same SQL Server database (we don't have a separate test database, which I'm sure will make people shudder, but it works for us).

What I want to be able to do is to publish the website as a final release, so we get minified CSS and JavaScript and only the files we need. I've looked at the Visual Studio publish option, and understand that to get this to work will mean installing Web Deployment Agent Service on the server.

Previously with classic ASP.NET webforms sites we've just copied changed files across on a as-needed basis, and this technique has worked well (I'm not keen on wizards).

Given all of the above, can anyone recommend a strategy, and advise on how to execute it? I'm having real problems finding help on Google.

Many thanks in advance!

1
  • Anyone want to tell me why they marked down this question? Commented Aug 2, 2014 at 11:23

1 Answer 1

2

There are multiple publish options; to get what you're used to:

  • Choose Custom.
  • Choose the File System option.
  • Change the Configuration (the publish mode) to Release. This will run any transformations in your Web.config file and remove the "debug=true" value from the <compilation> node.

I also tend to check the "Delete existing files" and "Exclude files in App_Data" options. Use an external FTP client as needed once the publish has finished.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.