Server Error in VB.NET - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Server Error in VB.NET

nneomanneoma Posts: 61Member
i tried to run a VB.NET web application and got the error below when it tried to connect to a database. however, with the same connection string, i can connect to the database when running a windows application.what could the problem be?

Server Error in '/MyLibraryVB' Application.

General network error. Check your network documentation.
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.Data.SqlClient.SqlException: General network error. Check your network documentation.

Source Error:

Line 36:
Line 37: Catch ex As Exception
Line 38: Throw ex
Line 39: End Try
Line 40: End Function

Source File: C:InetpubwwwrootMyLibraryVBApplicationGlobalFunctions.vb Line: 38

Stack Trace:

[SqlException: General network error. Check your network documentation.]
MyLibraryVB.MyLibraryVB.ApplicationGlobalFunctions.checkUserLogin(String username, String password) in C:InetpubwwwrootMyLibraryVBApplicationGlobalFunctions.vb:38
MyLibraryVB.WebForm1.btnSignOn_Click(Object sender, EventArgs e) in C:InetpubwwwrootMyLibraryVBSignOn.aspx.vb:41
System.Web.UI.WebControls.Button.OnClick(EventArgs e)
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)


  • rlcrlc Posts: 448Member
    Is the DB on the same machine? I have had that error in the past, but not in a reproducable fashion. From what I saw online it seems to happen for many reasons none of which anyone can explain well, nor can verify any of them( Most likly it is your environment and not the code itself. I might try to unistall/reinstall SQL and make sure to give an instance name instead of leaving that blank(if it is blank now). Also, if you are not going to do anything with the exception in your catch statement, then remove the catch. Re-throwing it just uses resources for no reason.


Sign In or Register to comment.