ASPX error in IE: Cannot view XML input using XSL style sheet


I recently created aspx pages in Visual Web Developer 2005 Express and everything works fine in my VWD enviroment but when I try to open the pages outside the development area, in IE, I get the following error: Cannot view XML input using XSL style sheet...

I have put copies of my files into the wwwroot folder, so that I can test on my local PC and accross our intranet,
but I end up with above error.

How can I solve this?
This is my first attempt at this so I'm totally a newby... Please help.

Thank you in advance.
Who is Participating?
kcchenkdConnect With a Mentor Commented:

1.install Internet Information Service from component install from window xp professional, if you doens't have one on your machine.

2.  create vitual directory name[yourapplicationname] mapped to  [yourapplicationfolder] (c:\inetpub\wwwroot \yourApplicationFolder)  in iis, set version to 2.0, and add Default.aspx to Default Documents,  and then copy your files to [yourapplicationfolder](c:\inetpub\wwwroot \yourApplicationFolder)

3.test on your localmachine by typing in url: localhost/[yourapplicationname] on internet explore
NDeMeyerAuthor Commented:
I followed the above steps but it gave the following:

Server Error in '/K' Application.
Failed to access IIS metabase.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Web.Hosting.HostingEnvironmentException: Failed to access IIS metabase.

The process account used to run ASP.NET must have read access to the IIS metabase (e.g. IIS://servername/W3SVC). For information on modifying metabase permissions, please see

Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[HostingEnvironmentException: Failed to access IIS metabase.]
   System.Web.Configuration.MetabaseServerConfig.MapPathCaching(String siteID, VirtualPath path) +3492186
   System.Web.Configuration.MetabaseServerConfig.System.Web.Configuration.IConfigMapPath.MapPath(String siteID, VirtualPath vpath) +9
   System.Web.Hosting.HostingEnvironment.MapPathActual(VirtualPath virtualPath, Boolean permitNull) +163
   System.Web.CachedPathData.GetConfigPathData(String configPath) +382
   System.Web.CachedPathData.GetConfigPathData(String configPath) +243
   System.Web.CachedPathData.GetApplicationPathData() +68
   System.Web.CachedPathData.GetVirtualPathData(VirtualPath virtualPath, Boolean permitPathsOutsideApp) +3385695
   System.Web.Configuration.RuntimeConfig.GetLKGRuntimeConfig(VirtualPath path) +189

Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.42

Sorry for late reply

Try this, in iis, view property of Default Web Site,
and Under Directory Security Tab

Click Edit button for anonyous access, Check button for anonyous access should be checked, and User Name should be current account you are using, or create a account that have rights to read and write vitual diretory folder.

Hope it will help

Hi i am getting the error message when accessig a remote web service using .net window application:
The XML page cannot be displayed
Cannot view XML input using style sheet. Please correct the error and then click the Refresh button, or try again later.


XML document must have a top level element. Error processing resource '

What could be the issue
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.