I am trying to publish asp.net mvc site on re开发者_开发百科mote server I am getting the error as shown in figure. Any idea
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.
精彩评论