Microsoft Products Retirement

Earlier, I was not sure if I can share the information outside, but got a confirmation today that I can.

Microsoft shared the following information with us in order to be better prepared for the upcoming year.
These are the Microsoft products that are going to retire this year and be End Of Life, meaning – End of support.

Product End Of Life Date
SQL Server 2000 4/9/2013
Commerce Server 2002 7/9/2013
BizTalk Server 2004 7/8/2014
Project Server 2003 4/8/2014
Live Communication Server 2003 1/14/2014
Office 2003 4/8/2014
Windows XP 4/8/2014
.NET Framework 1.1 10/8/2013
Visual Studio .NET 2003 10/8/2013

It is suggested by Microsoft that we migrate to newer version if we are using any one of these products.
So please have a look at what version you are working on currently and take necessary action if needed.

Leave a comment

Posted by on March 5, 2013 in Microsoft


Tags: , , , ,

Lunch Time – An MVP Community Initiative

Lunch Time is a new talk series scheduled on every alternate Wednesday during the Lunch Time, initiated and will be presented by the Microsoft Most Valuable Professionals.

Current schedule:

Date/Time Topic
Mar 06, 2013, 12:00 PM IST Good things about .NET 4.5
Mar 20, 2013, 12:00 PM IST ASP.NET 4.5 New Features
Apr 03, 2013, 12:00 PM IST Building Site Resiliency for Exchange 2013
Apr 17, 2013, 12:00 PM IST Responsive Apps with MVC4, WebAPI and HTML5
May 01, 2013, 12:00 PM IST A Quick Look at HTML5
May 15, 2013, 12:00 PM IST Implementing SQL Server AlwaysOn

Across the globe, anyone can join in and learn from technical community leaders.

I will be presenting one of the session in this series - A Quick Look at HTML5 (Event ID: 1032545489)

Sandeep Mewara LunchTime Microsoft Event 01May13

Please register! Do share your feedback post presentation.


Tags: , , , , , , ,

Developer Day, Bangalore 23 February 2013


Publishing it a little late, but better late then never! cordially invites to Developer Day, the quarterly dose of Microsoft Developer Technologies knowledge & learning.

They bring one focussed session on Hyper-V in Windows 8 for Developers by Vijay Raj (MVP) and a panel discussion led by Amit Bansal. Apart from Amit, panelists will include real-life developer heroes Vijay Raj, Niral Bhatt & Sandeep Mewara , all MVPs.

You have the opportunity to ask any .NET/developer related question to them. Event will be hosted in Microsoft premises in Bangalore so that your experience is fabulous.

For details and registration, please visit: Developer Day

Leave a comment

Posted by on February 21, 2013 in Events, General



HTML5 Quick Start Web Application

HTML5 Quick Start

I was learning HTML5 features since December. While going through it, I was playing around making a sample web application fully HTML5 enabled – kind of self learning kit that would give a basic knowledge to anyone who goes through it. Plan was to publish it as an article so that others can learn quickly and have basic features at one place. One can play around with the feature implementation straight away post download.

It took me some time to write the article as it covered good number of features. I finished working on it and have published it today on CodeProject: HTML5 Quick Start Web Application

One can have a look at it there and provide feedback.

Leave a comment

Posted by on February 16, 2013 in ASP.NET, CSS3, HTML5, JavaScript, Mobile, Web Application


Tags: , , , , , , ,

HTTP 500 – Internal server error

Problem Statement:
This is another common error that troubles a lot of ASP.NET users. Generally, the questions are framed like:

I receive a HTTP 500 – Internal Server Error  exception while trying to browse my hosted web application. Exception message says “This error (HTTP 500 Internal Server Error) means that the website you are visiting had a server problem which prevented the webpage from displaying”. Please help, how to resolve it?

Any HTTP request made to web application running on IIS returns the status of the response. This HTTP status code indicates about the request success or failure. If the request was unsuccessful, it might provide the reason why so.

Out of various status code, 5xx are the codes related to Server error. They indicate that the server failed to complete the request because server encountered an error.

The 500 Internal Server Error is a very general HTTP status code. It means something has gone wrong on the website and webserver is unable to specify what exactly, thus failing in fulfilling the request made by the client. This is not related to client and the fault is in the webpage/website requested that resides on server. This status code can be considered as a ‘catch-all’ server error of Web server.

More details around various HTTP status code: The HTTP status code in IIS 7.0, IIS 7.5, and IIS 8.0

Possible Resolutions:
Make sure that internally webserver maintains some kind of internal error logs that gives more detail of what went wrong and thus help in diagnosing the issue. Generally, it is logged into Windows Event Logs on the server. Thus, first thing while troubleshooting the error is to see Windows Event Logs on the server to find what went wrong.

Other useful thing to troubleshoot it would be to disable friendly HTTP error messages to see if the raw content can provide a direction to look more. Steps:

  • Go to menu Tools/Internet Options in your IE.
  • Click on the Advanced tab & then uncheck “Show friendly HTTP error messages” option & then click Ok.
  • Now, when on accessing the same web page, much more developer meaningful error message will be shown.

Moving on, following are most common:
Option #1: HRESULT: 0×80070035 – The page cannot be displayed because an internal server error has occurred.
This occurs because the server that is running IIS cannot access the configured root directory of the requested location.

Resolution would be to make sure that the server that is running IIS can access the configured root directory of the requested location.

Option #2: HRESULT: 0x800700c1 – The page cannot be displayed because an internal server error has occurred.
This occurs because a script mapping is not valid.

Resolution would be to make sure that the script mapping points to the ISAPI.dll file that can process the request.
To do this, follow these steps:

  1. Click Start, click Run, type inetmgr.exe, and then click OK.
  2. In IIS Manager, expand server name, expand Web sites, and then click the Web site that you want to modify.
  3. In Features view, double-click Handler Mappings.
  4. Make sure that the script mapping points to the correct ISAPI.dll file. (e.g: .asp files should map to the %windir%\system32\inetsrv\asp.dll file)

Option #3: HRESULT: 0x8007007f – There is a problem with the resource you are looking for, so it cannot be displayed.
This occurs because the handler mapping for the requested resource points to a .dll file that cannot process the request.

Resolution would be to edit the handler mapping for the requested resource to point to the .dll file that can process the request.
To do this, follow these steps:

  1. Click Start, click Run, type inetmgr.exe, and then click OK.
  2. In IIS Manager, expand server name, expand Web sites, and then click the Web site that you want to modify.
  3. In Features view, double-click Handler Mappings.
  4. Right-click the script mapping that you want to edit, and then click Edit.
  5. In the Edit Script Map dialog box, type the appropriate executable file in the Executable box, and then click OK.

Option #4:
One of the other possibilities could be an issue in the way web application is hosted. Some security configuration issue or conflict due to multiple config files.

Resolution would be to make sure application is hosted correctly by published the application as website and setting up the virtual directory as needed.

More details around the known issues and their resolution:
Error message when you visit a Web site that is hosted on IIS 7.0: “HTTP Error 500.0 – Internal Server Error”
Troubleshoot an “HTTP 500 – Internal Server Error” error message on IIS 4.0 or on IIS 5.0

This is a server error and can only be solved by website admin who has access to files and the web-server. There can be one of/or multiple reasons to get this error. One has to track down the issue and handle accordingly.

Leave a comment

Posted by on February 12, 2013 in ASP.NET, IIS


Tags: , ,

Extract node from XML having defined namespace using XPath in C#

Problem Statement:
At work, while working on one of the features, we had to get a specific node from an XML. Obvious choice was to use XPath. Ignoring specifics of XML, we directly put the XPath as expected and found that no node was found when we executed the path.

I had to look up on how to extract the deep embedded node we needed using XPath in such case.

We observed that the elements/nodes are bound to a namespace. When we tried the direct XPath, it was attempting to address elements that are bound to the default “no namespace” namespace, and thus nothing was retrieved.

Sample XML to work with:

<?xml version="1.0"?>
<SampleXmlRoot xmlns="">
<SampleXmlSubRoot someValue="21" xmlns="">
<SampleXmlLevel2Node id="101" xmlns="">
<SampleXmlNode2Extract num="2">
<A1 type="money">
<A2 type="money">
<A3 type="money">
<SampleXmlNodeOther num="2">
<B1 type="money">
<B2 type="money">

Based on what we observed and quick reference we learned that we need to register the namespace for namespace prefix mapping that will be used in defining the XPath.

Using XmlNamespaceManager object, we can provide a collection of namespace definitions that will be  used by CLR to resolve the elements used in the XML documents.

Step 1: Define XmlNamespaceManager

// xmlDoc is XmlDocument in which full XML is loaded
XmlNamespaceManager xmlnsManager = new XmlNamespaceManager(xmlDoc.NameTable);

// Add the namespaces used in XML to the XmlNamespaceManager
xmlnsManager.AddNamespace("sxr", "");
xmlnsManager.AddNamespace("sxsr", "");
xmlnsManager.AddNamespace("sxl2", "");

Step 2: Use select method that is overloaded to use XmlNamespaceManager along with XPath

In our case, we will select the first XmlNode that matches the XPath expression where any prefixes found in the XPath expression will be resolved using the supplied XmlNamespaceManager.

String xPath = "/sxr:SampleXmlRoot/sxsr:SampleXmlSubRoot/sxl2:SampleXmlLevel2Node/SampleXmlNode2Extract";
XmlNode extractedNode = xDoc.SelectSingleNode(xPath, xmlnsManager);

XmlNode extracted OuterXml will look something like:

<SampleXmlNode2Extract num="2">
<A1 type="money">
<A2 type="money">
<A3 type="money">

Yep, that’s the exact one we needed!

MSDN: XmlNamespaceManager Class
MSDN: XmlNode.SelectSingleNode Method (String, XmlNamespaceManager)

XPath is a wonderful way to extract node(s) and we have defined methods in place to get them. We just need to know and learn about them. XmlNamespaceManager handles the namespace and helps in defining the XPath for a given XML.

Leave a comment

Posted by on February 2, 2013 in C#


Tags: , ,

Browser Back button issue after logout

Problem description:
I have found a lot of people asking for a resolution to handle the browser’s back button once user has logged out. Typically, users reports something like:

I am facing issue in my application’s logout scenario. After the user login into website, he/she uses it(website) and when done, they do a logout, which leads them back to login page. But the problem is now, from this login page, if I click the browser back button then it again takes the user back to the previous visited page as if logged in. How can I stop user from viewing the previous page once logged out?

The browser Back button is an option to go back to previously visited pages. The back button can be considered as a pointer that is linked to the page previously visited by the user. Browser keeps a stack of the web pages visited as a doubly-linked list.

The back button works by stepping through the history of HTTP requests which is maintained by the browser itself. This history is stored in browsers cache that consists of the entire page content with resources like image and scripts. This enables browser to navigate backwards and forwards through the browser history and have each page displayed instantly from cache without the delay of having it retransmitted over the internet from the server.

Just to handle the scenario of getting page content from server, browsers have a Refresh button transmits the request to web server and get back the fresh copy of entire page. Internally, this also replaces the copy of the page in the browser’s cache.

Thus, basic reason behind the problem in discussion is Browser’s Cache!

Possible Resolutions:
On Logout, one does clear the session to make sure user related data no more exists. Now, browsers cache needs to be handled such that browser has no history (this will make back/forward button in browser grayed out disabled.) Here are various ways of how one can do it:

Option #1:  Set Response Cache settings in code-behind file for a page

// Code disables caching by browser.

Option #2: Set META tag for HTTP cache settings in your ASPX page header

<META Http-Equiv="Cache-Control" Content="no-cache"/>
<META Http-Equiv="Pragma" Content="no-cache"/>
<META Http-Equiv="Expires" Content="0"/>

Option #3: Clear browser’s history through JavaScript using script tag

//clears browser history and redirects url
<SCRIPT LANGUAGE="javascript">
function ClearHistory()
     var backlen = history.length;
     window.location.href = loggedOutPageUrl

Option #4: Clear browser’s history through JavaScript injecting through code-behind file via Response

protected void LogOut()
     string loggedOutPageUrl = "Logout.aspx";
     Response.Write("&lt;script language='javascript'&gt;");
     Response.Write("function ClearHistory()");
     Response.Write(" var backlen=history.length;");
     Response.Write(" history.go(-backlen);");
     Response.Write(" window.location.href='" + loggedOutPageUrl + "'; ");

Option #5: Clear browser’s history through JavaScript injecting through code-behind file via Page.ClientScript


Any one or combination of above can be used to handle the scenario.

Though, I would like to call out that it’s not a good thing to mess with browser’s history. One should implement it, only if they really need it and are prepared to accept that it is not a good practice. Lastly, few would not work if one disables JavaScript.


Posted by on January 31, 2013 in ASP.NET, JavaScript


Tags: , , ,


Get every new post delivered to your Inbox.