This seems to be so easy that it is documented nowhere.... I have finished my first MVC3 project and now I want to host it on my own IIS7 (W2008) server. How is it done?
preguntado el 27 de agosto de 11 a las 19:08
There are two options. If you have control of the server and can install on it, the easiest is to install the ASP.NET MVC 3 Framework on it and then install and configure the MVC app as any other web application.
If the runtime cannot be installed on the server, option called Despliegue de contenedores puede ser usado.
This is what I did to install get MVC running on Windows 7 Professional or greater. For Windows Server 2008, please see este link. The IIS management component should be the same for Windows 7 / Server 2008. The install process will be a little different.
Start > Control Panel > Programs and Features > Turn Windows features on of off
Expand Internet Information Services and check off all that you need (FTP, World Wide Web)
Specifically I use FTP (FTP Service), and WWW Services with Application Development (.NET Extensibility, ASP, ASP.NET, ISAPI Extensions, and ISAPI Filters) enabled. Under security you should at least enable Basic Authentication.
After this is done, go to aquí to get the Web Platform Installer, which will allow you to easily install .NET 3.5/4.0, MVC, and other features you might need such as MS SQL Express.
Once this is done, go to Start > Control Panel > Administrative Tools > Internet Information Services Managger
Expand COMPUTERNAME, expand sites, right click Default Web Site (unless you want to use a different folder, if so, right click sites and click "Add New"), whichever site you choose, you can right click and choose "Add FTP Publishing". From there just follow the prompts, and allow access to whichever users you want. Now you can FTP in from Microsoft visual Studio 2010 (Using Publish).
In Visual Studio - right click the MVC application you want to publish, go to Publish, enter the ftp site settings (most likely ftp: // localhost if its a local install), user, password, and whether or not to replace or delete files. You can save this profile so you don't have to re-enter this information every time.
This question/answer might even be more geared toward serverfault, or superuser, not sure? If so I'm sure it will be moved.