开发者

Object reference not set to an instance of an object-datacontext

I am trying to publish asp.net mvc site on re开发者_开发百科mote server I am getting the error as shown in figure. Any idea

Object reference not set to an instance of an object-datacontext


I solved it the problem was that in the designer file connection name was different then that of web.config. Once both name are same it started running fine.


Any chance you could post a larger scale of the image, the stack trace is very tricky to read.

As a guess, it looks like the exception is being raised in the database context area of code - possibly Entity Framework??

First, have a look at the Models.EvloetDatabaseContext constructor - is there anything in there that might cause the null reference exception?

You could put some Trace.WriteLine calls in that method and use a tool such as DebugView to see how many of those messages are being sent out. I use his often when debugging issues on a client's server.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜