' .Net OverView '


Overview

.NET Framework 3.5 builds incrementally on the new features added in .NET Framework 3.0. For example, feature sets in Windows Workflow Foundation (WF), Windows Communication Foundation (WCF), Windows Presentation Foundation (WPF) and Windows CardSpace. In addition, .NET Framework 3.5 contains a number of new features in several technology areas which have been added as new assemblies to avoid breaking changes. They include the following: 

·         Deep integration of Language Integrated Query (LINQ) and data awareness. This new feature will let you write code written in LINQ-enabled languages to filter, enumerate, and create projections of several types of SQL data, collections, XML, and DataSets by using the same syntax.

·         ASP.NET AJAX lets you create more efficient, more interactive, and highly-personalized Web experiences that work across all the most popular browsers.

·         New Web protocol support for building WCF services including AJAX, JSON, REST, POX, RSS, ATOM, and several new WS-* standards.

·         Full tooling support in Visual Studio 2008 for WF, WCF, and WPF, including the new workflow-enabled services technology.

·         New classes in .NET Framework 3.5 base class library (BCL) that address many common customer requests.


IMPORTANT:

·         If you have installed earlier pre-release versions of .NET Framework 3.5, then you must uninstall them prior to running this installation by using Add or Remove Programs.

Visual Studio Programmer's Guide for the .NET Framework

.NET Framework Advanced Development

This section of the documentation covers advanced programming subjects related to the .NET Framework.

 In This Section

Add-ins and Extensibility

Describes how to develop add-in applications that extend a host application's functionality.

Administration and Management

Describes how to manage objects in the Active Directory, and how to use Windows Management Instrumentation (WMI) to obtain enterprise data and automate administrative tasks.

Asynchronous Programming Design Patterns

Describes two design patterns available in the .NET Framework that are used to run threads separately from the main application thread.

Component Authoring for the Design Environment

Provides links to information about creating your own components in the .NET Framework, customizing their behavior and display, and creating custom controls for the Windows Presentation Foundation (WPF).

Dynamic Source Code Generation and Compilation

Discusses the Code Document Object Model (CodeDOM), which enables the output of source code in multiple programming languages.

Emitting Dynamic Methods and Assemblies

Describes a set of managed types in the System.Reflection.Emit namespace that enable a compiler or tool to emit metadata and Microsoft intermediate language (MSIL) at run time and optionally generate a portable executable (PE) file on disk.

Expression Trees

Introduces expression trees, which are tree-shaped data structures that can be used to represent language-level code in the form of data.

Garbage Collection

Discusses how the garbage collector manages memory and how you can program to use memory more efficiently.

Hosting the Common Language Runtime

Explains the concept of a runtime host, which loads the runtime into a process, creates the application domain in the process, and loads and executes user code.

Interoperability

Describes services provided by the .NET Framework for interaction with COM components, COM+ services, external type libraries, and many operating system services.

.NET Remoting

Discusses establishing communication between objects that run in different processes.

Network Programming

Shows how to use Internet access classes to implement both Web- and Internet-based applications.

Reflection

Explains how to obtain access to type information at run time by using reflection.

Reliability

Discusses writing reliable code for any host that is executing in a .NET Framework environment.

.NET Remoting

Discusses establishing communication between objects that run in different processes.

Serialization

Discusses the process of converting the state of an object into a form that can be persisted or transported.

Managed Threading

Explains the runtime support for threading and how to program by using various synchronization techniques.

Writing Serviced Components

Describes how to configure and register serviced components to access COM+ services.

 Reference

.NET Framework Class Library

Supplies syntax, code examples, and related information for each class that is contained in the .NET Framework namespaces.

 

 

 

 

 

 

 

 

 

 

Connection strings for SQL Server 2005

The following providers can be used when connecting to SQL Server 2005

.NET Framework Data Provider for SQL Server (SqlConnection)
SQL Native Client 9.0 OLE DB provider
.NET Framework Data Provider for OLE DB (OleDbConnection)
SQL Server Native Client 10.0 OLE DB Provider
SQL Native Client 9.0 ODBC Driver
SQL Server Native Client 10.0 ODBC Driver
.NET Framework Data Provider for ODBC (OdbcConnection)
SQLXML 4.0 OLEDB Provider
Context Connection

.NET Framework Data Provider for SQL Server

Type:    .NET Framework Class Library
Usage:  System.Data.SqlClient.SqlConnection

Manufacturer:  Microsoft
More info about this class library »

Customize string
example values »

Standard Security

Data Source=myServerAddress;Initial Catalog=myDataBase;User Id=myUsername;Password=myPassword;

Use serverName\instanceName as Data Source to connect to a specific SQL Server instance.

Are you using SQL Server 2005 Express? Don't miss the server name syntax Servername\SQLEXPRESS where you substitute Servername with the name of the computer where the SQL Server 2005 Express installation resides.

 

Standard Security alternative syntax

This connection string produce the same result as the previous one. The reason to include it is to point out that some connection string keywords have many equivalents.

Server=myServerAddress;Database=myDataBase;User ID=myUsername;Password=myPassword;Trusted_Connection=False;

 

 

Trusted Connection

Data Source=myServerAddress;Initial Catalog=myDataBase;Integrated Security=SSPI;

 

 

Trusted Connection alternative syntax

This connection string produce the same result as the previous one. The reason to include it is to point out that some connection string keywords have many equivalents.

Server=myServerAddress;Database=myDataBase;Trusted_Connection=True;

 

 

Connecting to an SQL Server instance

The syntax of specifying the server instance in the value of the server key is the same for all connection strings for SQL Server.

Server=myServerName\theInstanceName;Database=myDataBase;Trusted_Connection=True;

 

 

Trusted Connection from a CE device

Often a Windows CE device is not authenticated and logged in to a domain. To use SSPI or trusted connection / authentication from a CE device, use this connection string.

Data Source=myServerAddress;Initial Catalog=myDataBase;Integrated Security=SSPI;User ID=myDomain\myUsername;Password=myPassword;

Note that this will only work on a CE device.

Read more about connecting to SQL Server from CE devices here

 

Connect via an IP address

Data Source=190.190.200.100,1433;Network Library=DBMSSOCN;Initial Catalog=myDataBase;User ID=myUsername;Password=myPassword;

DBMSSOCN=TCP/IP. This is how to use TCP/IP instead of Named Pipes. At the end of the Data Source is the port to use. 1433 is the default port for SQL Server.

How to define which network protocol to use

 

Enabling MARS (multiple active result sets)

Server=myServerAddress;Database=myDataBase;Trusted_Connection=True;MultipleActiveResultSets=true;

Use ADO.NET 2.0 for MARS functionality. MARS is not supported in ADO.NET 1.0 nor ADO.NET 1.1.

Streamline your Data Connections by Moving to MARS, by Laurence Moroney, DevX.com

 

Attach a database file on connect to a local SQL Server Express instance

Server=.\SQLExpress;AttachDbFilename=c:\mydbfile.mdf;Database=dbname;Trusted_Connection=Yes;

Why is the Database parameter needed? If the named database have already been attached, SQL Server does not reattach it. It uses the attached database as the default for the connection.

 

Attach a database file, located in the data directory, on connect to a local SQL Server Express instance

Server=.\SQLExpress;AttachDbFilename=|DataDirectory|mydbfile.mdf;Database=dbname;Trusted_Connection=Yes;

Why is the Database parameter needed? If the named database have already been attached, SQL Server does not reattach it. It uses the attached database as the default for the connection.

 

Using an User Instance on a local SQL Server Express instance

The User Instance functionality creates a new SQL Server instance on the fly during connect. This works only on a local SQL Server 2005 instance and only when connecting using windows authentication over local named pipes. The purpose is to be able to create a full rights SQL Server instance to a user with limited administrative rights on the computer.

Data Source=.\SQLExpress;Integrated Security=true;AttachDbFilename=|DataDirectory|\mydb.mdf;User Instance=true;

To use the User Instance functionality you need to enable it on the SQL Server. This is done by executing the following command: sp_configure 'user instances enabled', '1'. To disable the functionality execute sp_configure 'user instances enabled', '0'.

 

Database mirroring

If you connect with ADO.NET or the SQL Native Client to a database that is being mirrored, your application can take advantage of the drivers ability to automatically redirect connections when a database mirroring failover occurs. You must specify the initial principal server and database in the connection string and the failover partner server.

Data Source=myServerAddress;Failover Partner=myMirrorServer;Initial Catalog=myDataBase;Integrated Security=True;

There is ofcourse many other ways to write the connection string using database mirroring, this is just one example pointing out the failover functionality. You can combine this with the other connection strings options available.

Read more about database mirroring in this Microsoft TechNet article "Database Mirroring in SQL Server 2005"

 

Asynchronous processing

A connection to SQL Server 2005 that allows for the issuing of async requests through ADO.NET objects.

Server=myServerAddress;Database=myDataBase;Integrated Security=True;Asynchronous Processing=True;

 

 

 

 

 

 

 

 

 

 

Known Issues

2.1. Installing

2.1.1. Uninstall earlier pre-release versions of .NET Framework 3.5 prior to installing the released version.

If you have installed earlier pre-release versions of .NET Framework 3.5, then you must uninstall them prior to running this installation by using Add or Remove Program.

To resolve this issue:

There's no workaround available.

2.1.2. Installing .NET Framework 2.0 or .NET Framework 3.0 stand-alone ENU language package MSU (shipped on media) but the .NET Framework 2.0 or .NET Framework 3.0 language package is already installed.

When one of the following files is being installed, a message, "the following updates were not installed" is displayed.

WCU\dotNetFramework\dotNetMSP\x64\NetFX2.0-KB936704-v6000-x64_RTM_en.msu
WCU\dotNetFramework\dotNetMSP\x64\NetFX3.0-KB936705-v6000-x64_RTM_en.msu
WCU\dotNetFramework\dotNetMSP\x86\NetFX2.0-KB936704-v6000-x86_RTM_en.msu
WCU\dotNetFramework\dotNetMSP\x86\NetFX3.0-KB936705-v6000-x86_RTM_en.msu

This happens because the corresponding .NET Framework 2.0 or .NET Framework 3.0 En-US language package is already installed.

To resolve this issue:

Install .NET Framework 3.5 by using the installation instructions on http://go.microsoft.com/fwlink/?LinkId=96339.

2.1.3. .NET Framework 3.5 does not install on Windows Server 2003 Itanium architectures.

Installing .NET Framework 3.5 on Windows Server 2003 for Itanium 64-bit processors produces the following message: "Microsoft .NET Framework 3.5 - You must first install Microsoft .NET Framework 2.0 SP1 before installing or repairing".

To resolve this issue:

No workaround is available. .NET Framework 3.5 is not supported on Windows 2003 for Itanium 64-bit processors.

2.1.4. .NET Framework 3.5 installation might not configure IIS correctly on Windows XP or Windows Server 2003

Installation of .NET Framework 3.5 will not configure IIS correctly on Windows XP or Windows Server 2003 if IIS is already installed and the IIS Admin Service is disabled.

To resolve this issue:

Do the following things after you install .NET Framework 3.5.

1. On the Start menu, click Run.

2. Type "cmd" and then press ENTER.

3. Type "sc config iisadmin start= auto" and then press ENTER.

-or-

1. On the Start menu, click Run.

2. Type "services.msc" and then press ENTER.

3. Select the IIS Admin Service from the list. If the Startup Type is Disabled, right-click IIS Admin Service and then click Properties. Change Startup Type to Automatic.

4. In %WINDIR%\Microsoft.NET\Framework\v3.5\, run WFServicesReg.exe /c.  (On 64-bit computers, the path is %WINDIR%\Microsoft.NET\Framework64\v3.5\.)

2.1.5. .NET Framework 3.5 reinstallation displays a re-try dialog box.

When customers install .NET Framework 3.5 and then reinstall it, they may see a re-try dialog box that prompts them to close Setup.

To resolve this issue:

Clicking the retry button is harmless. Setup will typically continue because an instance of Setup is already running.

2.1.6. Upgrading .NET Framework 3.5 Beta 1 to the release version might fail on Windows Vista RTM.

User installs .NET Framework 3.5 Beta 1 on Windows Vista and then upgrades to the .NET Framework 3.5 release version.  .NET Framework 2.0 and .NET Framework 3.0 files might not be correctly upgraded if Windows Vista Beta 1 updates are not removed first.

To resolve this issue:

1. If you have already tried to install .NET Framework 3.5, uninstall it.

2. Uninstall the following KBs by using Installed Updates.

- KB929300

- KB930264

- KB110806

3. Install .NET Framework 3.5.

2.1.7. Download of .NET Framework Setup fails.

2.1.7.1. Configuration Errors

This error occurs when BITS interfaces are not registered or the registry settings are corrupted.

To resolve this issue:

- Upgrade to BITS 2.0 from http://www.microsoft.com/downloads/details.aspx?FamilyId=B93356B1-BA43-480F-983D-EB19368F9047&displaylang=en

-or-

- Repair the BITS service by running the Bitsadmin tool at the command prompt, as follows: bitsadmin /util /repairservice /force

You can download the Bitsadmin tool from: http://www.microsoft.com/downloads/details.aspx?amp;displaylang=en&familyid=49AE8576-9BB9-4126-9761-BA8011FABF38&displaylang=en.

2.1.7.2. Network Errors

These errors may occur for the following reasons:

- Unable to reach download server.

- URL not found on the server.

- Server is overloaded.

- Bad Gateway or Proxy.

- Network is disconnected.

- Proxy does not support HTTP 1.1.

To resolve this issue:

1. Make sure that you are connected to the network. You may have to exit Setup.

2. Do one of the following things.

- Provide correct settings for the proxy server and ensure that your computer can correctly resolve the proxy server.

-or-

- Upgrade to BITS 2.0. You can download BITS 2.0 from 
http://www.microsoft.com/downloads/details.aspx?amp;displaylang=en&familyid=49AE8576-9BB9-4126-9761-BA8011FABF38&displaylang=en .

2.1.7.3. Disk Errors

This error occurs when the BITS service failed to create a file or write to a file. Because another program, such as chkdsk.exe, might be running, the disk might be locked and BITS might be prevented from writing to the file.

To resolve this issue:

- Make sure that no other program that could lock the disk is running and then try the download again.

-or-

- Restart the computer and then run Setup again. Make sure that you are connected to the Internet.

2.1.7.4.Proxy Errors

The BITS service failed because of one of the following proxy-related errors:

- The Proxy settings are not valid.

- The proxy server requires authentication.

- The computer is not able to resolve the proxy server.

To resolve this issue:

- Provide correct credentials for proxy server authentication and then start Setup again.

-or-

- Upgrade the proxy server to support HTTP1.1 and ensure that the proxy supports implicit credentials (for example, NTLM). You may have to contact your network administrator.

-or-

Bypass the proxy server by changing your Internet Explorer proxy settings.

To bypass a proxy server:

1. In Internet Explorer, click Tools and then click Internet Options.

2. Click the Connections tab and then click LAN Settings.

3. Under Proxy server, clear Use a proxy server for your LAN (These settings will not apply to dial-up or VPN connections.) and then click OK.

4. Click OK again.

If you need further assistance with your proxy server settings, contact your network administrator.

2.1.7.5. Other Errors

The BITS Service does not run in the following scenarios:

- Safe-boot mode.

- On Windows 2000 from a remote desktop connection.

- When Setup is installed by using a "run as" command.

To resolve this issue:

No workaround is available. These scenarios are not supported.

2.1.8. Some components of .NET Framework 3.5 will not be present on the computer after an upgrade to Windows Vista RTM from Windows XP or Windows Server 2003.

Some components of .NET Framework 3.5 will not be present on the computer after an upgrade to Windows Vista RTM from Windows XP or Windows Server 2003.

To resolve this issue:

1. Uninstall .NET Framework 3.5.

2. Reinstall .NET Framework 3.5 from the Visual Studio 2008 DVD or from http://www.microsoft.com.

2.1.9. .NET Framework 2.0 SP1 Setup fails on Windows 2000 SP4 and displays the error message, "The procedure entry point HeapSetInformation could not be located in the dynamic link library KERNEL32.dll."

.NET Framework 2.0 SP1 Setup fails on Windows 2000 SP4 and displays the error message, "The procedure entry point HeapSetInformation could not be located in the dynamic link library KERNEL32.dll."

To resolve this issue:

Install kb835732 from http://go.microsoft.com/fwlink/?LinkID=104408&clcid=0x409.

2.1.10. During .NET Framework installation or uninstalling, a dialog pops up and asks you to close setup process.

During Installation or Uninstalling of .NET Framework 3.5, .NET Framework 3.0 Service Pack 1, and .NET Framework 2.0 Service Pack 1, a dialog pops up with the message "The following application should be closed before continuing with setup:"

The list of applications shown contains the setup itself, and looks like the below:

Microsoft .NET Framework 3.5 Setup

setup

To resolve this issue:

Click on "Ignore" and continue with setup.

2.1.11. "Installer encountered an error: 0x8007177f. This machine is disabled for file encryption".

Users receive an error message when they try to install an update on a Windows Vista computer in a domain. In the error log, the message is either "Error code 6015 for this component" or "Installer encountered an error: 0x8007177f. This machine is disabled for file encryption".

To resolve this issue:

Apply the update, which is available at http://support.microsoft.com/kb/933595.

2.1.12. Installation fails if the Print Spooler Service is not running

The installation of the XPSEPSC component requires that the Print Spooler Service be running in the ‘Started’ state.  If the Print Spooler Service is not running, the XPSEPSC installer will fail. 

To resolve this issue:

Start the Print Spooler service before you install .NET Framework. To do this:

1. Click Start, point to Settings, click Control Panel, and then double-click Administrative Tools.

2. Double-click Services, click to select Services (Local), right-click Print Spooler, and then click Properties.

3. Click Start, and then click OK.

2.2. Uninstalling

2.2.1. Uninstalling the 64-bit .NET Framework 2.0 may break .NET Framework 1.1.

The original release of .NET Framework 1.1 is 32-bit only. In addition, the .NET Framework 1.1 Setup program contains a launch condition that blocks installation on 64-bit operating systems. After the original release, a shim was added to newer 64-bit operating systems that lets users bypass that launch condition and install .NET Framework 1.1. However, because .NET Framework 1.1 was not designed to be installed on 64-bit operating systems and co-exist with newer versions of the .NET Framework that are designed for 64-bit operating systems (such as .NET Framework 2.0), some .NET Framework side-by-side uninstall scenarios do not work correctly.

The following scenario may cause problems on a 64-bit operating system.

1. Install .NET Framework 1.1.

2. Install .NET Framework 2.0.

3. Uninstall .NET Framework 2.0.

When .NET Framework 2.0 is uninstalled in this scenario, some registry entries that .NET Framework 1.1 relies on are removed and .NET Framework 1.1 no longer works correctly. After .NET Framework 2.0 is uninstalled, .NET Framework 1.1 must be repaired to restore the required registry values.

To resolve this issue:

Do the following things.

1. Download the .NET Framework 1.1 setup package (dotnetfx.exe).

2. On the Start menu, click Run, and then type "cmd" and click OK.

3. Run the following command:  /t:%temp% /c:"msiexec.exe /fvecms %temp%\netfx.msi".

Instructions for repairing .NET Framework 1.1 are contained in %windir%\Microsoft.NET\Framework\v1.1.4322\1033\repairRedist.htm, which can be found on computers that have .NET Framework 1.1.