asp.net网站移植问题
现在的情况是,一台机器是数据库服务器A,一台是Web服务器B,还有我自己的开发机器C,我在C上开发好了一个网站,数据库连接的是A,然后想移植到B上,但是出错。错误提示:
Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[NullReferenceException: Object reference not set to an instance of an object.]
jianzhi.WebForm1.Page_Load(Object sender, EventArgs e) +50
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +731
我自己查看了一下,好像是只要有数据库连接的页面都无法打开,都提示是Object reference not set to an instance of an object. 我自己把数据库连接封装了一下,写道dll里面了,请问是这个dll出错了么?我在C上连接A是好的啊,为什么在B上连接A却不行?