It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level

Rate It (8)

Last post 12-17-2009 12:21 AM by apkumar. 47 replies.

Sort Posts:

  • Re: It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level

    11-14-2008, 8:02 AM
    • Participant
      1,635 point Participant
    • sangam100
    • Member since 07-22-2008, 10:44 AM
    • Kathmandu,Nepal
    • Posts 313

    Tab Allemen, it is from the IIS manager where we can play with the virtual directory. Follow these steps:

    1. Run compmgmt.msc from your windows Run command

    2. Go to Services and Applications, then to Internet Information Services

    3. Then you go to Web Sites->Default Web Site

    4. Done? Now right click your virtual directory and select properties

    5. You see a window with the tab Virtual Directory on scene. See somewhere in the middle the Application Name

     

    Lets always remember to mark the post that helps us as "Mark as Answer".
    Very useful visual studio shortcuts and more tips and tricks
    5 Different ways to open new window in asp.net
  • Re: It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level

    11-25-2008, 8:53 AM
    • Member
      34 point Member
    • khnouman
    • Member since 04-02-2008, 7:34 AM
    • Posts 116

    Thanks that worked for me

    Great man  :)

    If the going seems easy, You are going DownHill...
  • Re: It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level

    11-29-2008, 6:10 AM
    • All-Star
      19,296 point All-Star
    • raghav_khunger
    • Member since 08-18-2008, 8:25 AM
    • Delhi, India
    • Posts 3,545
    • TrustedFriends-MVPs

     Hi,All

    Yes

    ranganh:
    Dear sanju,

    You cannot keep the web.config only in the sub-directory.  You need to have a web.config in the root directory.  If at all you want to have a web.config in the sub-directory, then the only settings you can specify are authorization, appsettings etc.,

    Unless you configure the sub-directory also as an application in the IIS Virtual directory settings, you cannot have any other settings such as authentication, session-state etc., in the web.config that you have in the sub-directory.

    Hope that makes it clear.

    Thanks.
     

     

    Hi I was Also Facing the same Problem

    I had a web.config in root directory

    And also a web.config in my Subdirectory.

     

    I was also getting the same error.

    And the solution above helped me in solving that.

    Prevoisly I  had written  Connection string section authentication section control section etc both in webconfig in root as well as subdirectory

    Removing that sections from inner web config file 

    and only keeping authorize section in it My Problem was solved.

    Thanks. 

     

    Raghav CodeASP.NET Community | My Blog | jQuery Intellisense in Visual Studio 2008




    "Success doesn't come to you…you go to it."--Marva Collins

    "Failure is success if we learn from it." Malcolm Forbes

    "Success does not come to those who wait . . . and it does not wait for anyone to come to it." Anonymous


  • Re: It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level

    12-17-2008, 7:24 AM

    Thanks alot!

    I was also facing the same problem and your solution worked for me also.

    Great deal!

    Krishan 

     

  • Re: It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level

    02-24-2009, 12:37 PM
    • Member
      96 point Member
    • Ravina
    • Member since 01-09-2008, 8:16 PM
    • Posts 91

    I had this problem too. In my sub directory web config file...i just commented out the following line:

    <authentication mode="Windows"/>

    Cheers,

    Ravina Brar
    Software Developer
    University Of Alberta
    --------------------------
    The man who smiles when things go wrong has thought of someone to blame it on.
    - Robert Bloch
  • Re: It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level

    02-28-2009, 1:05 AM
    • Member
      93 point Member
    • prabhatasp
    • Member since 01-19-2009, 7:22 AM
    • India
    • Posts 83

     

     Hi all,

    This is Prabhat here, I am getting an error on my client vista machine when installing web setup while it installed and execute successfully on my vista machine. I don't know what is problem. i am adding error detail below:

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

    As all of you are suggested, i try to check webconfig file but i have got there is only one config file in my root directory no other webconfig exists in sub folder. I can't understand actually what's problem is.

    any one please help me. Thanks in advance.
  • Re: It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level

    03-02-2009, 7:15 AM
    • Participant
      1,635 point Participant
    • sangam100
    • Member since 07-22-2008, 10:44 AM
    • Kathmandu,Nepal
    • Posts 313

    Hi prabhatasp ,

    The error [It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level] does not occur only due to mis-configuration in web.config file.  The most important part we should care about is that the error mainly originates if we do not configure virtual directory. And you must notice that there is little bit difference in configuring virtual directory in vista thatn in xp. Please search and apply the right method of publishing asp.net web project in asp.net.

    One more tip, is right version of asp.net enabled in your IIS? Please ensure this.

    Hope this helps. Please feel free to ask if any problem persists or if any help is required. Thanks.

    Lets always remember to mark the post that helps us as "Mark as Answer".
    Very useful visual studio shortcuts and more tips and tricks
    5 Different ways to open new window in asp.net
  • Re: It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level

    03-12-2009, 2:23 AM

    Thanks body to post such a helpful informationBig Smile

  • Re: It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level

    04-02-2009, 8:01 AM
    • Member
      2 point Member
    • geetanjli
    • Member since 04-02-2009, 11:51 AM
    • Posts 1
    Well, neither scenario works for me. I moved my project liste de casinos over to a new machine. Set up the virtual directories but to no avail. I get the same error. When I start without debugging, the app dies on the authentication = windows line in the web config. I thought I could move a project to a new machine, set up a virtual directory, and debug. No such luck. Any insight?
    http://www.tutorialcasino.net
  • Re: It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level

    04-28-2009, 6:37 AM
    • Member
      10 point Member
    • jadavdinesh7
    • Member since 12-09-2008, 5:45 PM
    • Posts 5

     HI All  iam also facing the same problem but  i dint create any virtual directory for  my  web app  still iam getting the same error. iam not understanding y this error is coming any help wil b appreciated. i have download the program from the following  website if anyone wants to try they can try and tell me exactly wat is the  problem.

    http://www.codeproject.com/KB/database/MySQLCsharp.aspx

    thankq

    Dinnu

     

  • Re: It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level

    05-21-2009, 7:55 AM
    • Member
      34 point Member
    • jaiprakashv
    • Member since 08-11-2008, 9:21 AM
    • Gurgaon
    • Posts 21
  • Re: It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level

    06-22-2009, 10:56 PM
    • Member
      45 point Member
    • warnov
    • Member since 06-27-2003, 12:44 AM
    • Bogotá Colombia
    • Posts 18

    Perfect problem description and solution!

    Congratz!

     I found this solution as a first result using Bing!!! Big Smile

    Open mind 4 a different coding
    Filed under:
  • Re: It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level

    10-08-2009, 7:43 PM
    • Member
      26 point Member
    • navyjax2
    • Member since 04-18-2007, 5:33 PM
    • Posts 13

    Or, if you have a subfolder in Visual Studio project that shouldn't be, or that you can consolidate into the main body of the project, you can remove it and the error will go away.   

    When I wanted to compile my web site and check-in code to Visual Studio's TFS, it gave me this error.  Turned out I forgot I had put in a subdirectory in my web site project that was just there for check-in purposes only - nothing to do with the compilation of the code.  When I took out that subfolder from the My Documents\Visual Studio 2005\WebSites\MyWebSite folder (not from the project in Visual Studio itself!), then did a build, it compiled fine.  I added the folder back with Visual Studio open - Visual Studio recognized it by asking if I wanted to load the new content (I said Yes To All) and was able to check my code in.  Don't know if this will apply or help anyone, but thought I'd give it a shot.

    -Tom

  • Re: It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level

    10-30-2009, 10:11 AM
    • Member
      17 point Member
    • pgp
    • Member since 10-22-2002, 1:02 PM
    • Posts 9

    Thanks Lunch2000,

    Your suggestion worked for me. 

  • Re: It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level

    11-21-2009, 12:03 AM
    • Member
      87 point Member
    • DnshPly9
    • Member since 10-13-2008, 4:47 PM
    • Ghaziabad India
    • Posts 33

    Dear  the virtual directory is the directory that holds the application and is configured in IIS Server.

    If you don't have IIS installed on your Machine then first you need to install IIS from the Additional Windows Components in the Add or Remove Programs of the Control Panel.

     

    After installing you will have to create a virtual directory in the Websites part of the IIS and then configure.

    This type of an error on which this whole thread is all about when you are trying to run any project that is precreated by someone (one common reason) and was configured by him in IIS and when you try to run the project is not configured to run on IIS.

     

    Hope this helps

    Thanks

              DnshPly9

Page 3 of 4 (48 items) < Previous 1 2 3 4 Next >