Ask a Question related to ASP.NET Security, Design and Development.
-
=B= #1
Sharing Forms Authentication between application and sub-application
Hi,
I'm succesfully using Forms Authentication on a site I'm working on
(MyMainApp).
In a subfolder of this site, I have a seperate ASP.NET application
(MySubApp), i.e. it's running as an application in IIS, although it's
part of the MyMainApp VS.NET project file. The structure is something
like this:
MyMainApp <!-- Application in IIS
\MySubApp <!-- Application in IIS
\images
\mySubAppFiles
web.config
\images
\includes
\MainAppSubFolder
web.config
logon.aspx, etc.
All other folders are simple virtual directories. If I try browsing
to any .aspx page in a subfolder of MyMainApp (excluding files in
MySubApp) it forces me to the login page, as it should do. However,
if I try to browse to any .aspx page in MySubApp by typing the address
in IE it brings up the page, seemingly bypassing the Forms
Authentication which is applied on both the web.config files of
MyMainApp and MySubApp. Within MySubApp the relevant section of
web.config looks like this:
<authentication mode="Forms">
<forms name=".MYAPP"
loginUrl="../logon.aspx"
protection="All"
timeout="20"
path="/"/>
</authentication>
Does anyone know why the Forms Authentication on MySubApp is being
bypassed completely?
Thanks,
Brian
=B= Guest
-
Sharing Flash application for multiple (2) users
Hello, I have a Flash application which i want to expand with a sort of Helpdesk feature. What i want is that when the user pressed the button... -
Forms Authentication to protect a cgi application
I have enabled forms authentication on an IIS 6 W2k3 server to protect access to the application files until authenticated. The actual... -
Forms Authentication to protect .cgi application problem
I have enabled forms authentication on an IIS 6 W2k3 server to protect access to the application files until authenticated. The actual... -
Restrict access to resources like .doc, .ppt etc in .net forms authentication application
Hi, We are developing a .NET app which has forms authentication. When the user types in the direct URL which is an aspx page, he will be thrown... -
How to inherit a base form in all application forms of an asp.net application
hello friend, while developing an asp.net application, i created a base form(say mybaseform1) with certain links on it. then i tried to... -
Raterus #2
Re: Sharing Forms Authentication between application and sub-application
I imagine your path attribute in your sub-webconfig is messing you up. Sure it is not looking at your main application's authentication cookie, and that is why it is letting you in?
Here is an article on sharing forms authentication, might help..
[url]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconformsauthenticationacrossapplications.asp[/url]
"=B=" <brian_is_online@yahoo.co.uk> wrote in message news:46537b79.0501130458.152db7ac@posting.google.c om...> Hi,
>
> I'm succesfully using Forms Authentication on a site I'm working on
> (MyMainApp).
>
> In a subfolder of this site, I have a seperate ASP.NET application
> (MySubApp), i.e. it's running as an application in IIS, although it's
> part of the MyMainApp VS.NET project file. The structure is something
> like this:
>
> MyMainApp <!-- Application in IIS
> \MySubApp <!-- Application in IIS
> \images
> \mySubAppFiles
> web.config
> \images
> \includes
> \MainAppSubFolder
> web.config
> logon.aspx, etc.
>
> All other folders are simple virtual directories. If I try browsing
> to any .aspx page in a subfolder of MyMainApp (excluding files in
> MySubApp) it forces me to the login page, as it should do. However,
> if I try to browse to any .aspx page in MySubApp by typing the address
> in IE it brings up the page, seemingly bypassing the Forms
> Authentication which is applied on both the web.config files of
> MyMainApp and MySubApp. Within MySubApp the relevant section of
> web.config looks like this:
>
> <authentication mode="Forms">
> <forms name=".MYAPP"
> loginUrl="../logon.aspx"
> protection="All"
> timeout="20"
> path="/"/>
> </authentication>
>
> Does anyone know why the Forms Authentication on MySubApp is being
> bypassed completely?
>
> Thanks,
>
> BrianRaterus Guest
-
Hernan de Lahitte #3
Re: Sharing Forms Authentication between application and sub-application
Try to use an absolute url on your path attribute.
Here is another article about this topic.
[url]http://weblogs.asp.net/hernandl/archive/2004/06/09/ssoformsauth.aspx[/url]
--
Hernan de Lahitte
[url]http://weblogs.asp.net/hernandl[/url]
[url]http://www.lagash.com/english/index.html[/url]
"Raterus" <raterus@hotmail.com> wrote in message
news:OM0J4Fm%23EHA.3592@TK2MSFTNGP09.phx.gbl...
I imagine your path attribute in your sub-webconfig is messing you up. Sure
it is not looking at your main application's authentication cookie, and that
is why it is letting you in?
Here is an article on sharing forms authentication, might help..
[url]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconformsauthenticationacrossapplications.asp[/url]
"=B=" <brian_is_online@yahoo.co.uk> wrote in message
news:46537b79.0501130458.152db7ac@posting.google.c om...> Hi,
>
> I'm succesfully using Forms Authentication on a site I'm working on
> (MyMainApp).
>
> In a subfolder of this site, I have a seperate ASP.NET application
> (MySubApp), i.e. it's running as an application in IIS, although it's
> part of the MyMainApp VS.NET project file. The structure is something
> like this:
>
> MyMainApp <!-- Application in IIS
> \MySubApp <!-- Application in IIS
> \images
> \mySubAppFiles
> web.config
> \images
> \includes
> \MainAppSubFolder
> web.config
> logon.aspx, etc.
>
> All other folders are simple virtual directories. If I try browsing
> to any .aspx page in a subfolder of MyMainApp (excluding files in
> MySubApp) it forces me to the login page, as it should do. However,
> if I try to browse to any .aspx page in MySubApp by typing the address
> in IE it brings up the page, seemingly bypassing the Forms
> Authentication which is applied on both the web.config files of
> MyMainApp and MySubApp. Within MySubApp the relevant section of
> web.config looks like this:
>
> <authentication mode="Forms">
> <forms name=".MYAPP"
> loginUrl="../logon.aspx"
> protection="All"
> timeout="20"
> path="/"/>
> </authentication>
>
> Does anyone know why the Forms Authentication on MySubApp is being
> bypassed completely?
>
> Thanks,
>
> Brian
Hernan de Lahitte Guest
-
brian_is_online@yahoo.co.uk #4
Re: Sharing Forms Authentication between application and sub-application
Thanks for all the help. The absolute URL did the trick!
B.
Hernan de Lahitte wrote:up. Sure> Try to use an absolute url on your path attribute.
> Here is another article about this topic.
>
> [url]http://weblogs.asp.net/hernandl/archive/2004/06/09/ssoformsauth.aspx[/url]
>
>
> --
> Hernan de Lahitte
> [url]http://weblogs.asp.net/hernandl[/url]
> [url]http://www.lagash.com/english/index.html[/url]
>
>
> "Raterus" <raterus@hotmail.com> wrote in message
> news:OM0J4Fm%23EHA.3592@TK2MSFTNGP09.phx.gbl...
> I imagine your path attribute in your sub-webconfig is messing youand that> it is not looking at your main application's authentication cookie,[url]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconformsauthenticationacrossapplications.asp[/url]> is why it is letting you in?
>
> Here is an article on sharing forms authentication, might help..
>
>it's>
>
>
>
> "=B=" <brian_is_online@yahoo.co.uk> wrote in message
> news:46537b79.0501130458.152db7ac@posting.google.c om...> > Hi,
> >
> > I'm succesfully using Forms Authentication on a site I'm working on
> > (MyMainApp).
> >
> > In a subfolder of this site, I have a seperate ASP.NET application
> > (MySubApp), i.e. it's running as an application in IIS, althoughsomething> > part of the MyMainApp VS.NET project file. The structure isbrowsing> > like this:
> >
> > MyMainApp <!-- Application in IIS
> > \MySubApp <!-- Application in IIS
> > \images
> > \mySubAppFiles
> > web.config
> > \images
> > \includes
> > \MainAppSubFolder
> > web.config
> > logon.aspx, etc.
> >
> > All other folders are simple virtual directories. If I tryHowever,> > to any .aspx page in a subfolder of MyMainApp (excluding files in
> > MySubApp) it forces me to the login page, as it should do.address> > if I try to browse to any .aspx page in MySubApp by typing the> > in IE it brings up the page, seemingly bypassing the Forms
> > Authentication which is applied on both the web.config files of
> > MyMainApp and MySubApp. Within MySubApp the relevant section of
> > web.config looks like this:
> >
> > <authentication mode="Forms">
> > <forms name=".MYAPP"
> > loginUrl="../logon.aspx"
> > protection="All"
> > timeout="20"
> > path="/"/>
> > </authentication>
> >
> > Does anyone know why the Forms Authentication on MySubApp is being
> > bypassed completely?
> >
> > Thanks,
> >
> > Brianbrian_is_online@yahoo.co.uk Guest



Reply With Quote

