getting Parser error for Asp.Net by IIS

我的梦境 提交于 2019-12-25 12:43:32

问题


I'm developing some Asp.Net website and I'm trying to run it on my IIS, I published the web (under build option) and put it under wwwroot, but I get this parser error below. shall I publish the web to add it in inetmgr? or just put the files in my project folder there? what's the point of publishing?

Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

and this is the line which cause it.

Line 1:  <%@ page language="C#" autoeventwireup="true" inherits="App_Pages_Default, App_Web_av5ghx1x" %>

回答1:


Try changing your publish settings. When you publish the website, uncheck

Allow this precompiled site to be updateable

That should take care of the extra the App_Web_av5ghx1x.




回答2:


I don't know what it's purpose is, but I would try removing App_Web_av5ghx1x from Inherits, and add the CodeBehind attribute:

<%@ page Language="C#" Autoeventwireup="true" CodeBehind="App_Pages_Default.aspx.cs" Inherits="App_Pages_Default" %> 


来源:https://stackoverflow.com/questions/7810102/getting-parser-error-for-asp-net-by-iis

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!