How to publish an ASP.NET MVC website

Posted by Luke Puplett on Stack Overflow See other posts from Stack Overflow or by Luke Puplett
Published on 2010-06-11T14:53:27Z Indexed on 2010/06/11 15:02 UTC
Read the original article Hit count: 509

Hello --

I've a site that I'd like to publish to a co-located live server. I'm finding this simple task quite hard.

My problems begin with the Web Deploy tool (1.1) giving me a 401 Unauthorized as the adminstrator because port :8172 comes up in the errors and this port is blocked - but the documentation says "The default ListenURL is http://+:80/MsDeployAgentService"!

I'm loathe to open another port and I've little patience these days so I thought bu66er it, I'll create a Web Deploy package and import it into IIS on the server over RDP.

I notice first that Visual Studio doesn't use a dialog box to gather settings, or use my Publish profiles but seems to use a tab in the project properties, although I think these are ignored when importing the package anyway?

I'm now sitting in the import wizard with Application Path and Connection String. I've cleared the conn string as I think this is for some ASP stuff I don't use but when I enter nothing in the Application Path, the wizard barks at me saying that basically I'm a weirdo because most people publish to folders beneath the root site.

Now, I want my site to be site.com/Home/About and not site.com/subfolder/Home/About and I think being an MVC routed site that a subfolder will introduce other headaches. Should I go ahead and use the root?

Finally, I also want to publish a web service to www.site.com/services/soap which I think IIS can handle.

While typing this question, Amazon have delivered my IIS 7 Resource Kit, and I've been scouring the internet but actually I'm getting more confused.

Comment here seems to show consensus opinion that Publish isn't for production sites and that real men roll their own.

http://stackoverflow.com/questions/260525/asp-net-website-publish-vs-web-deployment-project

...I guess this was pre- Web Deployment Tool era?

I'm going to experiment on a spare box for now but any assistance is welcome.

Luke

© Stack Overflow or respective owner

Related posts about asp.net-mvc

Related posts about deployment