The allowDefinition='MachineToApplication' error

Discussion in 'ASP .Net' started by princessjewel62@gmail.com, Nov 17, 2006.

  1. Guest

    Hi all,

    Im having a big problem. Im trying out a program which works fine
    yesterday but today it gives me more headache. It is about session
    sharing between ASP and ASP.NET application.

    The error is:

    ========================================================================
    Parser Error Message:

    It is an error to use a section registered as
    allowDefinition='MachineToApplication' beyond application level. This
    error can be caused by a virtual directory not being configured as an
    application in IIS.

    Source Error:

    Line 52: <sessionState mode="InProc"
    stateConnectionString="tcpip=127.0.0.1:42424" sqlConnectionString="data
    source=127.0.0.1;user id=sa;password=" cookieless="false" timeout="20"
    />

    ========================================================================
    and by the way, I have turned off the ASP session under the ASP
    Configuration tab. Is the problem lies in the session timeout?

    Anyone help me out please. thank you....
     
    , Nov 17, 2006
    #1
    1. Advertising

  2. Guest

    And oh, by the way, the program works perfectly fine in Mozilla Firefox
    browser but not in Internet Explorer 7. Any idea what is the cause of
    this? Thank you again in advance..
     
    , Nov 17, 2006
    #2
    1. Advertising

  3. You are attempting to define Session State in a web.config
    in a directory which is not configured as an Application.

    If there's a parent directory defined as an Application,
    simply remove the <sessionState mode...> lines from
    the web.config in the current directory.

    If there's no parent directory configured as an IIS Application,
    create an IIS Application which points to the directory where
    the web.config exists...and leave the <sessionState mode...> lines in.



    Juan T. Llibre, asp.net MVP
    asp.net faq : http://asp.net.do/faq/
    foros de asp.net, en espaƱol : http://asp.net.do/foros/
    ===================================
    <> wrote in message
    news:...
    > Hi all,
    >
    > Im having a big problem. Im trying out a program which works fine
    > yesterday but today it gives me more headache. It is about session
    > sharing between ASP and ASP.NET application.
    >
    > The error is:
    >
    > ========================================================================
    > Parser Error Message:
    >
    > It is an error to use a section registered as
    > allowDefinition='MachineToApplication' beyond application level. This
    > error can be caused by a virtual directory not being configured as an
    > application in IIS.
    >
    > Source Error:
    >
    > Line 52: <sessionState mode="InProc"
    > stateConnectionString="tcpip=127.0.0.1:42424" sqlConnectionString="data
    > source=127.0.0.1;user id=sa;password=" cookieless="false" timeout="20"
    > />
    >
    > ========================================================================
    > and by the way, I have turned off the ASP session under the ASP
    > Configuration tab. Is the problem lies in the session timeout?
    >
    > Anyone help me out please. thank you....
    >
     
    Juan T. Llibre, Nov 17, 2006
    #3
  4. Guest

    Hi Juan T. Libre,

    Thanks for that. It works. But the problem now lies in the .asp page.
    This is what it says:

    ==================================================================
    "This type of page is not served.

    Description: The type of page you have requested is not served because
    it has been explicitly forbidden. The extension '.asp' may be
    incorrect. Please review the URL below and make sure that it is
    spelled correctly. "

    The extension is correct. I tried adding this code into the page
    requested, testPage.asp,

    "<%
    Response.Write("LOGON_USER: " & _
    Request.ServerVariables("LOGON_USER"))
    %>"

    ==================================================================

    But to no avail. I am the only user in this computer, and I have set
    "Everyone" have the "Read" access. But the result is the same. I'm
    confused. Thank you.
     
    , Nov 20, 2006
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Alex D.
    Replies:
    1
    Views:
    9,559
    Alex D.
    May 20, 2005
  2. =?Utf-8?B?UGF0cmljayBQYXF1aW4=?=

    Precompilation Error allowDefinition='MachineToApplication'

    =?Utf-8?B?UGF0cmljayBQYXF1aW4=?=, Mar 30, 2006, in forum: ASP .Net
    Replies:
    4
    Views:
    12,575
  3. Replies:
    23
    Views:
    1,114
    Juan T. Llibre
    Nov 13, 2006
  4. jc
    Replies:
    1
    Views:
    810
    Michael Nemtsev [MVP]
    Oct 28, 2008
  5. RayLopez99
    Replies:
    1
    Views:
    4,393
    RayLopez99
    Jan 30, 2009
Loading...

Share This Page