还在苦苦敲代码开发APP?你out啦! 试试积木搭建APP吧~

解决IIS发布时global_asax的dll 的CS0433冲突问题

来源:清泛原创     2016-06-27 16:11:14    人气:     我有话说( 0 人参与)

Server Error in ' ' Application.Compilation ErrorDescription:An error occurred during the compilation of a re...

Server Error in '/' Application.
Compilation ErrorDescription: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately. 

Compiler Error Message: CS0433: The type 'ASP.global_asax' exists in both 'c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\925f9bdc\bb48a68c\App_global.asax.eptr0taj.dll' and 'c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\925f9bdc\bb48a68c\assembly\dl3\2dbf40e1\195f4379_8b0fd101\App_global.asax.DLL'

Source Error:

Line 176:        protected ASP.global_asax ApplicationInstance {
Line 177:            get {
Line 178:                return ((ASP.global_asax)(this.Context.ApplicationInstance));

Source File: c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\925f9bdc\bb48a68c\App_Web_loglist.aspx.e4a91b9d.vm_-rksu.0.cs    Line: 176 


这个错误,折腾了好久,后来发现是发布后,bin 目录下已经有了一个 App_global.asax.dll ,而根目录下的 global.asax 没有删除,结果重复了。

解决方法
删除 global.asax ;
PrecompiledApp.config 文件拷贝到网站根目录下;
问题解决。

IIS CS0433 global_asax 预编译

注:本文为本站或本站会员原创优质内容,版权属于原作者及清泛网所有,
欢迎转载,转载时须注明版权并添加来源链接,谢谢合作! (编辑:admin)
分享到: