Results 1 to 10 of 10

Thread: [RESOLVED] allowDefinition="MachineToApplication"

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2005
    Posts
    1,170

    Resolved [RESOLVED] allowDefinition="MachineToApplication"

    I use visual studio 2008 to work on the web application. I don't have IIS on my vista, the problem is I am using authentication form mode in the web.config, now I want to exclude the registration page so I added the location tag ... but now if I navigate to the registration page, I am getting the error allowDefinition="MachineToApplication" .. I don't have IIS to look at the virtual directory, I only run my project via VS2008, what can I to do fix this?

  2. #2
    Smitten by reality Harsh Gupta's Avatar
    Join Date
    Feb 2005
    Posts
    2,938

    Re: allowDefinition="MachineToApplication"

    Can you please post the entire Error message? On which node is it throwing the error?
    Show Appreciation. Rate Posts.

  3. #3

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2005
    Posts
    1,170

    Re: allowDefinition="MachineToApplication"

    Error 101 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.

    The part that causes this was the Location tag in the web.config.. I am using authentication forms mode, but I want to exclude my register.aspx file, hence I added the location tag, but it's throwing me the above error, and I don't have IIS.

  4. #4
    Frenzied Member axion_sa's Avatar
    Join Date
    Jan 2002
    Location
    Joburg, RSA
    Posts
    1,724

    Re: allowDefinition="MachineToApplication"

    Any sub-folders with backup .configs? --> http://blogs.msdn.com/robgruen/archi...12/464196.aspx

  5. #5

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2005
    Posts
    1,170

    Re: allowDefinition="MachineToApplication"

    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.

    axion_Sa: NO, no back up .configs anywhere besides my web.config in the main root directory with the default.aspx

  6. #6

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2005
    Posts
    1,170

    Re: allowDefinition="MachineToApplication"

    Like I said I don't have IIS, I just run my project via VS2005... I cannot check whether or not the the VD is set to application or not.

  7. #7

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2005
    Posts
    1,170

    Re: allowDefinition="MachineToApplication"

    oops, turns out I put deny user vs. allow users , but now my problem is I have a banner file that i stored under images folder, it won't display cause it needs to be authenticated...how do I open that images folder to allow all users as well?

    <location path="Register.aspx">
    <system.web>
    <authorization>
    <allow users="*"/>
    </authorization>
    </system.web>
    </location>

  8. #8

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2005
    Posts
    1,170

    Re: allowDefinition="MachineToApplication"

    Oh dang.. found the solution again haha..... but now the config file looks so ugly..

    cause I have to allow a few folders: Images, Photos, TextFiles.... how to combine them into one location tag? asp.net guru out there?

    <location path="Images">
    <system.web>
    <authorization>
    <allow users="*"/>
    </authorization>
    </system.web>
    </location>

  9. #9
    Frenzied Member brin351's Avatar
    Join Date
    Mar 2007
    Location
    Land Down Under
    Posts
    1,293

    Re: allowDefinition="MachineToApplication"

    forms authentication (asp.net) will only respond to asp.net files (.aspx etc) . .net is not involved with .jpg .txt etc they are served by IIS no "authentication" will take place.

    I don't really understand your auth structure - is it like
    Deny everyone in root directory then Alow some sub directories - which is weird.

    Normally you just put <deny users="?"/> (deny all users not authenticated) in a web.config in the directory your protecting. So your not using location tags there is a individual web.config in each protected folder.

  10. #10

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2005
    Posts
    1,170

    Re: allowDefinition="MachineToApplication"

    Well, just started to learn asp.net lol... didn't know that when I created the project.......... lesson to learn

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width