我ScriptManager
在 ASP.NET 页面中使用:
<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
从那时起,每次我重建我的页面(加载程序集)时都会发生错误:
[FormatException: String was not recognized as a valid DateTime.]
System.DateTimeParse.Parse(String s, DateTimeFormatInfo dtfi, DateTimeStyles styles) +3624418
System.Windows.Forms.TypeLibraryTimeStampAttribute..ctor(String timestamp) +49
System.Reflection.CustomAttribute._CreateCaObject(RuntimeModule pModule, IRuntimeMethodInfo pCtor, Byte** ppBlob, Byte* pEndBlob, Int32* pcNamedArgs) +0
System.Reflection.CustomAttribute.CreateCaObject(RuntimeModule module, IRuntimeMethodInfo ctor, IntPtr& blob, IntPtr blobEnd, Int32& namedArgs) +46
System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeModule decoratedModule, Int32 decoratedMetadataToken, Int32 pcaCount, RuntimeType attributeFilterType, Boolean mustBeInheritable, IList derivedAttributes, Boolean isDecoratedTargetSecurityTransparent) +529
System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeAssembly assembly, RuntimeType caType) +103
System.Reflection.RuntimeAssembly.GetCustomAttributes(Boolean inherit) +33
System.Web.UI.AssemblyCache.GetAjaxFrameworkAssemblyAttribute(Assembly assembly) +76
System.Web.UI.ScriptManager.get_DefaultAjaxFrameworkAssembly() +399
System.Web.UI.ScriptManager..ctor() +26
ASP.usercontrols_asyncprocessingmonitor_ascx.__BuildControlScriptManager1() in d:\Developpement\Projects\CyberClasse\LNMManager\ManagementConsole\UserControls\AsyncProcessingMonitor.ascx:5
ASP.usercontrols_asyncprocessingmonitor_ascx.__BuildControlTree(usercontrols_asyncprocessingmonitor_ascx __ctrl) in d:\Developpement\Projects\CyberClasse\LNMManager\ManagementConsole\UserControls\AsyncProcessingMonitor.ascx:1
ASP.usercontrols_asyncprocessingmonitor_ascx.FrameworkInitialize() in d:\Developpement\Projects\CyberClasse\LNMManager\ManagementConsole\UserControls\AsyncProcessingMonitor.ascx.cs:912307
System.Web.UI.UserControl.InitializeAsUserControlInternal() +35
System.Web.UI.UserControl.InitializeAsUserControl(Page page) +14
ASP.provisioning_default_aspx.__BuildControlasyncProcessingMonitor1() in d:\Developpement\Projects\CyberClasse\LNMManager\ManagementConsole\Provisioning\default.aspx:124
ASP.provisioning_default_aspx.__BuildControlpnlProcessMonitor() in d:\Developpement\Projects\CyberClasse\LNMManager\ManagementConsole\Provisioning\default.aspx:123
ASP.provisioning_default_aspx.__BuildControlForm1() in d:\Developpement\Projects\CyberClasse\LNMManager\ManagementConsole\Provisioning\default.aspx:51
ASP.provisioning_default_aspx.__BuildControlTree(provisioning_default_aspx __ctrl) in d:\Developpement\Projects\CyberClasse\LNMManager\ManagementConsole\Provisioning\default.aspx:1
ASP.provisioning_default_aspx.FrameworkInitialize() in d:\Developpement\Projects\CyberClasse\LNMManager\ManagementConsole\Provisioning\default.aspx.cs:912308
System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +54
System.Web.UI.Page.ProcessRequest() +78
System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) +21
System.Web.UI.Page.ProcessRequest(HttpContext context) +49
ASP.provisioning_default_aspx.ProcessRequest(HttpContext context) in c:\Users\nba\AppData\Local\Temp\Temporary ASP.NET Files\managementconsole\6fc95b25\3fc34eab\App_Web_pm33amsb.2.cs:0
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +100
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75
刷新页面后,错误就会消失。我不明白这个错误。在许多论坛中,将System.Windows.Forms
程序集视为此错误的根源。这个程序集在我的网站项目中被引用,但我删除了它,错误仍然出现。
编辑
编辑 2
出色地。这是插入到asp.net页面中的用户控件的一些代码。
<asp:UpdatePanel ID="UpdatePanel1" runat="server" style="width:70%;" >
<ContentTemplate>
<asp:HiddenField ID="HiddenFieldProcessID" runat="server" />
<asp:HiddenField ID="HiddenFieldRedirectURL" runat="server" Value="" />
<asp:HiddenField ID="HiddenFieldRedirect" runat="server" Value="false" />
<asp:Timer ID="TimerStatusUpdate" runat="server" Interval="1000" OnTick="TimerStatusUpdateTick"></asp:Timer>
<br/><br/>
<div align="center"><asp:Image ID="ImageProgressGif" runat="server" ImageUrl="https://cms.unov.org/FullTextSearch/Common/Images/progress.gif" /></div>
<br/>
<table>
<tr>
<td style="width: 30%;">Label Text :
</td>
<td>
<b>
<asp:Label ID="LabelCurrent" runat="server"></asp:Label> / <asp:Label ID="LabelTotal" runat="server"></asp:Label>
</b>
<input id="inputpercentage" name="inputpercentage" type="text" runat="server" hidden="true"/>
<input type="hidden" runat='server' id="completed" value="" />
<br/>
</td>
</tr>
</table>
<table>
<tr>
<td>
<asp:label id="LabelExportInfo" runat="server" Width="100%" Visible="true" Font-Size="Small" ForeColor="#6666FF"></asp:label>
<asp:linkbutton id="LinkExportInfo" runat="server" Width="100%" Visible="true" OnClick="DownloadFile" Font-Size="Small"></asp:linkbutton>
</td>
</tr>
<tr>
<td>
<asp:Label ID="LabelPasswordChanged" runat="server" Font-Size="Small" ForeColor="Red"></asp:Label>
</td>
</tr>
</table>
</ContentTemplate>
</asp:UpdatePanel>
但是,正如我所说,堆栈跟踪和提供的主题显示的报告问题来自程序集(其“TypeLibraryTimeStampAttribute”属性更具体)。但是,我的观点是,我怎么知道它是关于哪个程序集的?
此外,按照主题中的建议,我已经删除了项目中对 System.Windows.Form 的引用,但没有结果。
编辑 3
一位同事在他的计算机上打开了该项目,构建并运行它,没有任何错误。他的一切都很好。所以,明确地说,这个问题在代码外部。我就像他岛上的约翰洛克:迷路了。
有什么线索吗?