complete newbie question

Discussion in 'ASP .Net' started by Darren, Mar 27, 2007.

  1. Darren

    Darren Guest

    Hi,

    Having just downloaded & installed VD2005 Express Edition, read through some
    tutorial & worked though a sample or two I copied the tutorial files into a
    directory under IIS (running XP Pro SP2).

    When I ran/debugged the pages under VS2005 the pages displayed with no
    issues. When the files were copied to their own directory under
    "InetPub/wwwroot" the following error message was displayed:

    ------------------------------------
    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/MyFirstSite/page1.aspx'. Line 1,...

    <%@ Page Language="VB" %>
    -^-------------------------------------------------




    Line 1 in the page in question is as follows:
    -----------------------------------------
    <%@ Page Language="VB" %>
    -----------------------------------------

    This seems to happen even in the "default.aspx" page which has code behind
    and the following first line:
    ----------------------------
    <%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb"
    Inherits="_Default" %>
    ----------------------------
    Would it be safe to assume that the problem lies not with the code but with
    IIS?
    If so can someone still help and if not at least point me in the direction
    of the correct newsgroup to post this query to?

    Many thanks for any and all help and advice. If you require more info,
    please do not hesitate (as I know you wont) to ask. :)
    Apologies for my ignorance, if indeed that it what is at fault here, but
    please remember we all have to start somewhere ;-)

    Darren
     
    Darren, Mar 27, 2007
    #1
    1. Advertisements

  2. Darren

    Darren Guest

    Looking at the post I'm not sure if the last 2 characters were clear?
    -----------------------------------------------
    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/MyFirstSite/page1.aspx'. Line 1,...

    <%@ Page Language="VB" %>
    -^-------------------------------------------------------------
     
    Darren, Mar 27, 2007
    #2
    1. Advertisements

  3. Darren

    Darren Guest

    I will try again. The last two lines in the error message read:
    "
    <%@ Page Language="VB" %>
    -^"
    I'm thinking the last 2 characters "-^" may be important as they are not
    present in the original code.
     
    Darren, Mar 27, 2007
    #3
  4. Darren

    Hans Kesting Guest

    Hi,
    Does IIS know about "asp.net"? If you do a "view source" in the browser,
    do you see .Net code (as in the <% ... %> line)? Then IIS does not run
    the page through ASP.Net, but serves it as-is. Apparently your browser
    then guesses that the response might contain XML and runs into problems.

    The solution: run "aspnet_regiis -i" (without the "")
    You can find that command usually in
    C:\Windows\Microsoft.Net\Framework\<version>\
    (where you need to supply the version that you want to use,
    probably v2.0.50727)


    Hans Kesting
     
    Hans Kesting, Mar 27, 2007
    #4
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.