[英]publishing web apps in IIS getting different errors
My project is running well in visual studio 2015. I published the app and upload in IIS. 我的项目在Visual Studio 2015中运行良好。我发布了该应用程序并上传到IIS。 When I try to run the app, I am getting error as
当我尝试运行该应用程序时,出现以下错误:
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.
On searching in internet, I found that commenting this line in web config solves the problem. 在互联网上搜索时,我发现在Web配置中注释此行可以解决此问题。 So I commented this line::
所以我评论了这一行::
<compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:6 /nowarn:1659;1699;1701" />
Then again I tried to run my project, now I am getting error as: Parser Error Message: The file '/view/global.Master'
does not exist. 然后再次尝试运行我的项目,现在出现以下错误:解析器错误消息:文件
'/view/global.Master'
不存在。
shows at Line 1: <%@ Page Title="" Language="C#" MasterPageFile="~/view/global.Master" AutoEventWireup="true" CodeBehind="profile.aspx.cs" Inherits="myApp.view.profile" %>
在
Line 1: <%@ Page Title="" Language="C#" MasterPageFile="~/view/global.Master" AutoEventWireup="true" CodeBehind="profile.aspx.cs" Inherits="myApp.view.profile" %>
显示Line 1: <%@ Page Title="" Language="C#" MasterPageFile="~/view/global.Master" AutoEventWireup="true" CodeBehind="profile.aspx.cs" Inherits="myApp.view.profile" %>
then I changed the code for MasterPageFile as :: <%@ Page Title="" Language="C#" MasterPageFile="../view/global.Master" AutoEventWireup="true" CodeBehind="profile.aspx.cs" Inherits="myApp.view.profile" %>
然后我将MasterPageFile的代码更改为::
<%@ Page Title="" Language="C#" MasterPageFile="../view/global.Master" AutoEventWireup="true" CodeBehind="profile.aspx.cs" Inherits="myApp.view.profile" %>
Now I am getting error as:: 现在我得到错误为:
Parser Error Message: Could not load type 'myApp.view.global'.
Line 1: <%@ Master Language="C#" AutoEventWireup="true" CodeBehind="global.master.cs" Inherits="myApp.view.global" %>
第1行:
<%@ Master Language="C#" AutoEventWireup="true" CodeBehind="global.master.cs" Inherits="myApp.view.global" %>
I can not understand what is the problem with uploading my project in IIS. 我不明白在IIS中上传项目有什么问题。 Why I am getting continuous errors?
为什么我会不断出现错误?
I did a rough fixing of my problem. 我粗略地解决了我的问题。 Previously, I kept all my published files and folders in a folder and then put that folder inside wwwroot directory.
以前,我将所有已发布的文件和文件夹都保存在一个文件夹中,然后将该文件夹放在wwwroot目录中。 So my folder structure looked like::
所以我的文件夹结构看起来像:
wwwroot --> myapp --> bin, scripts, view folders and other files
But now I've directly kept my published files and folders inside wwwroot
directory. 但是现在我直接将发布的文件和文件夹保存在
wwwroot
目录中。 And now I can browse my app. 现在,我可以浏览我的应用了。 But it is not the solution for my problem, what if I have to host multiple apps?
但这不是解决我的问题的方法,如果我必须托管多个应用程序怎么办? Any help regarding the problem will be highly appreciated.
任何有关此问题的帮助将不胜感激。 Thank You!!!
谢谢!!!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.