Monday, August 8, 2011

A name was started with an invalid character

Error Message: A name was started with an invalid charactertrans_002
·         I came across a distinct error. The details are below: 
Problem:
I created a website & publish it to my localhost. It was working fine from VS 2005 environment. However when I try to access the website from localhost I am getting this error.
Following error is coming:-
The XML page cannot be displayed
Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.
A name was started with an invalid character. Error processing resource 'http://localhost/WebSite/TradingDesk/'. Line 1, P...
<%@ page language="VB" autoeventwireup="false" inherits="_Default, App_Web_v_5445nj" masterpagefile="~/Site.master" %>...

Solution:
1)      Open a command prompt and navigate to this dir
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727
2)      Run these commands in this order from command prompt:

·        aspnet_regiis.exe –i
·        aspnet_regiis.exe –e
·        aspnet_regiis –ga ASPNET
·        aspnet_regiis –iru
·        aspnet_regiis -s W3SVC/1/Root/.

3)      Restart IIS

0 comments: