Parser Error Message: Could not load type 'som

2019-01-23 13:20发布

I am experiencing an error that I am unable to resolve for some time now. I was wondering if someone can help identify the cause of this error? I am completely new to asp / asax. After some research, I think that the error I am getting is due to the web application trying to use outdated code. I was thinking to rebuild the c# file using Visual Studio and/or the entire project. However, I am completely new to C# and asp, and was wondering can give me some suggestions if this may fix the problem and/or if there is an possible alternate solution.

Error message

Parser Error Message: Could not load type 'Inventory1.Global'.

Source Error:   <%@ Application Codebehind="Global.asax.cs" Inherits="Inventory1.Global" %>

Entire Global.asax contents:

<%@ Application Codebehind="Global.asax.cs" Inherits="Inventory1.Global" %>

16条回答
混吃等死
2楼-- · 2019-01-23 13:48

I had this error , just needed to rebuild the project

查看更多
啃猪蹄的小仙女
3楼-- · 2019-01-23 13:48

I tried all the solutions listed above and none of them worked. I finally created a new web page (webform) and copy blocked all the code (cs and aspx files) into it from the old one, deleted the old cs and aspx file, recompiled, and now I'm back in business. I know it makes no sense. It should not have mattered, but it worked.

查看更多
叛逆
4楼-- · 2019-01-23 13:51

Since it was only happening with IISexpress, changing output from bin\Debug\ to bin\ solved it for me. Changing tag CodeBehind to CodeFile only created even more problems.

查看更多
时光不老,我们不散
5楼-- · 2019-01-23 13:51

I was fixing my namespaces in our Base Project, and I started seeing this error on another project that references it after that. I had to remove the reference to the Base Project and re-add it and then it started working again.

查看更多
登录 后发表回答