一个Ajax Control Toolkit WebSite,使用CalendarExtender控件,调试正常,发布出错!
使用CalendarExtender控件,如下:
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
......
<asp:ScriptManager ID="ScriptManager1" runat="server" EnableScriptGlobalization="True">
</asp:ScriptManager>
......
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
<cc1:CalendarExtender ID="CalendarExtender1" runat="server" TargetControlID="TextBox1" Format="yyyyMMdd">
</cc1:CalendarExtender>
......
调试都正常,发布到本机的Inetpub\wwwroot,浏览出错如下:
“/AJAXEnabledWebSite1”应用程序中的服务器错误。
--------------------------------------------------------------------------------
编译错误
说明: 在编译向该请求提供服务所需资源的过程中出现错误。请检查下列特定错误详细信息并适当地修改源代码。
编译器错误信息: CS0030: 无法将类型“ASP.calendar_aspx”转换为“System.Web.UI.WebControls.Calendar”
源错误:
行 120: public calendar_aspx() {
行 121: string[] dependencies;
行 122: ((Calendar)(this)).AppRelativeVirtualPath = "~/Calendar.aspx";
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
行 123: if ((global::ASP.calendar_aspx.@__initialized == false)) {
行 124: global::ASP.calendar_aspx.@__stringResource = this.ReadStringResource();
源文件: c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\ajaxenabledwebsite1\b9aefc02\e1a488f4\App_Web_calendar.aspx.cdcab7d2.emusxxlk.0.cs 行: 122
编译器警告消息:
警告: CS0108: “ASP.calendar_aspx.Profile”隐藏了继承的成员“Calendar.Profile”。如果是有意隐藏,请使用关键字 new。
源错误:
c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\ajaxenabledwebsite1\b9aefc02\e1a488f4\App_Web_calendar.aspx.cdcab7d2.emusxxlk.0.cs
行 131: }
行 132:
行 133: protected System.Web.Profile.DefaultProfile Profile {
行 134: get {
行 135: return ((System.Web.Profile.DefaultProfile)(this.Context.Profile));
警告: CS0108: “ASP.calendar_aspx.ApplicationInstance”隐藏了继承的成员“Calendar.ApplicationInstance”。如果是有意隐藏,请使用关键字 new。
源错误:
c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\ajaxenabledwebsite1\b9aefc02\e1a488f4\App_Web_calendar.aspx.cdcab7d2.emusxxlk.0.cs
行 137: }
行 138:
行 139: protected System.Web.HttpApplication ApplicationInstance {
行 140: get {
行 141: return ((System.Web.HttpApplication)(this.Context.ApplicationInstance));
显示详细的编译器输出:
C:\WINDOWS\system32> "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\csc.exe" /t:library /utf8output /R:"C:\WINDOWS\assembly\GAC_32\System.Web\2.0.0.0__b03f5f7f11d50a3a\System.Web.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Configuration\2.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Design\2.0.0.0__b03f5f7f11d50a3a\System.Design.dll" /R:"C:\WINDOWS\assembly\GAC_32\System.Data\2.0.0.0__b77a5c561934e089\System.Data.dll" /R:"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\ajaxenabledwebsite1\b9aefc02\e1a488f4\assembly\dl3\cd3cb47a\66c806a1_77cac701\App_Web_4s8ptw59.DLL" /R:"C:\WINDOWS\assembly\GAC_32\System.EnterpriseServices\2.0.0.0__b03f5f7f11d50a3a\System.EnterpriseServices.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Web.Mobile\2.0.0.0__b03f5f7f11d50a3a\System.Web.Mobile.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Drawing\2.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System\2.0.0.0__b77a5c561934e089\System.dll" /R:"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\mscorlib.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Web.Extensions\1.0.61025.0__31bf3856ad364e35\System.Web.Extensions.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Web.Services\2.0.0.0__b03f5f7f11d50a3a\System.Web.Services.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Web.Extensions.Design\1.0.61025.0__31bf3856ad364e35\System.Web.Extensions.Design.dll" /R:"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\ajaxenabledwebsite1\b9aefc02\e1a488f4\assembly\dl3\5e8142d3\06c1fb9f_77cac701\App_Code.DLL" /R:"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\ajaxenabledwebsite1\b9aefc02\e1a488f4\assembly\dl3\c6852165\96393eeb_b0bec701\AjaxControlToolkit.DLL" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Xml\2.0.0.0__b77a5c561934e089\System.Xml.dll" /out:"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\ajaxenabledwebsite1\b9aefc02\e1a488f4\App_Web_calendar.aspx.cdcab7d2.emusxxlk.dll" /D:DEBUG /debug+ /optimize- /win32res:"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\ajaxenabledwebsite1\b9aefc02\e1a488f4\yruz-zlv.res" /w:4 /nowarn:1659;1699 "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\ajaxenabledwebsite1\b9aefc02\e1a488f4\App_Web_calendar.aspx.cdcab7d2.emusxxlk.0.cs" "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\ajaxenabledwebsite1\b9aefc02\e1a488f4\App_Web_calendar.aspx.cdcab7d2.emusxxlk.1.cs"
Microsoft (R) Visual C# 2005 编译器 版本 8.00.50727.42
用于 Microsoft (R) Windows (R) 2005 Framework 版本 2.0.50727
版权所有 (C) Microsoft Corporation 2001-2005。保留所有权利。
c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\ajaxenabledwebsite1\b9aefc02\e1a488f4\App_Web_calendar.aspx.cdcab7d2.emusxxlk.0.cs(133,53): warning CS0108: “ASP.calendar_aspx.Profile”隐藏了继承的成员“Calendar.Profile”。如果是有意隐藏,请使用关键字 new。
c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\ajaxenabledwebsite1\b9aefc02\e1a488f4\assembly\dl3\cd3cb47a\66c806a1_77cac701\App_Web_4s8ptw59.DLL: (与前一个警告相关的符号位置)
c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\ajaxenabledwebsite1\b9aefc02\e1a488f4\App_Web_calendar.aspx.cdcab7d2.emusxxlk.0.cs(139,46): warning CS0108: “ASP.calendar_aspx.ApplicationInstance”隐藏了继承的成员“Calendar.ApplicationInstance”。如果是有意隐藏,请使用关键字 new。
c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\ajaxenabledwebsite1\b9aefc02\e1a488f4\assembly\dl3\cd3cb47a\66c806a1_77cac701\App_Web_4s8ptw59.DLL: (与前一个警告相关的符号位置)
c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\ajaxenabledwebsite1\b9aefc02\e1a488f4\App_Web_calendar.aspx.cdcab7d2.emusxxlk.0.cs(122,14): error CS0030: 无法将类型“ASP.calendar_aspx”转换为“System.Web.UI.WebControls.Calendar”
显示完整的编译源:
(略)
--------------------------------------------------------------------------------
版本信息: Microsoft .NET Framework 版本:2.0.50727.832; ASP.NET 版本:2.0.50727.832