简体   繁体   中英

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. 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. 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.

shows at 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" %>

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" %>

I can not understand what is the problem with uploading my project in 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. 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. 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!!!

i think problem regarding publish setting. please try to check bellow setting.

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM