Can't Run

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Mark Oliver

    Can't Run

    Hi, When i try to run without debugging from the ide i get :

    Server Error in '/' Application.
    --------------------------------------------------------------------------------

    Configuration Error
    Description: An error occurred during the processing of a configuration file
    required to service this request. Please review the specific error details
    below and modify your configuration file appropriately.

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

    Source Error:

    Line 44: by Microsoft that offers a single logon and core profile
    services for member sites.
    Line 45: -->
    Line 46: <authenticati on mode="windows" />
    Line 47:
    Line 48: <!-- AUTHORIZATION


    What do i do to fix this problem?

    Thanks,
    Mark


  • Karl Seguin

    #2
    Re: Can't Run

    Mark,
    There are a number of places where configuration settings can be placed.
    machine.config, web.config, @Page and @Control directives. Some
    configuration settings aren't valid in all places. For example, you can put
    a memoryLimit setting in the @Control directive, only in the
    machine.config' s processModel section. This error is telling you that you
    have a configuration setting somewhere it doesn't belong. From the looks of
    it, I'd say you are trying to set the authentication setting in a web.config
    file which isn't at the root of the application - this is not allowed.

    The two possibilities are (a) this is a mistake and the web.config IS at the
    root of the application. If this is the case, then make sure the application
    is set up as either a virtual directory or an application in IIS. More
    likely (and (b) ), you are trying to set specific authentication for a
    sub-folder or your site. The way to do this is to place the information
    in the ROOT web.config and use the LOCATION element to control where it
    applies to. Check out
    http://www.devhood.com/tutorials/tut...tutorial_id=85 for
    more information

    Karl

    --
    MY ASP.Net tutorials
    Programming blog exploring Zig, Elixir, Go, Testing, Design and Performance



    "Mark Oliver" <camarkco@hotma il.com> wrote in message
    news:Toydnd5R-PBPEDTcRVn-qQ@adelphia.com ...[color=blue]
    > Hi, When i try to run without debugging from the ide i get :
    >
    > Server Error in '/' Application.
    > --------------------------------------------------------------------------[/color]
    ------[color=blue]
    >
    > Configuration Error
    > Description: An error occurred during the processing of a configuration[/color]
    file[color=blue]
    > required to service this request. Please review the specific error details
    > below and modify your configuration file appropriately.
    >
    > Parser Error Message: It is an error to use a section registered as
    > allowDefinition ='MachineToAppl ication' beyond application level. This[/color]
    error[color=blue]
    > can be caused by a virtual directory not being configured as an[/color]
    application[color=blue]
    > in IIS.
    >
    > Source Error:
    >
    > Line 44: by Microsoft that offers a single logon and core[/color]
    profile[color=blue]
    > services for member sites.
    > Line 45: -->
    > Line 46: <authenticati on mode="windows" />
    > Line 47:
    > Line 48: <!-- AUTHORIZATION
    >
    >
    > What do i do to fix this problem?
    >
    > Thanks,
    > Mark
    >
    >[/color]


    Comment

    • Mark Oliver

      #3
      Re: Can't Run

      Hi,

      I screwed around with inetmgr.exe not really knowing what i was doing,
      Something i did made everything work, i am guessing it was setting the
      Application name in the Directory Tab for Properties for my site. Thanks
      for the "either a virtual directory or an application in IIS" tip.

      Mark



      "Karl Seguin" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME net>
      wrote in message news:eiX4cDW1EH A.2568@TK2MSFTN GP11.phx.gbl...[color=blue]
      > Mark,
      > There are a number of places where configuration settings can be placed.
      > machine.config, web.config, @Page and @Control directives. Some
      > configuration settings aren't valid in all places. For example, you can
      > put
      > a memoryLimit setting in the @Control directive, only in the
      > machine.config' s processModel section. This error is telling you that you
      > have a configuration setting somewhere it doesn't belong. From the looks
      > of
      > it, I'd say you are trying to set the authentication setting in a
      > web.config
      > file which isn't at the root of the application - this is not allowed.
      >
      > The two possibilities are (a) this is a mistake and the web.config IS at
      > the
      > root of the application. If this is the case, then make sure the
      > application
      > is set up as either a virtual directory or an application in IIS. More
      > likely (and (b) ), you are trying to set specific authentication for a
      > sub-folder or your site. The way to do this is to place the information
      > in the ROOT web.config and use the LOCATION element to control where it
      > applies to. Check out
      > http://www.devhood.com/tutorials/tut...tutorial_id=85 for
      > more information
      >
      > Karl
      >
      > --
      > MY ASP.Net tutorials
      > http://www.openmymind.net/
      >
      >
      > "Mark Oliver" <camarkco@hotma il.com> wrote in message
      > news:Toydnd5R-PBPEDTcRVn-qQ@adelphia.com ...[color=green]
      >> Hi, When i try to run without debugging from the ide i get :
      >>
      >> Server Error in '/' Application.
      >> --------------------------------------------------------------------------[/color]
      > ------[color=green]
      >>
      >> Configuration Error
      >> Description: An error occurred during the processing of a configuration[/color]
      > file[color=green]
      >> required to service this request. Please review the specific error
      >> details
      >> below and modify your configuration file appropriately.
      >>
      >> Parser Error Message: It is an error to use a section registered as
      >> allowDefinition ='MachineToAppl ication' beyond application level. This[/color]
      > error[color=green]
      >> can be caused by a virtual directory not being configured as an[/color]
      > application[color=green]
      >> in IIS.
      >>
      >> Source Error:
      >>
      >> Line 44: by Microsoft that offers a single logon and core[/color]
      > profile[color=green]
      >> services for member sites.
      >> Line 45: -->
      >> Line 46: <authenticati on mode="windows" />
      >> Line 47:
      >> Line 48: <!-- AUTHORIZATION
      >>
      >>
      >> What do i do to fix this problem?
      >>
      >> Thanks,
      >> Mark
      >>
      >>[/color]
      >
      >[/color]


      Comment

      • Steven Cheng[MSFT]

        #4
        Re: Can't Run

        Hi Mark,

        You're right, it is exactly the
        "setting the Application name in the Directory Tab for Properties for my
        site."

        makes your web application work. Karl's suggestion is quite correct and
        also based on the error message you provided, you can also get the ideas,
        the following lines in error message:

        ===========
        Server Error in '/' Application.
        ----------------------------------------------------------------------------
        ----
        ===========

        means the error occur at the root of the web application and then, the
        below info

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

        has told us that we may need to configured the application's virutal
        directory as "Applicatio n". That's just what you did later.

        Also, as Karl has mentioned, the elements in the web.config setting may
        have different scope limitation. Some can be set in machine.config or
        web.config level or sub directory's web.config setting, some may be only
        allowed in machine.config / web.config level. For a complete reference,
        you can have a look at the web application config file schema:

        ASP.NET Settings Schema
        Find official documentation, practical know-how, and expert guidance for builders working and troubleshooting in Microsoft products.

        onSectionSchema .asp?frame=true

        (You can find each element's scope requirement at the bottom of its
        detailed page)

        Then, if you encounter similiar error later, you can try checking such
        setting first. Hope also helps.

        Regards,

        Steven Cheng
        Microsoft Online Support

        Get Secure! www.microsoft.com/security
        (This posting is provided "AS IS", with no warranties, and confers no
        rights.)




        Comment

        Working...