mvc 在ii7上发布时遇到的问题只解决

在一台ii7的服务器上想发布MVC3的网站,直接添加网站时会报错如下

遇到的错误

Attempt by method 'System.Web.WebPages.Razor.WebPageRazorHost.get_GlobalAsaxTypeName()' to access method 'System.Web.Compilation.BuildManager.GetGlobalAsaxType()' failed.

 

 

Could not load file or assembly 'System.Web.Mvc' or one of its dependencies.

 

Server Error in '/' Application.

Configuration Error

Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

Parser Error Message: Could not load file or assembly 'System.Web.Mvc, Version=1.0.0.0, Culture=。。。。。

 

 

 

A network-related or instance-specific error occurred while establishing a connection to SQL Server

A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)

To resolve the issue - I had to change the VSTS Options; From Tools -> Options -> Data base Tools -> Design Time - Validation Data base -> Connection Options -> SQL Serevr Instance Name = Blank.

Hope this info will be helpful for some people.

 

 

等等一些其他的错。。。。

 

 

其实问题很简单你服务器上没有安装MVC3哈!

 

就是这样,你安装MVC3到服务器就好!

II7

1. 安装 Microsoft .net FrameWork 4.0安装包;
2. 安装ASP.NET MVC 3;
3. 设置IIS的“ISAPI和CGI限制”中的“ASP.NET v4.0.0.30319”为允许,

4. 在IIS中发布网站;
5. 编辑该网站的应用程序池,设置.NET Framework 版本为4.0.30196;

 

 

 

注意事项:

1. NET Framework4下载地址:
http://www.microsoft.com/downloads/zh-cn/details.aspx?FamilyID=0A391ABD-25C1-4FC0-919F-B21F31AB88B7
2. MVC 3 下载地址:
http://www.microsoft.com/downloads/en/details.aspx?FamilyID=d2928bc1-f48c-4e95-a064-2a455a22c8f6

转载于:https://www.cnblogs.com/OrangeManLi/p/3307996.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值