Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ASP.NET - Common Gotchas [closed]

Tags:

c#

asp.net

vb.net

When I am working with ASP.NET, I find that there are always unexpected things I run into that take forever to debug. I figure that having a consolidated list of these would be great for those "weird error" circumstances, plus to expand our knowledge of oddness in the platform.

So: answer with one of your "Gotcha"s!

I'll start: Under ASP.NET (VB), performing a Response.Redirect inside a try/catch block does not stop execution of the current Response, which can lead to two concurrent Responses executing against the same Session.

like image 482
Thunder3 Avatar asked Sep 15 '08 19:09

Thunder3


People also ask

Why is My ASP.NET site so slow?

An IIS or ASP.NET hang can cause your website to have slow page loads, timeouts, or 503 Service Unavailable errors. Hangs can be caused by blocked ASP.NET threads, bad configuration, or request queueing.

How does ASP.NET handle application level errors?

You can handle default errors at the application level either by modifying your application's configuration or by adding an Application_Error handler in the Global. asax file of your application. You can handle default errors and HTTP errors by adding a customErrors section to the Web. config file.

Why ASP NET core is faster?

NET Core is faster than . NET Framework because the architecture of . NET Core is written or restructured from scratch to make it a modular, lightweight, fast, and cross-platform Framework. The Applications require technologies like workflow, webforms or WCF that are not present in .

How does ASP NET core handle multiple requests?

ASP.NET Core apps should be designed to process many requests simultaneously. Asynchronous APIs allow a small pool of threads to handle thousands of concurrent requests by not waiting on blocking calls. Rather than waiting on a long-running synchronous task to complete, the thread can work on another request.


1 Answers

Don't dynamically add controls after the page init event as it will screw up the viewstate tree.

like image 115
Bob Dizzle Avatar answered Oct 23 '22 10:10

Bob Dizzle