• Wriju's BLOG

    C# 3.0 Enhancements: Expression Trees (recording)


    I have discussed about the Expression Trees in my previous blog at C# 3.0 Enhancements: Expression Trees. I have done a small recording on that showing the demo there. I have uploaded that to MSN Soapbox and you can find that here.


    Video: CSharp 3.0 Expression Trees 



  • Wriju's BLOG

    C# 3.0 Enhancements: Expression Trees


    Expression Tree is the feature which enables us to write function which can be complied on-demand basis. It stores the function in form of structured data rather than executable code. Since this is structured we can easily iterate through it anytime. This is easier than finding something in IL.


    Let’s suppose if you have code like


    Func<int, int> f = x => x * 5;



    and you execute it. This will execute normally.


    But what if you want to store the whole function body in IL and compile as and when required. Then the above code look little different.


    Expression<Func<int, int>> e = x => x * 5;


    Now you cannot execute expression like function. But you can see the body of the expression in Expression Tree Visualizer. To use Expression you need to use the namespace System.Linq.Expressions


    So if you use the code like




    The output will look like, x => (x * 5) instead of some kind of perfect integer values. Now if you want to use the function written there in Expression Tree you need little different approach,


    var f = e.Compile();



    Compile statement will compile the IL code and your function will be ready for execution.


    If you want to write your own Expression instead of using the Expression <> to convert the delegate to function call, .NET allows us to do that. The Expression representation of the above f = x => x * 5; will look like


    ParameterExpression x = Expression.Parameter(typeof(int), "x");

    Expression body = Expression.Multiply(x, Expression.Constant(5));

    Expression<Func<int, int>> e = Expression.Lambda<Func<int, int>>(body, x);




    This happens exactly when you use SQL statement and execute it SQL Server database. Internally it creates functions and send to the compiler, then compiler compiles the code during the execution. Various rules engine like BizTalk uses this concept.


    Now if you put a break point on e and hover over it during debug you can get the Expression Tree out of it.



    I am loving itJ





  • Wriju's BLOG

    Visual Studio Codename Orcas Beta Documentation


    Find MSDN documentation for more information.

    Visual Studio
    Visual Studio Team System


    Thanks and enjoy.



  • Wriju's BLOG

    Linq to Object: Play with OS Component



    Linq not only allows us to work with .NET objects but also gives us the power to play with OS components like EventLog, Registry, Processes etc. If you plan to develop tool which will monitor the system process activities and will notify admin if there is any unpredictable things happening. It is all about writing your own admin tool.

    You need to have using System.Diagnostics on top of your page.


    In Orcas Beta 1 code looks like,


    var ProcessQuery = from p in Process.GetProcesses()

                       orderby p.PagedMemorySize64 descending

                       select new {

    Name = p.ProcessName,

    Size = p.PagedMemorySize64



    foreach (var aa in ProcessQuery)


        Console.WriteLine(" [ " + aa.Size + " ] " + aa.Name);



    I love LINQ. It is ……….


    And the output is….


     [ 62271488 ] devenv

     [ 40300544 ] sqlservr

     [ 39219200 ] svchost

     [ 28323840 ] CSharp3_23Apr.vshost

     [ 16941056 ] CcmExec

     [ 16150528 ] InoTask

     [ 15310848 ] winlogon

     [ 15220736 ] InoRT

     [ 9261056 ] explorer

     [ 8540160 ] lsass

     [ 6107136 ] inetinfo

     [ 4919296 ] InoRpc

     [ 4702208 ] services

     [ 4599808 ] spoolsv

     [ 4210688 ] wmiprvse

     [ 3592192 ] svchost

     [ 3072000 ] svchost

     [ 3031040 ] winlogon

     [ 2322432 ] svchost

     [ 2064384 ] wmiprvse

     [ 1810432 ] csrss

     [ 1572864 ] GrooveMonitor

     [ 1568768 ] svchost

     [ 1531904 ] wdfmgr

     [ 1486848 ] rdpclip

     [ 1441792 ] igfxtray

     [ 1355776 ] alg

     [ 1142784 ] FwcAgent

     [ 1081344 ] FwcMgmt

     [ 942080 ] sqlbrowser

     [ 933888 ] sqlwriter

     [ 929792 ] ctfmon

     [ 741376 ] csrss

     [ 385024 ] logon.scr

     [ 155648 ] smss

     [ 0 ] System

     [ 0 ] Idle





  • Wriju's BLOG

    Visual Studio Code Name “Orcas” Beta 1 Released


    Go ahead and download from here.



  • Wriju's BLOG

    C# 3.0 Enhancements: Lambda Expression (more on what)


    Lambda Expression gives us the more concise way of Anonymous Method implementation through functional programming language. Let me share some interesting aspects of Lambda Expression while exploring the C# 3.0 Specification. There it is being clearly described what Lambda Expression is.


    (param) => expr


    Can be expressed as


    param => expr


    Couple of the examples are given there


    x => x + 1                // Implicitly typed, expression body

    x => { return x + 1; }    // Implicitly typed, statement body

    (int x) => x + 1                // Explicitly typed, expression body

    (int x) => { return x + 1;}// Explicitly typed, statement body

    (x, y) => x * y            // Multiple parameters

    () => Console.WriteLine()  // No parameters


    It is very interesting to me. Hope you will also enjoy this.



  • Wriju's BLOG

    C# 3.0 Enhancements: Collection Initializers


    In C# 3.0 we can easily initialize collection. It is smarter and concise way of writing code.


    There are couple of things we should consider while initializing the collection.

    Ø       The collection should implement ICollection<T>

    Ø       The collection should have a provision to invoke ICollection<T>.Add(T)



    Here is couple of them. I am sure that you are very excited.


    //Array of string initialization

    string[] sTest = new string[]

    { "Wriju", "Writam", "Deb", "Sumitra" };


    //Dictionary object initialization

    Dictionary<int, string> objDic =

    new Dictionary<int, string>

    { { 0, "Zero" }, { 1, "One" } };


    //Generic Initialization

    List<Cust> objCusts = new List<Cust>{

    new Cust{ID=1, Name="Wriju"},

         new Cust{ID=2, Name="Writam"},

         new Cust{ID=3, Name="Deb"},

         new Cust{ID=4, Name="Sumitra"}};



  • Wriju's BLOG

    C# 3.0 Enhancements: Extension Methods


    Extension Methods are different way of implementing static method. In C# 3.0 it allows us to extend any type and add method for that type. While writing extension method you need to

    Ø       declare a public static method

    Ø       the first parameter of that method should be the type of the object

    Ø       this” keyword has to be the first part of the first argument of that method


    This helps us to extend methods for the types that are already part of .NET Framework.


    If you have declared an Extension Method like


    public static void Foo(this string sVal)


        //Do something



    If you make a call to this method the syntax will look like,


    string s = "Something for test";



    The actual call will happen like

    myExtensions.Foo(s); Here myExtensions is the static class under which you have defined the Foo method.


    Another first class treatment of static method in .NET. It allows us to feel the magic as if we are writing CLR code. You can define most of your utility functions in form of extension method and by using the “using” block you can use them in your code behind file.



    The real life example of the extension method may look like,


    public static class myExtensions


        public static string GetString(this string[] arrStr)


            StringBuilder sb = new StringBuilder();


            foreach (string s in arrStr)


                if (sb.Length != 0)





            return sb.ToString();





    class Program


        static void Main(string[] args)


            string[] sTest = new string[]

    { "Wriju", "Writam", "Deb", "Sumitra" };









  • Wriju's BLOG

    C# 3. Resources


    I found a very nice link on C# 3.0 resources and sharing it for you.


    Query Composition using Functional Programming Techniques in C# 3.0 by Eric White


    This talks about various aspects of C# 3.0 with details.




  • Wriju's BLOG

    C# 3.0 Enhancements: Object Initializers


    C# 3.0 allows us to initialize object in far better way in one single line. Let’s talk with an example here. Back again to my favorite Customer object.


    public class Customer


        public Customer() { }


        private int _ID;

        public int ID


            get { return _ID; }

            set { _ID = value; }



        private string _Name;

        public string Name


            get { return _Name; }

            set { _Name = value; }




    If you want to initialize the properties with the object initialization current style won’t allow you to do so. What you can do is that you can create another public parameterized constructor, like


    public Customer(int intCustID, string sCustName)


        _ID = intCustID;

        _Name = sCustName;



    Now internally this will initialize the property. But you may not require to set values to property every time. C# 3.0 rescues us where we can initialize the Customer class with property even though there is just a default public constructor.



    Customer objCust = new Customer() {ID = 1,Name = "Wriju"};


    Now if you do not want to set all the properties you can freely chose one or any number. It does not force you to initialize all the properties every time.


    Customer objCust = new Customer { Name = "Wriju" };


    Amazing feature.



  • Wriju's BLOG

    C# 3.0 Enhancements: Lambda Expression


    After a pretty long time I am again back to the Blog business. During these days I was busy preparing myself on C# 3.0 for our ISV Developers. I started giving demos to them and during my study I found a good number of exciting features which C# 3.0 offers in a nutshell. I will talk about them one by one. Let’s start with Lambda expression.


    Lambda Expressions are giving first class treatment to delegate and functions. When you are dealing with Lambda Expressions then you are surely dealing with Delegates.


    Let’s assume this example.


    //Array of integers

    List<int> arrInt =

    new List<int> { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };


    //Using Predicate we are finding the even numbers

    List<int> even1 =

    arrInt.FindAll(new Predicate<int>(EvenGetter));


    foreach(int i1 in even1)





    This retrieves the even numbers from the collection. But you need another method

    static bool EvenGetter(int i)


        return i % 2 == 0;




    In C# 2.0 we have introduced little smarter way. You can add inline function using the keyword delegate. The code looks like,


    //Using delegate keyword, more smarter way

    List<int> even1 = arrInt.FindAll(delegate(int i2)

    { return i2 % 2 == 0; });


    This does not require any extra function in the application. But it is still painful.


    Lambda Expression helps us to write code like.


    //Using Lambda Expression

    List<int> even1 = arrInt.FindAll( x => x % 2 == 0);


    This approach is without using delegate but the way of implementation much clean. In this syntax x => x % 2 == 0 can be changed to (int x) => x % 2 == 0



  • Wriju's BLOG

    C# 3.0 Features: Automatic Property (Part 3)


    I was about to write this entry in my blog which I found. Before that I got comment in my previous Blog on C# 3.0 Features: Automatic Property (Part 2). The same question came in my mind. What will happen if you try to create an automatic property just with get. The C# 3.0 compiler throws an error. If you try to write


    //Automatic Property

    public int CustID2





    The error looks like


    'ConsoleApplication1.Customer.CustID2.get' must declare a body because it is not marked abstract or extern. Automatically implemented properties must define both get and set accessors.


    To many it is very unfortunate because most often we may need to declare read-only property (commonly known as “getter” property). But we do have way to do this


    The same set of property can be declared as


    public int CustID2



        private set;



    This allows us to create the read-only property.



  • Wriju's BLOG

    C# 3.0 Features: Automatic Property (Part 2)


    Thank you everyone for showing interest on my blog entry C# 3.0 Features: Automatic Property. Questions like, why this approach? What if there is any condition in property? Let me tell you, we have implemented the higher level of abstraction in C# 3.0. If you are simply creating a property (we often do) then the pain declaring the local variable and its value setting/getting are being taken care by the CLR. So internally CLR declares the property exactly like what we used to do earlier.


    Let’s say


    public class Customer


        public Customer() { }


        //Conventional Way

        private int _XYZ;

        public int CustID2


            get { return _XYZ; }

            set { _XYZ = value; }



        //Automatic Property

        public int CustID







    For both the cases if you examine the assembly through IL DASM. You will get the following result (the red-boxed areas are for automatic property)



    If you have noticed for the property CustID (which is Automatic) it created a private variable k__AutomaticallyGeneratedPropertyField0 of type int32. This is the extra work CLR does for us.


    We do have backward compatibility with C# 3.0. That means all the code that you have written in previous version of C# will compile with no error (provided it is clean codeJ).



  • Wriju's BLOG

    C# 3.0 Features: Automatic Property


    I am super excited with the Orcas March 2007 CTP release. I was doing the hands on with the C# and LINQ and as you know C# 3.0 comes with a lot of new things which increases the level of abstraction for the developer. We now write less and do more. As I often have mentioned in my previous entries and presentations with Microsoft Partner that now have think more on why not on how. I remember the day when I first learned the Property. I used to scratch my head on what to do with get or set. I probably started it now as we have snippet for property. Anyways in conventional way we declare property in a class like


    public class Customer


        public Customer() { }


        private int _CustID;


        public int CustID


            get { return _CustID; }

            set { _CustID = value; }





    Now C# 3.0 suggests us not to invest so much. Rather than using property like


    private int _CustID;


    public int CustID


        get { return _CustID; }

        set { _CustID = value; }



    We can declare property like


    public int CustID






    No more private variable or = or value etc required. This is Automatic property in C# 3.0.




  • Wriju's BLOG

    LINQ to SQL with real life ASP.NET Data Domain


    We have talked a lot about LINQ and its power. One of the main reasons behind the LINQ design goal was to enable the unified query like syntax for any kind of structured data.


    There is hardly any ASP.NET application which does not deal with data. We can create layered ASP.NET Application using the LINQ power. Scott talked about this and has given a very nice walkthrough.


    Please visit


    Using LINQ with ASP.NET (Part 1)

    Using DLINQ with ASP.NET (Part 2 of my LINQ series)





  • Wriju's BLOG

    LINQ to SQL: Finding T-SQL Query


    LINQ to SQL (aka DLinq) generates SQL queries for us at the back. SqlMetal.exe does not contain any SQL query as it is pure object we do not prefer to keep anything which is not strongly typed. As you all know that LINQ to SQL creates the query for us. But the question is how it looks like? If you really want to verify the performance to make sure that LINQ to SQL is giving us the best query performance (always pain to DB developer)


    Say, you have a small which retrieves the data from Northwind database. For more details please visit my entry on DLINQ: ADO.NET vNext a lap around


    Northwind db = new Northwind("northwindConnection");


    var query = from c in db.Customers

                where c.City == "London"

                select c;


    foreach (var c in query)



    Very well it will return the values one by one. Then how is the query?


    Yes we do have a property to get the SQL query inside the SqlMetal.exe generated class file. The name of the property is Log. Let’s see how we can implement it. I am using Console application. The code will look like


    db.Log = Console.Out;


    This will give you the SQL query in output window and the query would look like,


    SELECT [t0].[CustomerID], [t0].[CompanyName], [t0].[ContactName], ...

    FROM [Customers] AS [t0]

    WHERE [t0].[City] = @p0

    -- @p0: Input NVarChar (Size = 6; Prec = 0; Scale = 0) NOT NULL [London]



    Hope this will help you to rectify more confusion.



  • Wriju's BLOG

    IE 7: More Shortcut Keys


    Few days back I have talked about the IE 7 short cut keys in one of my BLOG entries at IE 7 Shortcut keys tips. I also have found a page at IE 7 in Microsoft which talks about the exhaustive list on the same. Let me share that with you here





  • Wriju's BLOG

    IM – An initiative from MSN


    If you are Windows Live™ Messenger 8.1 user then you can be the part of this initiative.


    Where is Windows Live™ Messenger 8.1?

    Download is available from MSN.



    What is IM?


    (as mentioned in the site)

    i’m is a new initiative from Windows Live™ Messenger. Every time you start a conversation using i’m, Microsoft shares a portion of the program's advertising revenue with some of the world's most effective organizations dedicated to social causes. We've set no cap on the amount we'll donate to each organization. The sky's the limit.


    So any time you have an i’m™ conversation using Windows Live Messenger, you help address the issues you feel most passionate about, including poverty, child protection, disease, and environmental degradation. It's simple. All you have to do is join and start an instant messaging conversation. We'll handle the donation.

    There's no charge, so join now and put our money where your mouth is.


    Stay connected.



  • Wriju's BLOG

    IE 7 Shortcut keys tips


    We have started enjoying the IE7 and IE 7 always tries to help us by providing the possible shortcut keys (as being impatient we miss it). Here are those for you and me


    Keyboard shortcuts

    Open links in a new tab in the background


    Open links in a new tab in the foreground


    Open a new tab in the foreground


    Open a new tab from the Address bar


    Open a new tab from the search box


    Open Quick Tabs (thumbnail view)


    Switch between tabs


    Switch to a specific tab number

    CTRL+n (n can be 1-8)

    Switch to the last tab


    Close current tab


    Close all tabs


    Close other tabs


    Mouse shortcuts

    Open a link in a background tab

    Click the middle mouse button on a link

    Open a new tab

    Double-click the empty space to the right of the last tab

    Close a tab

    Click the middle mouse button on the tab



  • Wriju's BLOG

    What’s new in Microsoft Pre-release Software Visual Studio Code Name "Orcas" - March 2007 Community Technology Preview (CTP)


    There are a lot. Best place to view the enhancements is non none other than its own download location at MSDN.




  • Wriju's BLOG

    Orcas March 2007 CTP VPC and its Base Image


    We have released the VPC of Orcas March 2007 CTP to avoid the conflict in production machine. Since the Virtual PC 2004 SP1 is free and now downloadable from MSDN. One very important thing is that you should not miss to download the Orcas Base Image. If you miss to download this you will end up loosing the valuable experience with the magic of Orcas.



  • Wriju's BLOG

    ASP.NET 2.0 AJAX Extensions (aka Atlas) Video Tutorials


    Get Started with ASP.NET AJAX

    Take your first steps toward learning Microsoft ASP.NET AJAX, from downloading and installing the framework to creating your first AJAX-style application.

    Get Started with the ASP.NET AJAX Control Toolkit

    Learn how to extend your ASP.NET AJAX applications using the ASP.NET AJAX Control Toolkit. This video starts with the very basics, including downloading and installing the toolkit, and adding a few...

    Use the ASP.NET AJAX CascadingDropDown Control Extender

    This video demonstrates how ASP.NET’s standard DropDownList can become AJAX-enabled using the CascadingDropDown control extender from the ASP.NET AJAX Control Toolkit. You will also see how...

    Implement Dynamic Partial-Page Updates with ASP.NET AJAX

    In this video you will learn how to add dynamic partial-page updates to your ASP.NET application using Microsoft ASP.NET AJAX. In particular, you will see how to use the TimerControl to manage...

    Make Client-Side Network Callbacks with ASP.NET AJAX

    In this video we see how Microsoft ASP.NET AJAX helps web developers make network callbacks directly from client-side script code. We see also how an ASP.NET AJAX-enabled web service generates the...

    Add ASP.NET AJAX Features to an Existing Web Application

    Learn how easily you add Microsoft ASP.NET AJAX functionality to an existing ASP.NET application. This video shows that there is no need to change your server controls or data access code —...

    ASP.NET AJAX Enable an Existing Web Service

    This video demonstrates how simple it is to add Microsoft ASP.NET AJAX functionality to an existing ASP.NET web service. This enables the web service to generate a JavaScript proxy that the client...

    Use the ASP.NET AJAX TextBoxWatermark Control Extender

    In this video you will learn how to use the TextBoxWatermark control extender from the ASP.NET AJAX Control Toolkit, which adds new watermark properties to all standard TextBox controls on an ASP.NET...

    Use the ASP.NET AJAX Popup Control Extender

    This video demonstrates the use of the Popup control extender that ships with the ASP.NET AJAX Control Toolkit. Learn how to extend a TextBox control so that, when it receives focus, a popup dialog...

    Use the ASP.NET AJAX ModalPopup Extender Control

    Learn how to use the ASP.NET AJAX ModalPopup extender control that comes with the ASP.NET AJAX Control Toolkit. In this video the ModalPopup extender is used to pop open a standard ASP.NET Panel...

    Use the ASP.NET AJAX AlwaysVisible Control Extender

    See how easy it is to anchor a page element to a position on screen, where it remains always visible no matter how far the user may scroll the document. The floating page element may be anything...

    Use the ASP.NET AJAX Accordion Control

    Learn how the ASP.NET AJAX Accordion control makes efficient use of screen real-estate by enabling the smooth animated transition between different content panes.

    Use the ASP.NET AJAX Client Library Controls

    Demonstrates the client-side programming experience using scripts and controls from the ASP.NET AJAX client library. The client controls add actions, behaviors, and data-bindings to the client-side...

    Use the ASP.NET AJAX Collapsable Panel Extender

    In this video you will learn how to use the ASP.NET AJAX Collapsable Panel Extender to allow the user to dynamically show or hide content on a web page.

    Use the ASP.NET AJAX Draggable Panel Extender

    With the ASP.NET AJAX Draggable Panel Extender you can provide a content panel with a header area that allows the user to move the panel around the web page.

    Use the ASP.NET AJAX DynamicPopulate Extender

    Watch a demonstration of using the ASP.NET AJAX DynamicPopulate extender to dynamically populate an area of a web page with the results of an asynchronous call to a web method.

    Use the ASP.NET AJAX FilteredTextbox Extender

    Learn how the handy ASP.NET AJAX FilteredTextbox extender allows the developer to define which characters the user may enter in a text box control.

    Use the ASP.NET AJAX HoverMenu Extender

    Discover how to use the HoverMenu extender control to create a context-sensitive menu that appears whenever the user hovers the mouse over an element of a web page.

    Use the ASP.NET AJAX ToggleButton Extender

    Demonstrates using the ToggleButton extender control to modify the behavior and appearance of the standard ASP.NET CheckBox control to enhance the user interface.

    Use an ASP.NET AJAX ScriptManagerProxy

    Learn how a ScriptManagerProxy enables a content page to pass references to the ScriptManager placed on its ASP.NET master page, allowing each content page to define its own AJAX behavior.

    Use the ASP.NET AJAX DropShadow Extender

    Discover how to improve the presentation of ASP.NET sites by using the AJAX DropShadow extender control to add opaque, rounded-corner drop shadows to areas of your pages.

    Use the ASP.NET AJAX PasswordStrength Extender

    Learn how the PasswordStrength extender control provides immediate and dynamic feedback to users about the strength of their chosen passwords. The feedback can be a text notice, a graphical bar...

    Use the ASP.NET AJAX RoundedCorners Extender

    In this video we see how the RoundedCorner extender control can give your web pages a softer look and feel by adding attractive round corners to content areas.

    Use the ASP.NET AJAX Timer Control

    The AJAX Timer control enables a portion of an ASP.NET web page to be dynamically updated at a regular interval, rather than needing the user to perform an action such as clicking on a...

    Implement the Predictive Fetch Pattern for AJAX

    Demonstrates an implementation of the Predictive Fetch pattern for AJAX, where the AJAX engine uses the current state of the user’s interaction to predict which set of content will be...



  • Wriju's BLOG

    Sandcastle March 2007 CTP is Available



    What is Sandcastle?

    Sandcastle documentation compilers enable managed class library developers throughout the world to easily create accurate, informative documentation with a common look and feel.


    From where to download?




    What’s is there?




    Other related resources





    [Dedicated to Tupur on the eve of International Women’s Day. Wish you a very best of luck.]




  • Wriju's BLOG

    BLinq: Wow and w’s there



    BLinq is Linq integration to ASP.NET Applications which is now available in official ASP.NET website at http://www.asp.net/sandbox/app_blinq.aspx?tabid=62. You can download and install the exe to work with BLinq. BLinq is named keeping in mind that the web world is captured by blog sites and Linq is the core mapping technology behind it.


    If you face any issue the use the BLinq forum at http://forums.asp.net/1076/ShowForum.aspx


    Download is available at http://download.microsoft.com/download/1/B/0/1B02E2C5-2F4D-4F28-803B-8EF038FC0406/BlinqSetup.msi.


    Before downloading you can check the prerequisites to enjoy the feature. The forum queries and feedback are being addressed by Polita Paulus who created this tool. So you can expect positive response from the forum. Before starting you can watch the 17 minute video from http://www.asp.net/learn/videos/view.aspx?tabid=63&id=35. This is a really interesting video by the creator of BLinq.


    Here is a small example on the BLinq switches


    From command browse the folder C:\Program Files\Microsoft ASP.NET\Blinq


    Then in the command prompt type


    blinq /server:myServer\myInstance /database:Northwind /namespace:MyBlinq

    /vDir:MyBlinqVD /t:c:\MyBlinqD /user:dbCracker /password:secret!


    Lot more other switches are available. This will create a virtual directory with the name MyBlinqVD from the existing folder at c:\MyBlinqD from the Northwind database at myServer’s myInstance using the user credential dbCracker\secret!


    Let’s explore more and give feedback to developer directly.


    [I am dedicating this article to one of my friends new born baby “Sricharan”]




  • Wriju's BLOG

    Orcas March 2007 CTP Error: Unable to find the requested .Net Framework Data Provider. It may not be installed.



    If you have installed Orcas March 2007 CTP and trying to play with SQL Server 2005 Express database using the IDE feature. You might meet with an error mentioning “Unable to find the requested .Net Framework Data Provider.  It may not be installed.” while trying the below mentioned steps


    In Server Explorer, Add New Connection - > Choose SQL Server 2 - > Provide the local database server information -> (drop down will not be refreshed or if you forcefully type the database name in the text box) and hit OK button. The above mentioned error will block you to go ahead.


    I did install Orcas in fresh machine and then installed VS 2005 there. I think that was the issue. But the workaround is little tricky here,


    Steps to follow:


    Go to the folder C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\CONFIG

    Select the Machine.config and then find the tag <DbProviderFactories> under <system.data>.Then next step is to hide all the provider entries which has either Version= or Version=


    Following are the entries in my machine


          <add name="Odbc Data Provider" invariant="System.Data.Odbc" description=".Net Framework Data Provider for Odbc" type="System.Data.Odbc.OdbcFactory, System.Data, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089" />


          <add name="OleDb Data Provider" invariant="System.Data.OleDb" description=".Net Framework Data Provider for OleDb" type="System.Data.OleDb.OleDbFactory, System.Data, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089" />


          <add name="OracleClient Data Provider" invariant="System.Data.OracleClient" description=".Net Framework Data Provider for Oracle" type="System.Data.OracleClient.OracleClientFactory, System.Data.OracleClient, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089" />


          <add name="SqlClient Data Provider" invariant="System.Data.SqlClient" description=".Net Framework Data Provider for SqlServer" type="System.Data.SqlClient.SqlClientFactory, System.Data, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089" />


          <!--<add name="SQL Server Compact Edition Data Provider" invariant="System.Data.SqlServerCe" description=".NET Framework Data Provider for Microsoft SQL Server Compact Edition" type="System.Data.SqlServerCe.SqlCeProviderFactory, System.Data.SqlServerCe, Version=, Culture=neutral, PublicKeyToken=89845dcd8080cc91" />


          <add name="SQL Server Compact Edition Client Data Provider" invariant="Microsoft.SqlServerCe.Client" description=".NET Framework Data Provider for Microsoft SQL Server Compact Edition Client" type="Microsoft.SqlServerCe.Client.SqlCeClientFactory, Microsoft.SqlServerCe.Client, Version=, Culture=neutral, PublicKeyToken=89845dcd8080cc91" />

          <add name="SQL Server CE Data Provider" invariant="Microsoft.SqlServerCe.Client" description=".NET Framework Data Provider for Microsoft SQL Server 2005 Mobile Edition" type="Microsoft.SqlServerCe.Client.SqlCeClientFactory, Microsoft.SqlServerCe.Client, Version=, Culture=neutral, PublicKeyToken=89845dcd8080cc91" />-->




    Then you are ready to work. Everything else will work fine.


    Thanks to the entry from where I got the clue to the solution. You could find the bug entry at connect.



Page 23 of 25 (609 items) «2122232425