.NET new install
I've just been given the task of getting a previously working version of an .NET application on an IIS server working in a new environment. Two problems, I'm new to .NET and I don't have access to the working .NET application on the other server.
The previous guy managed to port it across but came across an error which he couldn't resolve in the time given. The error is listed below:
An existing connection was forcibly closed by the remote host
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.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host
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:
[SocketException (0x2746): An existing connection was forcibly closed by the remote host]
System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg) +1734594
System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type) +826
MMOCore.BusinessObjects.IUserBiz.DatabaseAvailable() +0
WebUserControl.Page_Init(Object sender, EventArgs e) +44
System.Web.UI.Control.OnInit(EventArgs e) +2117356
System.Web.UI.UserControl.OnInit(EventArgs e) +96
System.Web.UI.Control.InitRecursive(Control namingContainer) +321
System.Web.UI.Control.InitRecursive(Control namingContainer) +198
System.Web.UI.Control.InitRecursive(Control namingContainer) +198
System.Web.UI.Control.InitRecursive(Control namingContainer) +198
System.Web.UI.Control.InitRecursive(Control namingContainer) +198
System.Web.UI.Page.ProcessRequestMain(Boolean includeStag开发者_如何学编程esBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +692
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.832; ASP.NET Version:2.0.50727.832
Any help in pointing me in the right direction would be gratefully received.
I'd focus initial debugging efforts at this line in the stack trace:
MMOCore.BusinessObjects.IUserBiz.DatabaseAvailable()
- Is that a third party library, or code you can debug into?
- Is the database available?
Could be as simple as a configuration setting (connection string, perhaps) which got missed in moving the application to a new environment.
It looks like it's happening within the Page_Init
of a user control that's on the page being requested. So it's likely (but not guaranteed) that it's not happening on a line of code, but rather on just the standard initialization of a control. Maybe the user control in question is the third party library? Or maybe the page has a user control which contains a reference to the third party library?
The only thing I can conclude with the provided information is that something goes wrong connecting to the database, on this line:
MMOCore.BusinessObjects.IUserBiz.DatabaseAvailable() +0
Is your connection string correct?
精彩评论