A New Internet Library: Add Your Website/Blog or Suggest A Website/Blog to our Free Web Directory http://anil.myfunda.net.

Its very simple, free and SEO Friendly.
Submit Now....

Thursday, February 7, 2008

Top Ten Reasons to Upgrade to VS2008

Top Ten Reasons to Upgrade

 


1.    work with data in a unified and integrated way

·   Be more productive by using a single approach to querying and manipulating data that's integrated with the way you write code — in the programming language.

·   Use a single model to query and transform XML, SQL Server and object data with Language-Integrated Query, helping you focus on what you need the data to do rather than how you are going to access the data.

2.    work with uSER interface designers

·   Share user interface assets, such as design elements and controls, with graphic designers that use Microsoft Expression: both Microsoft Expression Web ( ASP.NET) and Microsoft Expression Blend (WPF) are supported.

3.    employ the latest web user interface techniques

·   New support for web server communication techniques for AJAX/JSON-enabled websites.

·   New ASP.NET controls that allow for better page management and templates.

·   Native support for RSS and REST by the Windows Communication Foundation.

4.    buIld stunning applications for windows vista

·   Build powerful Windows-based applications that take advantage of Windows Forms and Windows Presentation Foundation to make your applications really stand out.

·   Benefit from Smart Client application enhancements that improve deployment and disconnected scenarios.

5.    build higher quality applications with integrated unit testing

·   Powerful unit-testing tools are now integrated directly into Visual Studio Professional.

 

6.    ENJOY great support for designing web applications

·   Cascading style sheet and HTML editors have been greatly enhanced for productivity gains.

·   Breakthrough JavaScript support has been integrated within Visual Studio 2008, including IntelliSense and debugging.

7.    Build applications that run on multiple versions of THE .net FrameworK

·   With previous versions of Visual Studio, you could only build applications that ran on one version of the .NET Framework; now you can use one tool – Visual Studio 2008 — to build applications that work with .NET Framework versions 2.0, 3.0 and 3.5.

8.    Build office-based applications

·   Visual Studio 2008 Professional now includes tools for Office development.

·   Built-in tools help make Office look-and-feel interfaces, like the "fluent ribbon", quickly and easily.

·   Click-Once deployment for applications built for Office using Visual Studio 2008.

9.    USE workflow AND communication tools

·   Built-in tools for developing business logic using Windows Workflow Foundation enables modelling of real-world business processes in software. This includes a workflow designer, project templates and a workflow debugger.

·   Built-in tools for implementing communications software with Windows Communication Foundation, providing support for a wide array of transports and protocols.

10. BENEFIT FROM performance and stability across the board

·   The highest quality Visual Studio release ever ensures that you are more productive during development.

Serial Ports: Getting Port Names

string[] sp= SerialPort.GetPortNames();

           

            SerialPort sp1=new SerialPort(sp[0]);

           

            bool status =sp1.IsOpen;

 

Explicity close of console application

Process.GetCurrentProcess().Kill();

 

Or

 

Environment.Exit()

Pagii Friend Invite

Allow images to see Anil Kumar Reddy Perugu's picture.

Is Anil Kumar Reddy Perugu your friend?

Yes No
spacer spacer spacer spacer spacer
spacer
Click yes if Anil Kumar Reddy Perugu is your friend, otherwise click no.
spacer
Click here to block all emails from pagii
Pagii.com, 1100 Wayne Avenue, Suite 801 Silver Spring, MD 20910

Differences in ASP.NET AJAX

So, how exactly? Each ASMX request is forwarded to a registered HTTP handler factory – the ScriptHandlerFactory class. An HTTP handler factory is used in ASP.NET when dynamic conditions determine the actual HTTP handler to be used for a particular request. In this case, a request for an ASMX resource can potentially be served in either of two ways: via a script service or a classic Web service. The handler factory assesses request information and loads up the proper HTTP handler. Figure 1 shows the complete flow diagram for ASMX requests in ASP.NET AJAX applications.

Figure 1
Figure 1: Flow diagram for ASMX requests in ASP.NET AJAX applications

As its first step, the ScriptHandlerFactory class checks whether the incoming request has a given content type. The following snippet shows some pseudo-code that illustrates what really happens in the ASP.NET AJAX runtime. Note that a HTTP handler factory class implements the IHttpHandlerFactory interface which counts on two methods – GetHandler and ReleaseHandler. The code below gives an idea of the implementation of the GetHandler method in the script handler factory of ASP.NET AJAX. Note that this code has been slightly adapted for clarity, but is closely related to real ASP.NET AJAX code. Class names, in particular, are real:

public IHttpHandler GetHandler( 	HttpContext context, 	string requestType, 	string url, 	string pathTranslated) { 	IHttpHandlerFactory factory; 	if (RestHandlerFactory. 		IsRestRequest(context)) 	{ 		factory = new 			RestHandlerFactory(); 	} 	else 	{ 		factory = new 			WebServiceHandlerFactory(); 	} 	: }
The WebServiceHandlerFactory class is defined in the System.Web.Services.Protocols namespace and has been part of the ASP.NET platform since the beginning. The RestHandlerFactory class is new in ASP.NET AJAX. For some reason the REST term is conventionally used to indicate a request that needs to be treated differently from a classic Web service request, although it has a similar endpoint. I feel the use of the term REST here is ambiguous, to say the least. On the other hand, these classes are not public and not meant to be public. So in theory, they could have christened, say, the RestHandlerFactory class with any arbitrary name. But they opted for a name with REST in it. To fix things up, let's say that in this context REST just merely indicates a non-SOAP solution.

The key step in the GetHandler method of the ScriptFactoryHandler class is the check made through the IsRestRequest method. The method accepts the HTTP context of the request and returns a Boolean value. At the highest of abstraction, the goal of the method is determining whether the current request is coming from a script. More concretely, the method simply checks the content type of the request. Here's some illustrative code:

internal static bool 	IsRestRequest(HttpContext context) { 	HttpRequest request = 		context.Request; 	return String.Equals( 		request.ContentType, 		"application/json", 		StringComparison. 		OrdinalIgnoreCase); }
Any ASMX request that doesn't have a content type of application/json is automatically served by the classic ASP.NET Web service handler. In other words, any ASMX request with a non application/json content type is implicitly assumed to carry SOAP envelopes in the body. Will the condition "content type set to application/json" equals "request comes from script" always be valid? Of course, there's no guarantee that all requests with that content type come uniquely from the script of an AJAX Web page. It's too easy to use the classes in the System.Net namespace, and arrange a Windows Forms application that calls into the back end of an AJAX application. However, any ASMX requests that come from an ASP.NET AJAX Web page aimed at a back end service is guaranteed to have the proper content type set. This is hard-coded in the Microsoft AJAX Client Library that all ASP.NET AJAX pages use to place remote calls.

Once the handler in charge of serving the request has been identified, it takes up the responsibility of verifying whether the invoked service can be invoked from script. So the RestHandlerFactory instantiates the real HTTP handler, and has this check whether the service class is decorated with the ScriptService attribute. If no such attribute can be found, an exception is thrown – see Figure 2.

Figure 2
Figure 2: Script code from ASP.NET AJAX pages can't call any type of Web service

Best Practices to Improve Performance of ASP.Net Application.

Performance tuning can be tricky. It's especially tough in Internet-related projects with lots of components running around, like HTML client, HTTP network, Web server, middle-tier components, database components, resource-management components, TCP/IP networks, and database servers. Performance tuning depends on a lot of parameters and sometimes, by changing a single parameter, performance can increase drastically.
 
Introduction
This document lists out some tips for optimizing ASP.Net Web applications and many traps and pitfalls are discussed as follows :


Tips For Web Application


1) Turn off Tracing unless until required
Tracing is one of the wonderful features which enable us to track the application's trace and the sequences. However, again it is useful only for developers and you can set this to "false" unless you require to monitor the trace logging.
How it affects performance:
Enabling tracing adds performance overhead and might expose private information, so it should be enabled only while an application is being actively analyzed.
Solution:
When not needed, tracing can be turned off using
<trace enabled="false" requestLimit="10" pageoutput="false" traceMode="SortByTime" localOnly="true">


2) Turn off Session State, if not required
One extremely powerful feature of ASP.NET is its ability to store session state for users, such as a shopping cart on an e-commerce site or a browser history.
How it affects performance:
Since ASP.NET Manages session state by default, you pay the cost in memory even if you don't use it. I.e. whether you store your data in in-process or on state server or in a Sql Database, session state requires memory and it's also time consuming when you store or retrieve data from it.
Solution:
You may not require session state when your pages are static or when you do not need to store information captured in the page.
In such cases where you need not use session state, disable it on your web form using the directive,
<@%Page EnableSessionState="false"%>
In case you use the session state only to retrieve data from it and not to update it, make the session state read only by using the directive,
<@%Page EnableSessionState ="ReadOnly"%>

3) Disable View State of a Page if possible
View state is a fancy name for ASP.NET storing some state data in a hidden input field inside the generated page. When the page is posted back to the server, the server can parse, validate, and apply this view state data back to the page's tree of controls.
View state is a very powerful capability since it allows state to be persisted with the client and it requires no cookies or server memory to save this state. Many ASP.NET server controls use view state to persist settings made during interactions with elements on the page, for example, saving the current page that is being displayed when paging through data.
How it affects performance:
 There are a number of drawbacks to the use of view state, however.
 It increases the total payload of the page both when served and when requested. There is also an additional overhead incurred when serializing or deserializing view state data that is posted back to the server.
 View state increases the memory allocations on the server. Several server controls, the most well known of which is the DataGrid, tend to make excessive use of view state, even in cases where it is not needed.
Solution:
Pages that do not have any server postback events can have the view state turned off.
The default behavior of the ViewState property is enabled, but if you don't need it, you can turn it off at the control or page level. Within a control, simply set the EnableViewState property to false, or set it globally within the page using this setting:
<%@ Page EnableViewState="false" %>
If you turn view state off for a page or control, make sure you thoroughly test your pages to verify that they continue to function correctly.


4) Set debug=false in web.config
When you create the application, by default this attribute is set to "true" which is very useful while developing. However, when you are deploying your application, always set it to "false".
How it affects performance:
Setting it to "true" requires the pdb information to be inserted into the file and this results in a comparatively larger file and hence processing will be slow.
Solution:
Therefore, always set debug="false" before deployment.

5) Avoid Response.Redirect
Response.Redirect () method simply tells the browser to visit another page.
How it affects performance:
Redirects are also very chatty. They should only be used when you are transferring people to another physical web server.
Solution:
For any transfers within your server, use .transfer! You will save a lot of needless HTTP requests. Instead of telling the browser to redirect, it simply changes the "focus" on the Web server and transfers the request. This means you don't get quite as many HTTP requests coming through, which therefore eases the pressure on your Web server and makes your applications run faster.

Tradeoffs:
 ".transfer" process can work on only those sites running on the server. Only Response.Redirect can do that.
 Server.Transfer maintains the original URL in the browser. This can really help streamline data entry techniques, although it may make for confusion when debugging
5. A) To reduce CLR Exceptions count, Use Response.Redirect (".aspx", false) instead of response.redirect (".aspx").

6) Use the String builder to concatenate string
How it affects performance:
String is Evil when you want to append and concatenate text to your string. All the activities you do to the string are stored in the memory as separate references and it must be avoided as much as possible.
i.e. When a string is modified, the run time will create a new string and return it, leaving the original to be garbage collected. Most of the time this is a fast and simple way to do it, but when a string is being modified repeatedly it begins to be a burden on performance: all of those allocations eventually get expensive.
Solution:
Use String Builder when ever string concatenation is needed so that it only stores the value in the original string and no additional reference is created.


7) Avoid throwing exceptions
How it affects performance:
Exceptions are probably one of the heaviest resource hogs and causes of slowdowns you will ever see in web applications, as well as windows applications.
Solution:
You can use as many try/catch blocks as you want. Using exceptions gratuitously is where you lose performance. For example, you should stay away from things like using exceptions for control flow.

8) Use Finally Method to kill resources
The finally method gets executed independent of the outcome of the Block.
Always use the finally block to kill resources like closing database connection, closing files and other resources such that they get executed independent of whether the code worked in Try or went to Catch.

9) Use Client Side Scripts for validations
User Input is Evil and it must be thoroughly validated before processing to avoid overhead and possible injections to your applications.
How It improves performance:
Client site validation can help reduce round trips that are required to process user's request. In ASP.NET you can also use client side controls to validate user input. However, do a check at the Server side too to avoid the infamous Javascript disabled scenarios.

10) Avoid unnecessary round trips to the server
How it affects performance:
Round trips significantly affect performance. They are subject to network latency and to downstream server latency. Many data-driven Web sites heavily access the database for every user request. While connection pooling helps, the increased network traffic and processing load on the database server can adversely affect performance.
Solution:
 Keep round trips to an absolute minimum
 Implement Ajax UI whenever possible. The idea is to avoid full page refresh and only update the portion of the page that needs to be changed

11) Use Page.ISPostBack
Make sure you don't execute code needlessly. Use Page.ISPostBack property to ensure that you only perform page initialization logic when a page is first time loaded and not in response to client postbacks.

12) Include Return Statements with in the Function/Method
How it improves performance
Explicitly using return allows the JIT to perform slightly more optimizations. Without a return statement, each function/method is given several local variables on stack to transparently support returning values without the keyword. Keeping these around makes it harder for the JIT to optimize, and can impact the performance of your code. Look through your functions/methods and insert return as needed. It doesn't change the semantics of the code at all, and it can help you get more speed from your application.

13) Use Foreach loop instead of For loop for String Iteration
Foreach is far more readable, and in the future it will become as fast as a For loop for special cases like strings. Unless string manipulation is a real performance hog for you, the slightly messier code may not be worth it.

14) Avoid Unnecessary Indirection
How it affects performance:
When you use byRef, you pass pointers instead of the actual object.
Many times this makes sense (side-effecting functions, for example), but you don't always need it. Passing pointers results in more indirection, which is slower than accessing a value that is on the stack.
Solution:
When you don't need to go through the heap, it is best to avoid it there by avoiding indirection.

15) Use "ArrayLists" in place of arrays
How it improves performance
An ArrayList as everything that is good about an array PLUS automatic sizing, Add, Insert, Remove, Sort, Binary Search. All these great helper methods are added when implementing the IList interface.
Tradeoffs:
The downside of an ArrayList is the need to cast objects upon retrieval.

16) Always check Page.IsValid when using Validator Controls
Always make sure you check Page.IsValid before processing your forms when using Validator Controls.

17) Use Paging
Take advantage of paging's simplicity in .net. Only show small subsets of data at a time, allowing the page to load faster.
Tradeoffs:
Just be careful when you mix in caching. Don't cache all the data in the grid.

18) Store your content by using caching
How it improves performance:
ASP.NET allows you to cache entire pages, fragment of pages or controls. You can cache also variable data by specifying the parameters that the data depends. By using caching you help ASP.NET engine to return data for repeated request for the same page much faster.
When and Why Use Caching:
A Proper use and fine tune of caching approach of caching will result on better performance and scalability of your site. However improper use of caching will actually slow down and consume lots of your server performance and memory usage.
Good candidate to use caching is if you have infrequent chance of data or static content of web page.

19) Use low cost authentication
Authentication can also have an impact over the performance of your application. For example passport authentication is slower than form-base authentication which in here turn is slower than Windows authentication.

20) Minimize the number of web server controls
How it affects performance:
The use of web server controls increases the response time of your application because they need time to be processed on the server side before they are rendered on the client side.
Solution:
One way to minimize the number of web server controls is to taking into consideration, the usage of HTML elements where they are suited, for example if you want to display static text.

21) Avoid using unmanaged code
How it affects performance:
Calls to unmanaged code are a costly marshaling operation.
Solution:
Try to reduce the number calls between the managed and unmanaged code. Consider to do more work in each call rather than making frequent calls to do small tasks.

22) Avoid making frequent calls across processes
If you are working with distributed applications, this involves additional overhead negotiating network and application level protocols. In this case network speed can also be a bottleneck. Try to do as much work as possible in fewer calls over the network.

23) Cleaning Up Style Sheets and Script Files
 A quick and easy way to improve your web application's performance is by going back and cleaning up your CSS Style Sheets and Script Files of unnecessary code or old styles and functions. It is common for old styles and functions to still exist in your style sheets and script files during development cycles and when improvements are made to a website.
 Many websites use a single CSS Style Sheet or Script File for the entire website. Sometimes, just going through these files and cleaning them up can improve the performance of your site by reducing the page size. If you are referencing images in your style sheet that are no longer used on your website, it's a waste of performance to leave them in there and have them loaded each time the style sheet is loaded.
 Run a web page analyzer against pages in your website so that you can see exactly what is being loaded and what takes the most time to load.

24) Design with ValueTypes
Use simple structs when you can, and when you don't do a lot of boxing
and unboxing.
Tradeoffs:
ValueTypes are far less flexible than Objects, and end up hurting performance if used incorrectly. You need to be very careful about when you treat them like objects. This adds extra boxing and unboxing overhead to your program, and can end up costing you more than it would if you had stuck with objects.

25) Minimize assemblies
Minimize the number of assemblies you use to keep your working set small. If you load an entire assembly just to use one method, you're paying a tremendous cost for very little benefit. See if you can duplicate that method's functionality using code that you already have loaded.

26) Encode Using ASCII When You Don't Need UTF
By default, ASP.NET comes configured to encode requests and responses as UTF-8.
If ASCII is all your application needs, eliminated the UTF overhead can give you back a few cycles. Note that this can only be done on a per-application basis.

27) Avoid Recursive Functions / Nested Loops
These are general things to adopt in any programming language, which consume lot of memory. Always avoid Nested Loops, Recursive functions, to improve performance.

28) Minimize the Use of Format ()
When you can, use toString () instead of format (). In most cases, it will provide you with the functionality you need, with much less overhead.

29) Place StyleSheets into the Header
Web developers who care about performance want browser to load whatever content it has as soon as possible. This fact is especially important for pages with a lot of content and for users with slow Internet connections. When the browser loads the page progressively the header, the logo, the navigation components serve as visual feedback for the user.
When we place style sheets near the bottom part of the html, most browsers stop rendering to avoid redrawing elements of the page if their styles change thus decreasing the performance of the page. So, always place StyleSheets into the Header

30) Put Scripts to the end of Document
Unlike StyleSheets, it is better to place scripts to the end of the document. Progressive rendering is blocked until all StyleSheets have been downloaded. Scripts cause progressive rendering to stop for all content below the script until it is fully loaded. Moreover, while downloading a script, browser does not start any other component downloads, even on different hostnames.
So,always have scripts at the end of the document.

31) Make JavaScript and CSS External
Using external files generally produces faster pages because the JavaScript and CSS files are cached by the browser. Inline JavaScript and CSS increases the HTML document size but reduces the number of HTTP requests. With cached external files, the size of the HTML is kept small without increasing the number of HTTP requests thus improving the performance.


Tips For Database Operations


1) Return Multiple Resultsets
The database code if has request paths that go to the database more than once then, these round-trips decreases the number of requests per second your application can serve.
Solution:
Return multiple resultsets in a single database request, so that you can cut the total time spent communicating with the database. You'll be making your system more scalable, too, as you'll cut down on the work the database server is doing managing requests.

2) Connection Pooling and Object Pooling
Connection pooling is a useful way to reuse connections for multiple requests, rather than paying the overhead of opening and closing a connection for each request. It's done implicitly, but you get one pool per unique connection string. Make sure you call Close or Dispose on a connection as soon as possible. When pooling is enabled, calling Close or Dispose returns the connection to the pool instead of closing the underlying database connection.
Account for the following issues when pooling is a part of your design:
 Share connections
 Avoid per-user logons to the database
 Do not vary connection strings
 Do not cache connections

3) Use SqlDataReader Instead of Dataset wherever it is possible
If you are reading a table sequentially you should use the DataReader rather than DataSet. DataReader object creates a read only stream of data that will increase your application performance because only one row is in memory at a time.

4) Keep Your Datasets Lean
Remember that the dataset stores all of its data in memory, and that the more data you request, the longer it will take to transmit across the wire.
Therefore Only put the records you need into the dataset.

5) Avoid Inefficient queries
How it affects performance:
Queries that process and then return more columns or rows than necessary, waste processing cycles that could best be used for servicing other requests.

Cause of Inefficient queries:
 Too much data in your results is usually the result of inefficient queries.
 The SELECT * query often causes this problem. You do not usually need to return all the columns in a row. Also, analyze the WHERE clause in your queries to ensure that you are not returning too many rows. Try to make the WHERE clause as specific as possible to ensure that the least number of rows are returned.
 Queries that do not take advantage of indexes may also cause poor performance.

6) Unnecessary round trips
How it affects performance:
Round trips significantly affect performance. They are subject to network latency and to downstream server latency. Many data-driven Web sites heavily access the database for every user request. While connection pooling helps, the increased network traffic and processing load on the database server can adversely affect performance.
Solution:
Keep round trips to an absolute minimum.

7) Too many open connections
Connections are an expensive and scarce resource, which should be shared between callers by using connection pooling. Opening a connection for each caller limits scalability.
Solution:
To ensure the efficient use of connection pooling, avoid keeping connections open and avoid varying connection strings.

8) Avoid Transaction misuse
How it affects performance:
If you select the wrong type of transaction management, you may add latency to each operation. Additionally, if you keep transactions active for long periods of time, the active transactions may cause resource pressure.
Solution:
Transactions are necessary to ensure the integrity of your data, but you need to ensure that you use the appropriate type of transaction for the shortest duration possible and only where necessary.

9) Avoid Over Normalized tables
Over Normalized tables may require excessive joins for simple operations. These additional steps may significantly affect the performance and scalability of your application, especially as the number of users and requests increases.

10) Reduce Serialization
Dataset serialization is more efficiently implemented in .NET Framework version 1.1 than in version 1.0. However, Dataset serialization often introduces performance bottlenecks.
You can reduce the performance impact in a number of ways:
 Use column name aliasing
 Avoid serializing multiple versions of the same data
 Reduce the number of DataTable objects that are serialized

11) Do Not Use CommandBuilder at Run Time
How it affects performance:
CommandBuilder objects such as as SqlCommandBuilder and OleDbCommandBuilder are useful when you are designing and prototyping your application. However, you should not use them in production applications. The processing required to generate the commands affects performance.
Solution:
Manually create stored procedures for your commands, or use the Visual Studio® .NET design-time wizard and customize them later if necessary.

12) Use Stored Procedures Whenever Possible
Stored procedures are highly optimized tools that result in excellent performance when used effectively.
Set up stored procedures to handle inserts, updates, and deletes with the data adapter
Stored procedures do not have to be interpreted, compiled or even transmitted from the client, and cut down on both network traffic and server overhead.
Be sure to use CommandType.StoredProcedure instead of CommandType.Text

13) Avoid Auto-Generated Commands
When using a data adapter, avoid auto-generated commands. These require additional trips to the server to retrieve meta data, and give you a lower level of interaction control. While using auto-generated commands is convenient, it's worth the effort to do it yourself in performance-critical applications.

14) Use Sequential Access as Often as Possible
With a data reader, use CommandBehavior.SequentialAccess. This is essential for dealing with blob data types since it allows data to be read off of the wire in small chunks. While you can only work with one piece of the data at a time, the latency for loading a large data type disappears. If you don't need to work the whole object at once, using
Sequential Access will give you much better performance.


Tips for Asp.Net applications developed using VB


1) Enable Option Strict and Option Explicit for your pages
With Option Strict on, you protect yourself from inadvertent late binding and enforce a higher level of coding discipline.

2) Use early binding in Visual Basic or JScript code
Visual Basic 6 does a lot of work under the hood to support casting of objects, and many programmers aren't even aware of it. In Visual Basic 7, this is an area that out of which you can squeeze a lot of performance.
Solution:
When you compile, use early binding. This tells the compiler to insert a Type Coercion is only done when explicitly mentioned.
This has two major effects:
 Strange errors become easier to track down.
 Unneeded coercions are eliminated, leading to substantial performance improvements.
When you use an object as if it were of a different type, Visual Basic will coerce the object for you if you don't specify. This is handy, since the programmer has to worry about less code.

3) Put Concatenations in One Expression
If you have multiple concatenations on multiple lines, try to stick them all on one expression. The compiler can optimize by modifying the string in place, providing a speed and memory boost. If the statements are split into multiple lines, the Visual Basic compiler will not generate the Microsoft Intermediate Language (MSIL) to allow in-place concatenation.

Summary
When we talk about ASP.Net performance, there are lots of factors in place.
Above discussed are the most critical of the speed improvements you can make in ASP.net that will have a dramatic impact on the user experience of your web application.

Friday, January 18, 2008

Microsoft .NET Framework 3.5 Issues

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 ErrorsThis 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.3. Product Issues


2.3.1. General Issues


2.3.1.1. Repairing .NET Framework 3.0 SP1 by using the Support Info dialog box in
Add or Remove Programs requires the user to specify the path of the product installation
source.


Repairing .NET Framework 3.0 SP1 by using the Support Info dialog box in Add or
Remove Programs requires the user to specify the path of the product installation
source.


To resolve this issue:



Repair .NET Framework 3.0 SP1 by using the Change option in Add or Remove Programs.

2.3.1.2. Enabling ASMX tracing breaks SqlString serialization.




Enabling ASMX tracing for an ASP.NET Web service that sends or receives a SqlString
instance results in an ArgumentOutOfRangeException error at run time.

To resolve this issue:

Disable ASMX tracing for the ASP.NET Web service.


2.3.1.3. The COM registration for System.Management.Instrumentation.dll, which is
included with .NET Framework 3.5, is incorrect because it assumes that the version
is 2.0.0.0 when it is actually 3.5.0.0.




Windows Management Instrumentation (WMI) clients get a “Provider Load Failure” error
when they attempt to use functionality that is implemented in a WMI provider that
leverages the WMI Provider Extensions infrastructure. The cause is an improperly-registered
dynamic-link library (DLL). During installation of the .NET Framework 3.5, the System.Management.Instrumentation.dll
is not correctly registered to enable COM clients to use the classes that it implements.

To resolve this issue:



1. Click Start, and click All Programs.

2. Click Microsoft Visual Studio 2008 and then click Visual Studio Tools.

3. On Windows operating systems earlier than Windows Vista, click Microsoft Visual
Studio 2008 Command Prompt to open a Command Prompt window. On Windows Vista and
later operating systems, right-click Microsoft Visual Studio 2008 Command Prompt
and then click Run as Administrator to open an elevated Command Prompt window.

4. At the command prompt, type "regasm %systemdrive%\program files\reference assemblies\microsoft\framework\v3.5\system.management.instrumentation.dll"
and then press ENTER.

Note: Developers who are writing WMI providers that leverage the WMI Provider Extensions
technology (included in .NET Framework 3.5) must ensure that System.Management.Instrumentation.dll
is registered properly, and fix the registration if necessary, before they install
their providers. Incorrect registration will result in provider failure. The procedure
at http://go.microsoft.com/fwlink/?LinkID=103794
shows how to register this DLL correctly.

2.3.1.4. In ASP.NET, LinqDataSource throws System.Security.SecurityException at
run time.




As part of the .NET Framework 3.5 Setup, some permissions are added to the default
configuration files, web_mediumtrust.config and web_hightrust.config. These
updates are required so that LinqDataSource can be used in medium trust and high
trust settings.



Custom trust configuration files cannot be detected by the installer and must be
updated manually. If trust settings are not updated, the
LinqDataSource control may raise the following runtime exception: "System.Security.SecurityException:
Request for the permission of type 'System.Security.Permissions.ReflectionPermission,
mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed."
To resolve this issue:1. Open the trust configuration file that would typically be installed in the following
location: %WINDIR%\Microsoft.NET\Framework\v2.0.50727\CONFIG\.2. Make the following two changes in this file:- Under the <SecurityClasses> element, add a nested entry for a new Security
Class, as follows:<SecurityClasses>


....
<!-- this SecurityClass section is
the work around for the compilation issue -->
<SecurityClass




Name="ReflectionPermission"




Description="System.Security.Permissions.ReflectionPermission,




mscorlib,




Version=2.0.0.0, Culture=neutral,




PublicKeyToken=b77a5c561934e089"


/>

</SecurityClasses>







- In the <NamedPermissionSets> section, nested in the ASP.NET <PermissionSet>,
add a <IPermission> element for
reflection permission, as follows:




<NamedPermissionSets>




<PermissionSet


class="NamedPermissionSet"


version="1"


Name="ASP.NET">


...

<!-- this IPermission
section is the work around for the reflection issue -->

<IPermission


class="ReflectionPermission"


version="1"


Flags="RestrictedMemberAccess"

/>

</PermissionSet>

...



</NamedPermission>



3. Save the file and close it.2.3.1.5. On Windows XP, existing managed control URL actions for current user are
overwritten when user upgrades to .NET Framework 2.0, .NET Framework 3.0, or .NET
Framework 3.5.




When the runtime is upgraded from .NET Framework 2.0 or .NET Framework 3.0 to .NET
Framework 3.5, any of the existing managed code URL actions for the current user
are overwritten by the default settings. For example, URL actions that the user
set to "Disabled" could be reset to the default "Enabled".


The following two URL actions are known to be affected: “Run components not signed
with Authenticode” and “Run components signed with Authenticode”.

This behavior occurs on Windows XP, but does not occur on Windows 2003 and Windows
Vista.


This behavior also occurs when .NET Framework 1.1 is upgraded to .NET Framework
2.0.

To resolve this issue:



The user must reset URL actions manually after a .NET Framework upgrade.


2.3.1.6. Internet Explorer Setup resets the URL action "Permissions for Components
with Manifests" from "Disabled" to "High Safety" during installation.




When Internet Explorer 6 is upgraded to Internet Explorer 7, if the URL action "Permissions
for Components with Manifests" is set to "Disabled", it is changed to "High Safety"
(the default). This occurs because Internet Explorer 7 Setup does not know that
the URL action has been changed from the default; therefore, it resets it to the
default. This is noteworthy because the default Medium-High security setting may
be less restrictive than the user's previously chosen setting.

To resolve this issue:



The user must reset URL actions manually after an upgrade.

2.3.2. Windows Communication Foundation
(WCF)


2.3.2.1. wsHttpBinding that has message security sign-only contract requirements
produces non-compliant messages.


WCF emits a <sp:EncryptSignature> assertion in the service’s security policy
every time the message security is used in the wsHttpBinding binding. To make WCF
compliant with the security policy specification, it does not emit the <sp:EncryptSignature>
assertion if the entire service contract is marked as ProtectionLevel.Sign or ProtectionLevel.None
and nothing is encrypted in any contract’s operation message (for example, username
token).


To resolve this issue:



No workaround is available.

2.3.2.2. Cannot resolve relative externalMetadataLocations when HTTPS and configured
MEX endpoints are used.



When metadata publishing for a WCF service over HTTPS is configured by using ServiceMetadataBehavior
with a relative ExternalMetadataLocation, metadata requests cannot be resolved and
the following exception message is displayed if any metadata exchange (MEX) endpoints
are configured: "The URL supplied to ServiceMetadataBehavior via the ExternalMetadataLocation
property or the externalMetadataLocation attribute in the serviceMetadata section
in config was a relative URL and there is no base address with which to resolve
it."

To resolve this issue:

Remove any configured MEX endpoints from the WCF service.


2.3.2.3. Behavior change: SSL certificates validation and certificate paths.


In earlier releases, if IIS or any other Web server was configured to use HTTPS
and to exchange the whole server certificate path instead of just the server certificate,
a WCF client might not have accepted the server's certificate as valid when intermediate
CA certificate(s) did not exist in the local certificate store. In .NET Framework
version 3.5, WCF now handles the certificate paths for server certicate verification.


To resolve this issue:



No workaround is required.

2.3.4.1. Workflow Foundation rules cannot use non-public extension methods.


Non-public extension methods that are defined in a workflow project cannot be used
as part of Workflow Foundation rules.


To resolve this issue:

Make the extension methods public.

Dotnet-Interviews