首页 新闻 会员 周边 捐助

Ef连接Mysql ,本地正常,服务器上“未将对象引用设置到对象的实例。”

0
[已关闭问题]

Ef连接Mysql ,本地正常,服务器上“未将对象引用设置到对象的实例。”我根据服务器的目录,级别,用IIS在本地建立了相对应的路径,然后在本地测试,本地可以正常运行,但是放到服务器就出错了, 这问题研究了好久了,求高手帮忙!

堆栈跟踪:

[NullReferenceException: 未将对象引用设置到对象的实例]
   MySql.Data.MySqlClient.MySqlPacket.ReadString() +106
   MySql.Data.MySqlClient.MySqlStream.ReadPacket() +118
   MySql.Data.MySqlClient.NativeDriver.Open() +390
   MySql.Data.MySqlClient.Driver.Create(MySqlConnectionStringBuilder settings) +48
   MySql.Data.MySqlClient.MySqlPool.CreateNewPooledConnection() +11
   MySql.Data.MySqlClient.MySqlPool.GetPooledConnection() +190
   MySql.Data.MySqlClient.MySqlPool.TryToGetDriver() +129
   MySql.Data.MySqlClient.MySqlPool.GetConnection() +106
   MySql.Data.MySqlClient.MySqlConnection.Open() +293
   System.Data.EntityClient.EntityConnection.OpenStoreConnectionIf(Boolean openCondition, DbConnection storeConnectionToOpen, DbConnection originalConnection, String exceptionCode, String attemptedOperation, Boolean& closeStoreConnectionOnFailure) +176
   System.Data.EntityClient.EntityConnection.Open() +88
   System.Data.Objects.ObjectContext.EnsureConnection() +83
   System.Data.Objects.ObjectQuery`1.GetResults(Nullable`1 forMergeOption) +47
   System.Data.Objects.ObjectQuery`1.System.Collections.Generic.IEnumerable<T>.GetEnumerator() +45
   System.Linq.Enumerable.FirstOrDefault(IEnumerable`1 source) +203
   System.Data.Objects.ELinq.ObjectQueryProvider.<GetElementFunction>b__1(IEnumerable`1 sequence) +40
   System.Data.Objects.ELinq.ObjectQueryProvider.ExecuteSingle(IEnumerable`1 query, Expression queryRoot) +60
   System.Data.Objects.ELinq.ObjectQueryProvider.System.Linq.IQueryProvider.Execute(Expression expression) +109
   System.Linq.Queryable.FirstOrDefault(IQueryable`1 source) +269
   InfoRelease.CourseSysCms._default.Page_Load(Object sender, EventArgs e) +488
   System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35
   System.Web.UI.Control.OnLoad(EventArgs e) +99
   System.Web.UI.Control.LoadRecursive() +50
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627

问题补充: 怎么没有人啊, 很急啊~~~谢谢了!
Richard Law的主页 Richard Law | 初学一级 | 园豆:0
提问于:2009-10-23 14:41
< >
分享
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册