Skip to main content

Posts

Showing posts from 2010

LINQ - some useful links

I have mentioned below some useful links on LINQ. http://weblogs.asp.net/scottgu/archive/2007/05/19/using-linq-to-sql-part-1.aspx http://weblogs.asp.net/scottgu/archive/2006/08/27/Slides-_2B00_-Samples-Posted-from-my-TechEd-LINQ-Talk.aspx http://blogs.msdn.com/b/ukadc/archive/2010/04/27/what-on-earth-is-a-lambda-expression.aspx Hope this helps.

Find Cultureinfo and RegionInfo from browser in ASP.NET

Get language and country from a browser in ASP.NET by Mads Kristensen I recently had the challenge of retrieving a country based on the browser language. It was used to pre-select a country in a drop down list so the user didn’t have to. I knew it wasn’t going to be 100% accurate but probably more like 80-90%. That’s because some people change the browser language instead of their native language and others use a non-ISO standard language. And last, some clients just don’t send language information. It wasn’t an option to use a database that mapped IP addresses to countries, so the country had to be resolved from the browser alone. Resolve the culture I decided to split the functionality up into two methods. The first one resolves the CultureInfo based on the browsers language.   public static CultureInfo ResolveCulture() {   string [] languages = HttpContext .Current.Request.UserLanguages;     if (languages == null || languages.Length == 0 )     return nul

Receiving and processing a SOAP header

The basic steps to receiving and processing a SOAP header are: Create a class deriving from SoapHeader representing the data passed in the SOAP header. Add a member to the XML Web service class or XML Web service client proxy class of the type created in step 1. Apply a SoapHeaderAttribute to the XML Web service method or the corresponding method in the proxy class, specifying the member created in step 2 in the MemberName property. Within the XML Web service method or XML Web service client code, access the MemberName property to process the data sent in the SOAP header. [from msdn ]

This project is not supported by this type of installation.

Hi, Have you ever got this error "This project is not supported by this type of installation" while try to create a new project in VS 2008. If you have got this then here is simple solution (to try ) which would solve the issue. From the Start - > Run type devenv /ResetSkipPkgs and press enter. Now you see a new instance of VS 2008 IDE opened without any error. So what was the issue? While you open the VS 2008, it might have failed to load the necessary packages which are required to open some project templates. When you use the above mentioned switch it actually finds a package which was new / not loaded previously and load that packages and the error doesn't appear now. :)