|
.net
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Trap Data Tier Errors?I am using LINQ to SQL as the DAL to populate controls on the site. Either condition/message might appear when SQL Server is unavailable or the service is restarted. How can I trap them so I can display a graceful error message and automatically retry the connection in 10 seconds? Thanks. Error: Sys.WebForms.pageRequestManagerServerErrorException: A transport-level error has occurred when receiving results from the server. (provider: TCP Provider, error: 0 - The specified network name is no longer available.) Server Error in '/MyWeb' Application. A transport-level error has occurred when sending the request to the server. (provider: TCP Provider, error: 0 - An existing connection was forcibly closed by the remote host.) Hi,
I am sendu an recruiter from E*pro. Nice to have a glance every day in this community and its people. Happy to observe its concept and postings. I am working with a recruiting firm and recruiting people in various IT,Accounting,ITES and other domains. I need updated resume from people in Various parts of US. I can help them in getting a better oppurtinity in any field of their aspiration. Mail ur updated CV to: nse***@eprocorp.com Warm Regards, N.Sendu. E*pro. Hi,
>I have an ASP.NET Web Site that I would like to trap these conditions. A possible solution is to add a global.asax file in the project. Then add >I am using LINQ to SQL as the DAL to populate controls on the site. >Either condition/message might appear when SQL Server is unavailable >or the service is restarted. >How can I trap them so I can display a graceful error message and >automatically retry the connection in 10 seconds? following code: protected void Application_Error(object sender, EventArgs e) { if (Context.Error.InnerException is SqlException) { Response.Redirect("SqlErrorPage.aspx"); } //You can append Request.Url to the querystring so that on SqlErrorPage.aspx //you can write some JavaScript to redirect back to main page after 10 seconds. } In this way all the unhandled SqlException thrown in the application will be catched. Users will be redirected to an error page after the exception is thrown. You can also catch other exceptions per your requirement. Please let me know if it can solve this issue. If you have additional questions please don't hesitate to let me know. Regards, Allen Chen Microsoft Online Support Delighting our customers is our #1 priority. We welcome your comments and suggestions about how we can improve the support we provide to you. Please feel free to let my manager know what you think of the level of service provided. You can send feedback directly to my manager at: msd***@microsoft.com. ================================================== Get notification to my posts through email? Please refer to http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx#notifications. Note: MSDN Managed Newsgroup support offering is for non-urgent issues where an initial response from the community or a Microsoft Support Engineer within 2 business day is acceptable. Please note that each follow up response may take approximately 2 business days as the support professional working with you may need further investigation to reach the most efficient resolution. The offering is not appropriate for situations that require urgent, real-time or phone-based interactions. Issues of this nature are best handled working with a dedicated Microsoft Support Engineer by contacting Microsoft Customer Support Services (CSS) at http://msdn.microsoft.com/en-us/subscriptions/aa948874.aspx ================================================== This posting is provided "AS IS" with no warranties, and confers no rights. Hi,
Please take a look at the following discussion http://social.msdn.microsoft.com/Forums/en-US/linqtosql/thread/f02d4a10-a81b-436e-b850-073f2382b61d do let me know if it helps. regards, Joy Show quoteHide quote "SnapDive" wrote: > > I have an ASP.NET Web Site that I would like to trap these conditions. > I am using LINQ to SQL as the DAL to populate controls on the site. > > Either condition/message might appear when SQL Server is unavailable > or the service is restarted. > > > How can I trap them so I can display a graceful error message and > automatically retry the connection in 10 seconds? > > > Thanks. > > > > Error: Sys.WebForms.pageRequestManagerServerErrorException: A > transport-level error has occurred when receiving results from the > server. (provider: TCP Provider, error: 0 - The specified network name > is no longer available.) > > > Server Error in '/MyWeb' Application. > A transport-level error has occurred when sending the request to the > server. (provider: TCP Provider, error: 0 - An existing connection was > forcibly closed by the remote host.) > > > > > >
Other interesting topics
Using if on ASPX-side instead of in code behind
restrict number of users Calling Application_Start After Worker Process is Recycled Page refresh - Alternative to using frames á ÇáÅÓáÇã Úä ÇáÅÑåÇÈ¿ Redirect To Login Page - Forms Authentication Server.ScriptTimeout not being observed? How can the Login control stop authenticating? American and European Converted from Christianity to ISLAM Javascript question |
|||||||||||||||||||||||