블로그 이미지
Sunny's

calendar

1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31

Notice

2010. 3. 10. 16:50 .NET Framework

FAQ:Installing NetAdvantage for .NET on Windows Vista


The information in this article applies to:
ALL (vAll)
  Article Created: 
7/19/2006

Last Updated:
6/6/2008

Article Type
FAQ
  
Page Options
Average Rating:
7 out of 10

Rate this page
Print this page
E-mail this page
Add to Favorites

Summary

Starting with NetAdvantage for .NET 2006 Volume 3 for CLR 2.0, Infragistics supports the use of NetAdvantage on 32-bit versions of the Windows Vista operating system. Starting with NetAdvantage for .NET 2007 Volume 1 for CLR 2.0, Infragistics also supports the use of NetAdvantage on 64-bit versions of Vista. There are a number of points to consider, however.

Microsoft Visual Studio 2003 (and older) are not supported for use on Windows Vista. Because of this, all NetAdvantage for .NET CLR 1.x installs are also not supported on Windows Vista. You may still install the standalone version of AppStylist on Vista.

To successfully install NetAdvantage for .NET 2006 Volume 3, either User Account Control (UAC) must be disabled, or you must use the ".exe" file (instead of the ".msi") to install. UAC is enabled by default. Steps to disable UAC are provided below. To our knowledge, you may again enable UAC once the installation is complete, without affecting the behavior of the NetAdvantage for .NET toolset.

Administrator rights are required to install NetAdvantage for .NET, regardless of the version of the toolset you are installing. If you have UAC enabled, you must allow the installer to use administrative rights when the system requests them.

If you've installed Internet Information Services (IIS) 7 on Windows Vista, you must edit the system registry prior to running the NetAdvantage installer, whether for AppStylist 2006 Volume 3 for Windows Forms or for NetAdvantage for .NET 2006 Volume 3 for CLR 2.0. This step is not required for later versions of the NetAdvantage for .NET toolset.

Also, if you've installed IIS 7 on Windows Vista, regardless of the version of NetAdvantage for .NET or AppStylist you are installing, you must ensure that IIS 6 compatibility is enabled.

IMPORTANT: Also note that, for NetAdvantage for .NET 2006 Volume 3 for CLR 2.0, additional setup is required to run the ASP.NET Samples Browser in Vista, especially if you are using IIS 7.0. Please refer to the "Related Articles" section for more information.

Additional Information

If you attempt to install AppStylist 2006 Volume 3 for Windows Forms or NetAdvantage for .NET 2006 Volume 3 for CLR 2.0 without following the steps to update IIS, the typical error you will receive is:

Error 1606. Could not access network location %SystemDrive%\inetpub\wwwroot\.

If you attempt to install NetAdvantage for .NET 2006 Volume 3, NetAdvantage for Windows Forms 2006 Volume 3, or NetAdvantage for ASP.NET 2006 Volume 3 from the ".msi" file with UAC turned on, the installer may be unable to note that you are installing a licensed version (if installing with a license key), or to note when your trial period started (if installing as a trial). Either way, you may be unable to use the controls, since the licensing system of the toolset will interpret this as you attempting to use the controls after a trial period has expired. You may see a message similar to the below at design-time or compile-time:

NetAdvantage For Win Forms Trial Period Expired

For more information about the steps needed if using IIS 7.0 in Vista , please read the following blog entry by Scott Guthrie:
http://weblogs.asp.net/scottgu/archive/2006/09/19/Tip_2F00_Trick_3A00_-Using-IIS7-on-Vista-with-VS-2005.aspx
Please note that the above link was neither authored nor maintained by Infragistics.

Step-By-Step Example

Disable User Account Control (UAC)
Note: This task is only necessary for installing AppStylist 2006 Volume 3 for Window Forms or NetAdvantage for .NET 2006 Volume 3 for CLR 2.0. It is not required for later versions of either AppStylist or NetAdvantage for .NET.
1) Type "msconfig" in the Run From Start Menu to open "System Configuration".
2) Select the "Tools" Tab in System Configuration.
3) Select the "Disable UAC" tool and click on the "Launch" button.
4) Restart the computer. (This is required to reflect the updated settings.)

Optional) Once installation of NetAdvantage for .NET 2006 Volume 3 is completed, you should be able to enable UAC again, if you wish. The steps are the same as above, except you choose "Enable UAC" in step 3 instead. UAC seems to have no effect, whether enabled or disabled, on the behavior of NetAdvantage for .NET once the toolset is installed.

Edit the System Registry for Internet Information Services (IIS)
Note: This task is only necessary for installing AppStylist 2006 Volume 3 for Window Forms or NetAdvantage for .NET 2006 Volume 3 for CLR 2.0. It is not required for later versions of either AppStylist or NetAdvantage for .NET.

Please note that, as this involves modification of registry settings, Infragistics strongly recommends you back up your registry before making any changes.

1) Type "regedit" in the Run From Start Menu to open the "Registry Editor".
2) Find the following key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\InetStp\PathWWWRoot
3) Change the value of this registry key from "%SystemDrive%\inetpub\wwwroot" to "C:\inetpub\wwwroot". If your default website in IIS is instead stored in a different location, set the value of this registry key to that path instead.

If you are installing NetAdvantage 2006 Volume 3 for CLR 2.0 on a 64-bit version of Windows Vista, you will need to repeat steps 2 and 3 with the following registry key:
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\InetStp\PathWWWRoot

Enable IIS 6.0 Compatibility
1) Open "Control Panel" and ensure "Control Panel Home" is the current view.
2) Click the "Uninstall a program" link from the Programs menu item.
3) Select "Turn Windows features on or off" from the Tasks menu.
4) Expand the "Internet Information Services" node, followed by the "Web Management Tools" node.
5) Check the "IIS 6 Management Compatibility" node. Ensure the nodes under this are checked as well.

IMPORTANT: For information on setting up the ASP.NET Samples Browser on Windows Vista for NetAdvantage for .NET 2006 Volume 3 for CLR 2.0, please refer to this related Knowledge Base article.


출처 : http://devcenter.infragistics.com/Support/KnowledgeBaseArticle.aspx?ArticleID=9983

posted by Sunny's
2010. 3. 4. 13:20 .NET Framework

Summary

When installing NetAdvantage on your machine, you may run into an error that says either “Error 1606. Could not access network location %SystemDrive%\inetpub\wwwroot\” or “Error 1606. Could not access network location \inetpub\wwwroot\”
.

Additional Information

To work around this error, a registry key needs to be modified. Please note that Infragistics strongly recommends you back up your registry before making any changes.

1) Type "regedit" in the Run From Start Menu dialog box to open the "Registry Editor".
2) Find the following key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\InetStp\PathWWWRoot
3) Change the value of this registry key from "%SystemDrive%\inetpub\wwwroot" or " \inetpub\wwwroot\" to "C:\inetpub\wwwroot". If your default website in IIS is instead stored in a different location, set the value of this registry key to that path instead.

출처 : http://devcenter.infragistics.com/Support/KnowledgeBaseArticle.aspx?ArticleID=10058

posted by Sunny's
2009. 9. 2. 18:46 .NET Framework

Summary

This article will show you how to safely get data into a WinGrid using the Background Worker component found in .NET 2.0

Additional Information

Many times an application will need to perform many actions that consume some time before they complete. During this time while the actions are being performed, the user interface becomes what appears to be “frozen” until the actions are complete. Some examples of actions that are performed are fetching data from a database or perhaps a long complex loop to do something. Any of these lengthy processes degrade our application user’s experience and can make a good application hard and frustrating to use. This article will show how we can leverage the really great new Background Worker component to fetch new Customer objects and pass them to the WinGrid. After reading this article please download the included sample that is available in both C# and VB.NET.

Step-By-Step Example

First things first, the new Background Worker component given to us in Visual Studio 2005 / .NET 2.0 wraps up patterns and functionality that we would have otherwise coded ourselves just as we always have back in Visual Studio 200X / .NET 1.X. This component makes the creation of an async process as well as its handling very simple through the three events that fire as well as some simple properties and methods that we use.

In this example, we have a use case where the application loads up and we have a WinGrid bound to an empty collection of Customer objects. Note: the CustomerCollection is simply an implementation of BindingList of type Customer (a custom business object in this project). When we press the “Get Data” button, we are fetching new Customer objects from somewhere, in another thread and then adding them to the WinGrid. We are also updating the user interface (through the UltraProgressBar) to let the users know how much longer there is to go before the process is complete. We can also allow the users to cancel the operation if it is taking too long and they want to go to lunch.

The code to accomplish this is quite simple. To start off, we simply drag and drop an instance of the Background Worker component (located in the “Components” toolbox tab in Visual Studio 2005) and add the event handlers for “DoWork”, “ProgressChanged” and “RunWorkerCompleted”.

Now all that is left for us to do is to fill these event handlers with code to get these customers, update the elements on the user interface and close and clean things up.

Getting the Data:

On the Click event handler of the button we will start this process as follows:

C#
        private void btnGetData_Click(object sender, EventArgs e)
        {
            this.btnGetData.Enabled = false;
            this.lblMessage.Text = "Getting Records, Please Wait...";

            this.bgwData.RunWorkerAsync();
        }

VB.NET

    Private Sub btnGetData_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnGetData.Click
        Me.btnGetData.Enabled = False
        Me.lblMessage.Text = "Getting Records, Please Wait..."

        Me.bgwData.RunWorkerAsync()
    End Sub

Now that we have invoked the process through the “RunWorkerAsync( )” method, we need to handle the “DoWork” event of the Background Worker:

C#

        private void bgwData_DoWork(object sender, DoWorkEventArgs e)
        {
            //This is a new instance of a Customers collection that
            //may have been fetched from a DB or wherever.
            CustomerCollection newCustomers = new CustomerCollection();

            //This simulates the known number of objects that
            //were (or are about to be) returned
            int returnedRecordCount = 100;

            //Here we loop through and add a new instance of
            //a customer object to the collection and each iteration
            //we check to see if someone cancelled the operation
            for (int i = 1; i <= returnedRecordCount ; i++)
            {
                if (this.bgwData.CancellationPending)
                {
                    e.Cancel = true;
                    return;
                }

                Customer theCustomer = new Customer(DateTime.Now.Ticks, Guid.NewGuid().ToString());
                
                newCustomers.Add(theCustomer);

                //Here is where we use this method to pass back
                //information to the UI Thread. Notice how we
                //pass the current progress (limited from 0 to 100)
                //as well as the actual customer object.
                this.bgwData.ReportProgress(i, theCustomer);

                System.Threading.Thread.Sleep(20);
            }
        }

VB.NET

Private Sub bgwData_DoWork(ByVal sender As System.Object, ByVal e As System.ComponentModel.DoWorkEventArgs) Handles bgwData.DoWork

        'This is a new instance of a Customers collection that
        'may have been fetched from a DB or wherever.
        Dim newCustomers As CustomerCollection = New CustomerCollection()

        'This simulates the known number of objects that
        'were (or are about to be) returned
        Dim returnedRecordCount As Integer = 100


        'Here we loop through and add a new instance of
        'a customer object to the collection and each iteration
        'we check to see if someone cancelled the operation
        For i As Integer = 1 To returnedRecordCount

            If Me.bgwData.CancellationPending Then
                e.Cancel = True
                Return
            End If

            Dim theCustomer As Customer = New Customer(DateTime.Now.Ticks, Guid.NewGuid().ToString())

            newCustomers.Add(theCustomer)

            'Here is where we use this method to pass back
            'information to the UI Thread. Notice how we
            'pass the current progress (limited from 0 to 100)
            'as well as the actual customer object.
            Me.bgwData.ReportProgress(i, theCustomer)

            System.Threading.Thread.Sleep(20)

        Next


    End Sub

The great thing about how this works is that the Background Worker component has the “ReportProgress( )” method which allows us to pass a number between 0 and 100 so that a status bar can be updated easily. Even more important, we can also pass objects so that we can safely get our object instances back to the User Interface thread and do with it as we please. In this case, with each loop iteration, we pass through a Customer object.

..Continued

Samples

wingrid_background_worker.zip
 Sample Application for Background Worker Component and WinGrid

참조 : http://devcenter.infragistics.com/Support/KnowledgeBaseArticle.Aspx?ArticleID=9838
posted by Sunny's
prev 1 next