“/”应用程序中的服务器错误。

无法将类型为“Eforces.Config.SiteConfigInfo”的对象强制转换为类型“Eforces.Config.CompanyConfigInfo”。

说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。

异常详细信息: System.InvalidCastException: 无法将类型为“Eforces.Config.SiteConfigInfo”的对象强制转换为类型“Eforces.Config.CompanyConfigInfo”。

源错误:


[没有相关的源行]

源文件: c:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\8fb52edd\4f9a569f\App_Web_73ubeiwx.46.cs    行: 0

堆栈跟踪:


[InvalidCastException: 无法将类型为“Eforces.Config.SiteConfigInfo”的对象强制转换为类型“Eforces.Config.CompanyConfigInfo”。]
   Eforces.Config.CompanyConfig.set_ConfigInfo(IConfigInfo value) +28
   Eforces.Config.CompanyConfig.LoadConfig() +42
   Eforces.Date.SqlServer.DLanmu..ctor() +38
   Eforces.Date.SqlServer.DNews.URL(String url, String lc, String dy, String dt, String filename, String extension, String link) +496
   Eforces.Date.SqlServer.DNews.GetLoop(String whe, String order, String newstable, Int32 pageindex, Int32 pagenum) +3746
   Eforces.Bll.BNews.GetLoop(String whe, String order, String newstable, Int32 pageindex, Int32 pagenum) +26
   Eforces.Components.VelocityHelper.GetNews(Int32 channelid, String lanmuid, Int32 images, Int32 showid, Int32 showcount, Int32 order, Int32 type, String kouzhanbig, String kouzhansml, Int32 newssta, Int32 curpage) +2075

[MethodInvocationException: Invocation of method 'GetNews' in  Eforces.Components.VelocityHelper threw exception System.InvalidCastException : 无法将类型为“Eforces.Config.SiteConfigInfo”的对象强制转换为类型“Eforces.Config.CompanyConfigInfo”。]
   NVelocity.Runtime.Parser.Node.ASTMethod.Execute(Object o, IInternalContextAdapter context) +2237
   NVelocity.Runtime.Parser.Node.ASTReference.Execute(Object o, IInternalContextAdapter context) +854
   NVelocity.Runtime.Parser.Node.ASTReference.Value(IInternalContextAdapter context) +64
   NVelocity.Runtime.Directive.Foreach.GetIterator(IInternalContextAdapter context, INode node) +104
   NVelocity.Runtime.Directive.Foreach.Render(IInternalContextAdapter context, TextWriter writer, INode node) +97
   NVelocity.Runtime.Parser.Node.ASTDirective.Render(IInternalContextAdapter context, TextWriter writer) +130
   NVelocity.Runtime.Parser.Node.SimpleNode.Render(IInternalContextAdapter context, TextWriter writer) +105
   NVelocity.Template.Merge(IContext context, TextWriter writer) +260
   Eforces.Components.VelocityStatic.createTemplateFromFile(String tempAbsPath, Hashtable parameters) +301
   Eforces.Web.index.ShowPage() +3914
   Eforces.Components.WebPage..ctor() +910
   Eforces.Web.index..ctor() +4
   ASP.aspx_index_aspx..ctor() in c:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\8fb52edd\4f9a569f\App_Web_73ubeiwx.46.cs:0
   __ASP.FastObjectFactory_app_web_73ubeiwx.Create_ASP_aspx_index_aspx() in c:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\8fb52edd\4f9a569f\App_Web_73ubeiwx.59.cs:0
   System.Web.Compilation.BuildResultCompiledType.CreateInstance() +32
   System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath virtualPath, Type requiredBaseType, HttpContext context, Boolean allowCrossApp, Boolean noAssert) +119
   System.Web.UI.PageHandlerFactory.GetHandlerHelper(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath) +33
   System.Web.UI.PageHandlerFactory.GetHandler(HttpContext context, String requestType, String virtualPath, String path) +37
   System.Web.MaterializeHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +307
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +155


版本信息: Microsoft .NET Framework 版本:2.0.50727.5420; ASP.NET 版本:2.0.50727.5420