"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"
Does one of your login pages work? If so, I'm guessing it is setup as a virtual directory. Then make sure the other folder containing the 2nd login page is setup as a virtual directory as well.
I learn by helping others. I may not always be correct but my intentions are good. If my answer helps please mark it as so.
<authentication> is an application-wide setting. You can't change for different request paths into your app. If you want to dynamically change which login page based upon the language then either do this within the login page or implement Applicaton_EndRequest
in global.asax to change the redirect (302) when a login is needed.
hamidhaghigh...
Member
83 Points
28 Posts
Have two LoginUrls in a double language website
Jul 03, 2012 01:32 PM|LINK
Hi
I have a Double language website (By Replication)
I try to make two login pages for this.one for english and one for a Right ordered language
but I can not configure it in web.config
this is the config section:
<configuration> <location path="fa/Founders.aspx"> <system.web> <authentication mode="Forms" > <forms loginUrl="~/fa/Login.aspx" timeout="2880"/> </authentication> <authorization> <deny users="?" /> </authorization> </system.web> </location> <location path="en/Founders.aspx"> <system.web> <authentication mode="Forms" > <forms loginUrl="~/en/Login.aspx" timeout="2880"/> </authentication> <authorization> <deny users="?" /> </authorization> </system.web> </location> </configuration>"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"
can you help me?
cornball76
Participant
1126 Points
210 Posts
Re: Have two LoginUrls in a double language website
Jul 03, 2012 01:40 PM|LINK
Does one of your login pages work? If so, I'm guessing it is setup as a virtual directory. Then make sure the other folder containing the 2nd login page is setup as a virtual directory as well.
tiagosalgado
Contributor
2410 Points
544 Posts
Re: Have two LoginUrls in a double language website
Jul 03, 2012 01:46 PM|LINK
If you request /fa/Login.aspx and /fa/Founders.aspx can you see the login page?
You may need to allow all users to access Founders.aspx and Login.aspx, setting a new location node.
http://geekswithblogs.com/TiagoSalgado
@TiagoSalgado
BrockAllen
All-Star
27574 Points
4912 Posts
MVP
Re: Have two LoginUrls in a double language website
Jul 03, 2012 01:50 PM|LINK
<authentication> is an application-wide setting. You can't change for different request paths into your app. If you want to dynamically change which login page based upon the language then either do this within the login page or implement Applicaton_EndRequest in global.asax to change the redirect (302) when a login is needed.
DevelopMentor | http://www.develop.com
thinktecture | http://www.thinktecture.com/
hamidhaghigh...
Member
83 Points
28 Posts
Re: Have two LoginUrls in a double language website
Jul 03, 2012 01:59 PM|LINK
Hi
Thanks for answer
yes I can see /fa/Login.aspx and /fa/Founders.aspx
all users have access to Login.aspx