首页 新闻 搜索 专区 学院

难题挡道,敬请高手支招:CS0433:编译错

0
悬赏园豆:30 [已关闭问题]

本人初学.NET,现遇一难题,困扰数日而不得其解,只得借贵园宝地发帖,敬请园内高手指点迷津,在下不胜感激:

问题是这样的,我在本地运行一网站,一切正常,可上传至服务器后,却出现如下编译错误:

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 'fztbbs.Global' exists in both 'c:\windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\fztbbs\781de81e\7d4752fe\App_Web_global.asax.cs.cdcab7d2.ykllwwf5.dll' and 'c:\windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\fztbbs\781de81e\7d4752fe\assembly\dl3\9b346158\f43edd60_771ac901\fztbbs.DLL'

Source Error:

 
[No relevant source lines]

Source File: c:\windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\fztbbs\781de81e\7d4752fe\App_global.asax.nls2r4eh.0.cs    Line: 104



c:\windows\system32\inetsrv> "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\csc.exe" /t:library /utf8output /R:"C:\WINDOWS\assembly\GAC_32\System.Data\2.0.0.0__b77a5c561934e089\System.Data.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Drawing\2.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Xml\2.0.0.0__b77a5c561934e089\System.Xml.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Configuration\2.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll" /R:"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\fztbbs\781de81e\7d4752fe\App_Web_global.asax.cs.cdcab7d2.ykllwwf5.dll" /R:"C:\WINDOWS\assembly\GAC_32\System.Web\2.0.0.0__b03f5f7f11d50a3a\System.Web.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System\2.0.0.0__b77a5c561934e089\System.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Web.Mobile\2.0.0.0__b03f5f7f11d50a3a\System.Web.Mobile.dll" /R:"C:\WINDOWS\assembly\GAC_32\System.EnterpriseServices\2.0.0.0__b03f5f7f11d50a3a\System.EnterpriseServices.dll" /R:"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\fztbbs\781de81e\7d4752fe\assembly\dl3\9b346158\f43edd60_771ac901\fztbbs.DLL" /R:"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\mscorlib.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Web.Services\2.0.0.0__b03f5f7f11d50a3a\System.Web.Services.dll" /out:"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\fztbbs\781de81e\7d4752fe\App_global.asax.nls2r4eh.dll" /debug- /optimize+ /w:4 /nowarn:1659;1699;1701  "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\fztbbs\781de81e\7d4752fe\App_global.asax.nls2r4eh.0.cs" "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\fztbbs\781de81e\7d4752fe\App_global.asax.nls2r4eh.1.cs"


Microsoft (R) Visual C# 2005 Compiler version 8.00.50727.1433
for Microsoft (R) Windows (R) 2005 Framework version 2.0.50727
Copyright (C) Microsoft Corporation 2001-2005. All rights reserved.

c:\windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\fztbbs\781de81e\7d4752fe\App_global.asax.nls2r4eh.0.cs(104,47): error CS0433: The type 'fztbbs.Global' exists in both 'c:\windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\fztbbs\781de81e\7d4752fe\App_Web_global.asax.cs.cdcab7d2.ykllwwf5.dll' and 'c:\windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\fztbbs\781de81e\7d4752fe\assembly\dl3\9b346158\f43edd60_771ac901\fztbbs.DLL'
c:\windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\fztbbs\781de81e\7d4752fe\App_Web_global.asax.cs.cdcab7d2.ykllwwf5.dll: (Location of symbol related to previous error)
c:\windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\fztbbs\781de81e\7d4752fe\assembly\dl3\9b346158\f43edd60_771ac901\fztbbs.DLL: (Location of symbol related to previous error)

看其大意,好象是类型重复定义的错误,可我在本地机上却没有此错误,为什么?

我也曾将'c:\windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\下的有关临时文件都删掉,可问题依旧.

在下初学,还望高手们能给以指点,谢谢了~

老笨的主页 老笨 | 初学一级 | 园豆:170
提问于:2008-09-22 20:58
< >
分享
其他回答(4)
0

整个解决方案查找一下fztbbs.Global试试

yibin | 园豆:17 (初学一级) | 2008-09-22 21:17
0

好大一陀!:)

如果这服务器上有运行正常 .Net 2.0 网站,那可能是你程序的问题,如果没有,很大原因是服务器环境配置有问题。如果是俺,俺比较笨,卸载 .Net framework 2.0,然后重装。

IIS的配置上,留心 2.0 服务的启用情况。

耐心的等等,应该有高人能“闻”出症结来。

陛下 | 园豆:3938 (老鸟四级) | 2008-09-22 23:16
0

IIS的配置

Jared.Nie | 园豆:1940 (小虾三级) | 2008-09-23 10:16
0

弱弱的问下,这个怎么解决的???

rabbit liu | 园豆:202 (菜鸟二级) | 2013-08-06 16:49
0

这个应该可以解决你的问题

http://www.cnblogs.com/eaglet/archive/2011/10/14/2211126.html

今年目标60万 | 园豆:142 (初学一级) | 2014-10-09 16:36
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册