清泛IT社区

标题: 解决IIS发布时global_asax的dll 的CS0433冲突问题 [打印本页]

作者: 清泛网    时间: 2015-10-26 09:19
标题: 解决IIS发布时global_asax的dll 的CS0433冲突问题
Server Error in '/' Application.
Compilation Error
Description: 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 文件拷贝到网站根目录下;
问题解决。








欢迎光临 清泛IT社区 (https://bbs.tsingfun.com/) Powered by Discuz! X3.3