【问题标题】:Namespace exception命名空间异常
【发布时间】:2009-07-15 16:15:41
【问题描述】:

我在 Fasthosts 托管的网站上遇到以下异常。它只是最近才开始,并通过编辑 web.config 来解决,从而回收应用程序。问题是它每两周左右就会回来一次。有什么想法吗?

异常详细信息:System.ArgumentException:给定名称“NHSSBS”与集合对象中具有不同命名空间的至少两个名称匹配。

来源错误:

第 32 行:字符串 pageDatabasePath = SiteStructure.GetDatabasePath(Request.AppRelativeCurrentExecutionFilePath); 第 33 行: 第 34 行:SubSonic.Query 查询 = new SubSonic.Query("Metatag"); 第 35 行:query.QueryType = SubSonic.QueryType.Select; 第 36 行:query.WHERE("Path", pageDatabasePath);

源文件:e:\DOMAINS\s\sbs.nhs.uk\user\htdocs\UserControls\HTMLHead.ascx.cs 行:34

堆栈跟踪:

[ArgumentException:给定名称“NHSSBS”与集合对象中具有不同命名空间的至少两个名称匹配。] System.Data.DataTableCollection.get_Item(字符串名称)+1770251 SubSonic.SqlDataProvider.GetTableSchema(String tableName, TableType tableType) 在 C:\Program Files\SubSonic\SubSonic 2.0.3\src\SubSonic\DataProviders\SqlDataProvider.cs:430 SubSonic.DataService.GetSchema(String tableName, String providerName, TableType tableType) 在 C:\Program Files\SubSonic\SubSonic 2.0.3\src\SubSonic\DataProviders\DataService.cs:426 C:\Program Files\SubSonic\SubSonic 2.0.3\src\SubSonic\DataProviders\DataService.cs:440 中的 SubSonic.DataService.GetTableSchema(String tableName, String providerName) SubSonic.Query.BuildTableSchema(String tableName, String providerName) 在 C:\Program Files\SubSonic\SubSonic 2.0.3\src\SubSonic\Sql Tools\Query.cs:497 C:\Program Files\SubSonic\SubSonic 2.0.3\src\SubSonic\Sql Tools\Query.cs:492 中的 SubSonic.Query.BuildTableSchema(String tableName) C:\Program Files\SubSonic\SubSonic 2.0.3\src\SubSonic\Sql Tools\Query.cs:651 中的 SubSonic.Query..ctor(String tableName) e:\DOMAINS\s\sbs.nhs.uk\user\htdocs\UserControls\HTMLHead.ascx.cs:34 中的 UserControls_HTMLHead.SetupMetatags() UserControls_HTMLHead.Page_Load(Object sender, EventArgs e) in e:\DOMAINS\s\sbs.nhs.uk\user\htdocs\UserControls\HTMLHead.ascx.cs:27 System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp,对象 o,对象 t,EventArgs e)+14 System.Web.Util.CalliEventHandlerDelegateProxy.Callback(对象发送者,EventArgs e)+35 System.Web.UI.Control.OnLoad(EventArgs e) +99 System.Web.UI.Control.LoadRecursive() +50 System.Web.UI.Control.LoadRecursive() +141 System.Web.UI.Control.LoadRecursive() +141 System.Web.UI.Control.LoadRecursive() +141 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627

【问题讨论】:

    标签: subsonic


    【解决方案1】:

    我猜你的 /bin 中有重复的 DLL,但名称不同。

    【讨论】:

    • 感谢 Rob,您为我指明了一个好的方向,我可能已经修复了它。非常感谢伙计。
    • 您的解决方法是什么?我在一个旧应用程序上遇到了完全相同的问题,我更愿意在没有在我的开发机器上设置它来解决它的情况下解决它......