Posts

How to Capture StoredProcedure Errors into Application

Recently I have been working on data access layer and wondering how to capture raise errors of stored procedure. I realized we can't capture stored procedure error if dataset being used in application. In order to capture stored procedure error, application should use Data Reader instead of Data Adapter. Ref: http://support.microsoft.com/kb/811482 Thanks, -Venu.

Basic steps to develop mobile App

http://www.asp.net/whitepapers/add-mobile-pages-to-your-aspnet-web-forms-mvc-application

Authenticate User using FaceBook/Google using OpenAuth

http://blogs.msdn.com/b/webdev/archive/2012/09/12/integrate-openauth-openid-with-your-existing-asp-net-application-using-universal-providers.aspx http://blogs.msdn.com/b/webdev/archive/2012/08/22/extra-information-from-oauth-openid-provider.aspx

WCF REST Client Console App

The following is the console client, which consumes Rest Service:   using System.Net; using System.IO;   static void RestCall()         {             string baseUri = http://localhost:33987/MyService.svc/GetData/10 ;             HttpWebRequest req = WebRequest .Create(baseUri) as HttpWebRequest ;             HttpWebResponse resp = req.GetResponse() as HttpWebResponse ;             var response = resp.GetResponseStream();             try             {                 StreamReader streamReader = new StreamRead...

WCF REST 400 Bad Request

Today while I was writing my WCF Rest Client, I was getting error as "400 Bad Request". Finally I realized the culprit of error was service name in web.config file. In order to resolve this error, make sure service name is matching with your service markup's service name. If you have servicename1.svc, right click on that file and select "View MarkUp". Copy Service value from that and paste it into webconfig's services service name. Service1.svc MarkUp: <% @ ServiceHost Language ="C#" Debug ="true" Service ="MyServiceNameSpace.Service1" CodeBehind ="Service1.svc.cs" %> Web.config Services Section: < services >    < service name = " MyServiceNameSpace.Service1 " >      < endpoint address = "" behaviorConfiguration = " restService "            contract = " MyServiceNameSpace.IService1 " binding = ...

Reset user settings on Visual Studio

Sometimes we might have created connection strings with different environments and don't want to save in entity framework wizard. Today I realized we can't modify/delete individual connection string from wizard. In order to delete saved connection strings from wizard we need to reset the user data. You can run the following command to reset user data on Visual studio: 1) Open Command Prompt 2) Goto C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE 3) Run devenv/resetuserdata It clears your profile  Visual studio settings and you can start creating new connection strings, which will be saved into your profile again.

Windows 8 and the future of XAML

http://www.silverlightshow.net/items/Windows-8-and-the-future-of-XAML-Part-1-An-overview-of-the-Windows-8-platform.aspx