Wednesday, April 27, 2011

Giving Precedence to a Specific Asynchronous Postback

http://msdn.microsoft.com/en-us/library/bb386456.aspx

Sharepoint-Training 04/27/2010

mhacker@microsoft.com
http://blog.mikehacker.net

Sharepoint 2010 has cool features :)

Sharepoint Connections in Server Explorer to browse through sharepoint site ..

Event Receivers ... can write custom code to events thats happening inside sites ..

Web Parts ..

It is like developing a user control and using that control in a web page... here we develop a user control and deploy it in sharepoint sites.. Its like developing a normal web app .. sharepoint only supports .net 3.5 and 64 bit :)

Sharepoint Governance:


1) Someone has a need or concern about the service
2) That need is assessed against several things
 

Friday, April 15, 2011

Logging in .NET Applications

Logging is very common functionality that needs to be implemented across applications. The main concept for logging is it is common across many applications i.e. the logging remains same across applications. I was missing this idea until i read this article about logging.

"Ideally, the logging functionality would be logically and physically separate from the functionality of each individual page, and adding it to another site would be as simple as dropping an assembly in the site's /bin directory."

Until today i used to use two classes called Errorlog and ErrorLogDB which are the BO and DAO for the logging. I used to copy this classes to any new application i make. I used to write this code in catch block  in every function in every code behind and every method of BL and DAL classes


Old bad way of logging :

catch (Exception ex)
{
    ErrorLog er = new ErrorLog(ex, "functionname""classname");
    ErrorLogDB.Persist(er);
}


. Now i realize how wrong this approach is.

Ok !! Never Late than Never. Lets learn the better way :)



ELMAH: Error Logging Modules And Handlers



Adding ELMAH to an ASP.NET Web Application


Learning about HTTP handlers and Modules

A Brief Overview of HTTP Handlers and Modules


An HTTP handler is a class that is responsible for rendering a particular type of resource. For example, the code-behind class for an ASP.NET Web page is an HTTP handler, knowing how to render the markup for the particular Web page. It helps to think about handlers as specialized renderers that know how to create the markup for a particular type of resource.


An HTTP module is a class that can tap into the various events raised as a request passes through stages of its lifecycle on the server. One such ASP.NET application event is the Error event, which fires when an unhandled exception occurs



URL Rewriting

URL Rewriting in ASP.NET