I would like to share this option for the developer who are using Visual studio 2010 for development and working on ASP.NET MVC application. When you try to host your application (ASP.NET MVC) on window server and if you server haven't installed MVC then you might be get following type of error.
Could not load file or assembly 'System.Web.Helpers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified
This is because of your web server doesn't have installed MVC. I have faced same issue in my case and tried to search around the web and found some good articles as per below.
You can find the above dlls from this location C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET Web Pages\v2.0\Assemblies
OR In Visual studio right click on your project and click "Add Deployable Dependencies" and it will prompt for which one you want to add, and select ASP.NET MVC as shown in below figs.
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiv5xAM8XLE9ViCbG6GG0u2rv2qUPT2aEZDkpbsqh-pGUEwqgms6FK3wTujwKlUqYYsxqgLHCUHBIV99nsx6tHw96mlDd4ovoTiD3iUPBMLCalE9nxBFeKMqhAWdQItjZpZAn9lL2m5hbF8/?imgmax=800)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi-1HtQAo7-YfpkkQOe4UegRiulQ6IJ-jNKn5htfrqVbJ4cfhnqpZIgmsvLMBZ1-F7FdG45ZRsuBdkUCdp4IwxOaVIgLAChWyUPzGfGWEDlS7RTz3HhJPtKUGwZ1giLqIHpzer1dQQQLdpH/?imgmax=800)
It will add all required dlls in _bin_deployableAssemblies folder and when you build this project you can find this dlls in /bin directory of your project so your application will work on Window server without installed MVC.
Another way you can do it in Window AZURE
Also i found good article by smarx >> ASP.NET MVC 3 in Windows Azure when i was searching to run ASP.NEt MVC application in window Azure.
In this article he has talked about how you can install MVC in window azure instance by startup task.
Finally got my application working! Happy Programming!!
![](https://lh3.googleusercontent.com/blogger_img_proxy/AEn0k_vTB6L_c6UswNJPCJft1K7zXe4VvKHWS9w9vK8U98yK7Qzec6mHli_NKribrvbD1W9uDJnDCWKAvDnOpnRWbS_MVF4cELoYg4dLcRkwCtbNHslPjkSkm7eUWrw7UnZiAtdbP2lU2PlBUQxd0Q=s0-d)
Could not load file or assembly 'System.Web.Helpers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified
This is because of your web server doesn't have installed MVC. I have faced same issue in my case and tried to search around the web and found some good articles as per below.
- BIN Deploying ASP.NET MVC 3 with Razor to a Windows Server without MVC installed
- Running an ASP.NET MVC 3 app on a web server that doesn’t have ASP.NET MVC 3 installed
- Microsoft.Web.Infrastructure
- System.Web.Helpers
- System.Web.Mvc
- System.Web.Razor
- System.Web.WebPages
- System.Web.WebPages.Deployment
- System.Web.WebPages.Razor
You can find the above dlls from this location C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET Web Pages\v2.0\Assemblies
OR In Visual studio right click on your project and click "Add Deployable Dependencies" and it will prompt for which one you want to add, and select ASP.NET MVC as shown in below figs.
It will add all required dlls in _bin_deployableAssemblies folder and when you build this project you can find this dlls in /bin directory of your project so your application will work on Window server without installed MVC.
Another way you can do it in Window AZURE
Also i found good article by smarx >> ASP.NET MVC 3 in Windows Azure when i was searching to run ASP.NEt MVC application in window Azure.
In this article he has talked about how you can install MVC in window azure instance by startup task.
Finally got my application working! Happy Programming!!
No comments:
Post a Comment