VB.NET

Moderators: seancampbell
Number of threads: 4020
Number of posts: 10026

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
Server Error in VB.NET Posted by nneoma on 15 Jan 2007 at 4:48 AM
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:\Inetpub\wwwroot\MyLibraryVB\ApplicationGlobalFunctions.vb Line: 38

Stack Trace:


[SqlException: General network error. Check your network documentation.]
MyLibraryVB.MyLibraryVB.ApplicationGlobalFunctions.checkUserLogin(String username, String password) in C:\Inetpub\wwwroot\MyLibraryVB\ApplicationGlobalFunctions.vb:38
MyLibraryVB.WebForm1.btnSignOn_Click(Object sender, EventArgs e) in C:\Inetpub\wwwroot\MyLibraryVB\SignOn.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)
System.Web.UI.Page.ProcessRequestMain()



Report
Re: Server Error in VB.NET Posted by rlc on 15 Jan 2007 at 8:02 AM
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(http://weblogs.asp.net/pleloup/archive/2003/07/23/10451.aspx). 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.


~rlc




 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.