将ASP.NET MVC4应用程序部署到GoDaddy编译器问题 [英] Deploying ASP.NET MVC4 App to GoDaddy Compiler issue

查看:98
本文介绍了将ASP.NET MVC4应用程序部署到GoDaddy编译器问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

看过几篇关于将MVC应用程序部署到GoDaddy的帖子.他们似乎都没有解决我们遇到的问题.我们遵循了有关检查运行时版本,IIS管道模式,在程序集上发布本地并将其复制为true的建议,以便所有这些都可以在GoDaddy.Com上使用.

Have seen several posts about deploying MVC apps to GoDaddy. None of them seem to address the issue we are having. We have followed the advice about checking runtime versions, IIS pipeline modes, publishing and copy local to true on assemblies so all works on GoDaddy.Com.

我们遇到的问题是,当我们尝试访问该站点时,由于ASP.NET运行时试图调用C#编译器,因此会出现组策略异常.

The issue we are having is that when we try to visit the site we get a Group Policy exception because ASP.NET runtime is trying to invoke the C# compiler.

[Win32Exception (0x80004005): This program is blocked by group policy. For more information, contact your system administrator]

[ExternalException (0x80004005): Cannot execute a program. The command being executed was "C:\Windows\Microsoft.NET\Framework\v4.0.30319\csc.exe".........

我们已经完成了发布设置,并选择了对站点进行预编译.那没有解决问题.已经查看了该站点,并且没有部署CS文件. Global.asax文件确实引用了代码隐藏文件.由于我们已经对站点进行了预编译,因此我们尝试删除global.asax文件,但这也不能解决问题.

We have gone through the publish settings and elected to precompile the site. That didn't fix the issue. Have looked at the site and there are no CS files deployed. The Global.asax file does reference a codebehind file. Since we precompiled the site we tried deleting the global.asax file and that doesn't fix the issue either.

任何想法都会很棒.

推荐答案

几个月来,我一直在同一个问题上挣扎.终于解决了.在Godaddy的全体会议上,我更改了ASP.Net设置.首先将CAS信任级别更改为完全".然后,在项目的Web.config中进行了以下更改:

I have struggled with the same problem for months. And finally solved it. In the plesk on godaddy I changed the ASP.Net settings. First changed CAS-trustlevel to Full. Then I changed in the Web.config of my project the following:

  • 将完全信任级别添加到system.web
  • 在system.codecom中删除编译器
 <system.web>
    compilation debug="true" targetFramework="4.5.2"/>
    <httpRuntime targetFramework="4.5.2"/>
    <trust level="Full"/>             <!-- Just add this to the webconfig -->
 </system.web>

 <system.codedom>
              <!-- All is removed between the 2 tags-->
 </system.codedom>

这解决了我的问题.

这篇关于将ASP.NET MVC4应用程序部署到GoDaddy编译器问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆