AllExperts > Experts 
Search      

VB.NET

Volunteer
Answers to thousands of questions
 Home · More Questions · Answer Library  · Encyclopedia ·
More VB.NET Answers
Question Library

Ask a question about VB.NET
Volunteer
Experts of the Month
Expert Login

Awards

About Us
Tell friends
Link to Us
Disclaimer

 
 
 
 
About Syed Rizwan Muhammad Rizvi
Expertise
I can answers questions regarding web based and desktop based programming in VB.Net. Which can include SOAP, XML, Custom Controls, COM Interoperability etc.

Experience
Have been working in this specific area for last 2 years previously I was a VB 6 Developer with experties in other languages as well. Total 10 years of programming experience.

 
   

You are here:  Experts > Computing/Technology > Basic > VB.NET > Regrding Error in ASP.Net

Topic: VB.NET



Expert: Syed Rizwan Muhammad Rizvi
Date: 1/24/2007
Subject: Regrding Error in ASP.Net

Question
I have got this error .pls help


error is as follows:

Server Error in '/webpdms' Application.
--------------------------------------------------------------------------------

An error has occurred while establishing a connection to the server.  When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)
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: An error has occurred while establishing a connection to the server.  When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)

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:


[SqlException (0x80131904): An error has occurred while establishing a connection to the server.  When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)]
  System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +437
  System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +82
  System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +105
  System.Data.SqlClient.SqlConnection.Open() +111
  webpdms.WbfrmEntered.Getreport() in C:InetpubwwwrootwebpdmsWbfrmEntered.aspx.vb:77
  webpdms.WbfrmEntered.Page_Load(Object sender, EventArgs e) in C:InetpubwwwrootwebpdmsWbfrmEntered.aspx.vb:61
  System.Web.UI.Control.OnLoad(EventArgs e) +99
  System.Web.UI.Control.LoadRecursive() +47
  System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1061



-------------------------------------------
The text above is a follow-up to ...

-----Question-----
I have 48 users .When they all use the application it becomes slow and give this error .COuld you pls pls Tell me Remedy
error is :

Server Error in '/webpdms' Application.
--------------------------------------------------------------------------------

Runtime Error
Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.

Details: To enable the details of this specific error message to be viewable on remote machines, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "Off".


<!-- Web.Config Configuration File -->

<configuration>
   <system.web>
       <customErrors mode="Off"/>
   </system.web>
</configuration>


Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's <customErrors> configuration tag to point to a custom error page URL.


<!-- Web.Config Configuration File -->

<configuration>
   <system.web>
       <customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/>
   </system.web>
</configuration>



-----Answer-----
in your web.config file which you can find in the webpdms folder you need to search for <customErrors> tag and then set its mode property to Off remember its case sensitive.

After you set it to off the next time it will show you the complete error details copy and paste it to me only then I can tell you how to fix it.

Answer
If the site works perfectly for a specific no. of users and fails with this error after it reaches a limit then it appears that the SQL Server that you are using either becomes un-responsive or is limited to server only a specific number of connections. Go to sql server properties and check connection settings, try to over load it with a desktop application with lots of connections to see when it starts to fail.

Regards,
Rizwan

Add to this Answer    Ask a Question



  Rate this Answer
   Was this answer helpful?
Not at allDefinitely              
   12345  

     
About Us | Advertise on This Site | User Agreement | Privacy Policy | Help
Copyright  © 2008 About, Inc. About and About.com are registered trademarks of About, Inc. The About logo is a trademark of About, Inc. All rights reserved.