Conceptos básicos de MVC 3.0: ¿se requiere la instalación de MVC3.0 en el servidor IIS?

I've mvc3.0 (.net 4.0) application that needs to be deployed to windows server 2008.

Could some one please help with my queries below?

  1. Do I need to install MVC 3.0 on server if I've referenced all MVC dll (with Copy Local set to true?)

  2. If I had MVC 2.0 installed on web server, does IIS picks MVC2.0 dll or MVC 3 given step 1 scenario above?

  3. When does IIS looks at DLL vs. BIN folder?

Montones de gracias.

preguntado el 28 de agosto de 12 a las 13:08

3 Respuestas

1.) Do I need to install MVC 3.0 on server if I've referenced all MVC dll (with Copy Local set to true?)

No, you could bin deploy tu solicitud.

2.) If I had MVC 2.0 installed on web server, does IIS picks MVC2.0 dll or MVC 3 given step 1 scenario above?

Assuming you have placed proper assembly binding redirects in your web.config It will pick MVC 3:

<runtime>
   <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
     <dependentAssembly>
       <assemblyIdentity name="System.Web.Mvc"
           publicKeyToken="31bf3856ad364e35"/>
       <bindingRedirect oldVersion="1.0.0.0-2.0.0.0" newVersion="3.0.0.0"/>
     </dependentAssembly>
   </assemblyBinding>
</runtime>

3.) When does IIS looks at DLL vs. BIN folder?

When the application starts, or when first required (assuming some assemblies could be dynamically loaded at runtime).

Respondido 28 ago 12, 13:08

Do I need to install MVC 3.0 on server if I've referenced all MVC dll (with Copy Local set to true?)

Not Necessary. You can run an MVC application without installing MVC in your server. There is something called dependencia implementable in Visual studio. That will publish your MVC DLLs in your bin folder when you publish it

de msdn página,

This will add assemblies (DLL files) to a Web site project or Web application project. When you deploy your Web site or application, the files are included in the deployed project. This is useful if applications or technologies that your project depends on are not already installed on the server that will host your Web project. For example, you can use this feature to deploy an ASP.NET MVC 3 Web application to a server that does not have ASP.NET MVC 3 installed.

Pagar este answer where i have given step by step instruction how to do this.

Consulte esta publicación para obtener más detalles. http://haacked.com/archive/2011/05/25/bin-deploying-asp-net-mvc-3.aspx

Deberías Estudio visual 2010 SP1. De lo contrario, no se mostrará en el menú contextual cuando haga clic con el botón derecho en el proyecto que desea publicar.

Respondido el 20 de junio de 20 a las 10:06

  1. Already asked, see - Implementación de ASP.NET MVC en forma de paquete de distribución

  2. it'll get exact version, which you used to build application

  3. Local assembly has priority over GAC (global assembly cache)

contestado el 23 de mayo de 17 a las 12:05

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.