无法在Web服务器上运行ASP.net页面 [英] Unable to run ASP.net pages on web server

查看:89
本文介绍了无法在Web服务器上运行ASP.net页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是ASP.net的新手,我在Web服务器上运行项目时遇到问题。

Visual Studio Community 2015,.Net Framework 4.5.2

项目在我的本地计算机上运行正常。我将它发布到Web服务器(使用FTP),当我从服务器运行时出现错误。它在行上的Web.config文件中窒息 -



I'm new to ASP.net, and I'm having a problem running my project on the web server.
Visual Studio Community 2015, .Net Framework 4.5.2
The project runs fine on my local machine. I published it to the web server (using FTP), and when I run from the server I get an error. It chokes on the Web.config file at the line -

type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"





返回的错误是 - < br $>




The error that comes back is -

Parser Error Message: The CodeDom provider type "Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" could not be located.





似乎没有找到CodeDom编译器 - 或类似的东西,虽然我可以看到bin文件夹中的CodeDom内容上传确定。

我的网站托管帐户设置为支持ASP.net 4.0和4.5

我需要在项目中包含更多内容吗?非常感谢任何帮助。



Victor



It seems like it is not finding the CodeDom compiler - or something like that, although I can see CodeDom stuff in the bin folder which uploaded ok.
My web hosting account is set to support ASP.net 4.0 and 4.5
Is there something more I need to include in the project? Any help is greatly appreciated.

Victor

推荐答案

我终于能够正常工作 - 最初我已经将项目创建为Web应用程序而不是Web站点。在重新创建网站并发布后,所有服务器都可以正常运行。我注意到Web.config文件没有system.codedom部分,Web App也没有。所以我想网站不需要这样做。

另外 - 为什么网站项目只有DEBUG配置和RELEASE配置?这有什么意义?

我想了解Web App和Web Site之间的区别。有什么建议吗?



顺便说一下 - 我创建了针对.NET Framework 4.0而不是4.5.2的网站 - 不知道是否与此有任何关系它 - 可能不是。
I was finally able get this working - Initially I had created the project as a Web Application instead of Web Site. After recreating as a Web Site and publishing, all runs fine from the server. I noticed the Web.config file has no system.codedom section as does the one for Web App. so I guess that is not needed for a website.
Also - why is there only a DEBUG configuration and no RELEASE configuration for a Web Site project? What is the significance of that?
I would like to understand the difference between Web App and Web Site. Any suggestions?

By the way - I created the Web Site targeting .NET Framework 4.0 instead of 4.5.2 - don't know if that had anything to do with it - probably not.


这篇关于无法在Web服务器上运行ASP.net页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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