无效的对象名称:数据库对象不再存在

时间:2014-07-30 17:53:39

标签: c# entity-framework asp.net-mvc-4

我正在处理3个项目 - MVC4网站 - HTTP处理程序 - 实体框架数据层

基本上,您必须在网站上填写表格,将其转换为XML,将其发送给返回XML的处理程序,网站处理响应。两个应用程序都使用数据层库来更新数据库。

我一直在运行localy的处理程序和运行IIS8的Web服务器上进行远程测试。我放在网络服务器上的第一个版本正常运行。然后我不得不更新数据层库,现在我得到了"无效的对象名称"错误。

问题是,对象anme是一个在我的数据层项目中不再存在的表名,这对我来说真的听起来很奇怪。

我检查了所有可能的东西 - 连接字符串没问题 - 数据库的权利是可以的 - 处理程序的DLL达到了dae - 图书馆' dll是最新的

我甚至停止并重新启动了我的处理程序所在的应用程序池。即使是现在我再次使用运行localy的处理程序再次尝试它并且它工作正常,只有在远程服务器上调用处理程序时才会发生错误,并且只是因为我对数据层库进行了更改。

我认为唯一可能的原因是,某些地方有某些我不知道的东西被缓存。

这里是堆栈跟踪,尽管我没有在其中找到任何有用的信息

at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
   at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
   at System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()
   at System.Data.SqlClient.SqlDataReader.get_MetaData()
   at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
   at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean asyncWrite)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
   at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
   at System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior)
   at System.Data.Entity.Infrastructure.Interception.InternalDispatcher`1.Dispatch[TTarget,TInterceptionContext,TResult](TTarget target, Func`3 operation, TInterceptionContext interceptionContext, Action`3 executing, Action`3 executed)
   at System.Data.Entity.Infrastructure.Interception.DbCommandDispatcher.Reader(DbCommand command, DbCommandInterceptionContext interceptionContext)
   at System.Data.Entity.Core.EntityClient.Internal.EntityCommandDefinition.ExecuteStoreCommands(EntityCommand entityCommand, CommandBehavior behavior)

0 个答案:

没有答案