Skip to main content

Posts

Showing posts with the label WCF

Trying to make sense of REST (over HTTP)

People who come from WCF/ Web Services background and  transition to RESTish type communication infrastructure make mistakes that follow a common pattern. I have seen it with people who are new to REST and with people who have spent some time working with RESTful services. (Throughout the post where every I mention REST I mean REST over HTTP)  The common misconceptions  are Not understanding the difference between HTTP POST and GET, in fact having too little or no clue about HTTP Verbs. For most devs interaction with server involves calling a client proxy method, handling the request on server, sending a response back from server, handling the response on client. This abstraction means no one knows what happens at infrastructure level. When programming for HTTP one cannot ignore the abstraction, else we cannot take full advantage of the medium. The manifestation of the above affect is, either every call becomes a POST or every call becomes a GET. When every...

Integrate ELMAH with WCF and Azure

I recently integrated ELMAH (Error Logging Modules and Handlers) with our Azure application. ELMAH is an excellent error logging and reporting libary available for ASP.Net. We used ELMAH for logging all unhandled service exceptions in WCF and ASP.Net. While there is information available on internet about how to integrate these technologies, data is scattered in bits and pieces. My aim through this blog post is to details the steps required for integration. The scenario of usage is, we wanted to log all unhandled exception thrown by our WCF service layer in a database which in our case was SQL Azure. Once done we could easily navigate to the the elmah default url to get a nice report on what errors were being generated by the application. Had it been a typical ASP.Net application, integrating ELMAH is a piece of cake. But since we were working on a Azure web deployment with SQL Azure as the backend some tweaks were necessary. Here are the things to do to get ELMAH fully functional in...