|
-
May 18th, 2009, 01:00 AM
#1
Thread Starter
Frenzied Member
[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?
-
May 18th, 2009, 01:18 AM
#2
Re: allowDefinition="MachineToApplication"
Can you please post the entire Error message? On which node is it throwing the error?
-
May 18th, 2009, 10:09 AM
#3
Thread Starter
Frenzied Member
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.
-
May 18th, 2009, 02:02 PM
#4
Re: allowDefinition="MachineToApplication"
-
May 18th, 2009, 05:21 PM
#5
Thread Starter
Frenzied Member
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
-
May 18th, 2009, 05:23 PM
#6
Thread Starter
Frenzied Member
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.
-
May 18th, 2009, 05:48 PM
#7
Thread Starter
Frenzied Member
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>
-
May 18th, 2009, 05:53 PM
#8
Thread Starter
Frenzied Member
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>
-
May 18th, 2009, 07:40 PM
#9
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.
-
May 19th, 2009, 12:39 AM
#10
Thread Starter
Frenzied Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|