Escaping XML text basically means we are trying to replace the “<”, “>” etc. characters that are used to construct the XML with the encoded values. Here are the 5 values that we care about
XML Value
Encoded Value
<
<
>
>
“
"
‘
'
&
&
There are several ways in which you can escape an XML file or string in .Net.
1. Using Regular [...]
If you are trying to troubleshoot problems occurred in you .Net application, especially if they are caused by ASP.net, you are now in luck. Microsoft recently released an extension for WinDbg that will allow you to diagnose high-memory issues, high-CPU issues, crashes, hangs and many other problems that might occur in a Asp.NET application. This [...]
21Apr
Posted by admin as .Net, Asp.Net, IIS7, Microsoft, Visual Studio, Web
It is very simple to get the name of the application pool current worker process is associated with in Asp.NET. You can simple use the server variables for that. For example, to display the app pool name on your web page you can simply use the below code snippet.
<%= Request.ServerVariables("APP_POOL_ID") %>
This is usually helpful when [...]
21Apr
Posted by admin as ATL, C#, MFC, Microsoft, Technology, VS 2010, VisualC, Windows
When you create a new ATL project in Visual Studio 2010, IDE generated StdAfx.h does not include the ATL namespace by default. Because of this behavior, when you try to use any ATL API (Like CComBstr for example) in your main cpp file, the build will fail with several “Undeclared Identifier” errors. Any existing project [...]
17Mar
Posted by admin as .Net, Asp.Net, Microsoft, Technology, Training
I just got this email from Microsoft. Hope this helps some one waiting to get certified for .Net Framework 4 Development. It seems slots are very limit, register asap.
You are invited to take part in one or more beta exams for Visual Studio 2010 and the Microsoft .NET Framework 4.
If you pass one of the [...]
17Sep
Posted by admin as .Net, Asp.Net, Microsoft, Technology, Web
On some occasions you would want to run some code for every change in the configuration file, like reload the cache etc.. A change in web.config prompts the app domain to reload. So one should be able to look for application domain shutdown reason to verify a configuration change. Here is how you do can [...]
15Sep
Posted by admin as .Net, Asp.Net, HTML, Microsoft, Technology, Web
On some occasions, you wish to initialize your Asp.net application even before it receives its first hit to get rid of any over heads like creating application domain, initializing the .net runtime environment etc.. To achieve this you can use aspnet_compiler to pre-compile ‘in-place’, so that in effect the application is primed. Compiling ‘in-place’ the [...]
15Sep
Posted by admin as .Net, Asp.Net, Microsoft, Technology, Web
For the starters, Adaptive control behavior is control behavior that is customized for target devices. ASP.NET provides an adaptive architecture that allows key life cycle stages of a control to be intercepted and substituted with custom behavior. A common example of adaptive control behavior is adaptive rendering where an ASP.NET Web page is rendered specific [...]
In a code behind file (like .cs file), one can use aliases for the namespaces like
using myAlias = System.MyNamespace;
But to achieve the same functionality in an .aspx page you can use something like this
<%@ Import Namespace="myAlias=System.MyNamespace" %>
Note: There should not be any spaces in the namespace value. For example you cannot use something like Namespce=”myalias [...]
14Jul
Posted by admin as Microsoft, Technology, Windows
Windows SDK installation fails with following error
A problem occurred while installing selected Windows SDK components.
Installation of the "Microsoft Windows SDK for Windows 7" product has reported the following error: Please refer to Samples\Setup\HTML\ConfigDetails.htm document for further information.
Please attempt to resolve the problem and then start Windows SDK setup again. If you continue to have problems [...]