我在Global.asax.cs
文件错误陷阱中添加到我的.net应用程序中
void Application_Error(object sender, EventArgs e)
{
HttpUnhandledException httpUnhandledException = new
HttpUnhandledException(Server.GetLastError().Message, Server.GetLastError());
SystemFunctions.SendEmailWithErrors(httpUnhandledException.GetHtmlErrorMessage());
}
当我运行我的应用程序时,我在下面的Designer.Cs函数中获得了一个非法字符路径异常。
public OptionsEntities() : base("name=OptionsEntities", "OptionsEntities")
{
this.ContextOptions.LazyLoadingEnabled = true;
OnContextCreated();
}
如果我继续使用该应用程序继续。如果我从Global.asax.cs中删除代码块,则错误消失。关于这可能来自哪里的任何想法?
答案 0 :(得分:0)
尝试替换“name = Options Entities”,“Options Entities”可能会帮助您