472,958 Members | 1,685 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,958 software developers and data experts.

Use asp.net web apps login for a second asp.net web app

We have an asp.net web application that uses Forms Authentication. We need
to launch a second application from links in this app. We don't want the
user to have to also login to this second app. Is there a way to let the
second app know that we are authenticated on the first app. I thought about
just using the http_referrer and saying the second app can not launch
anywhere except from the links on the first app but its too easily spoofed.
I'd love to be able to somehow see the auth ticket from the first app or
something like that.

Thank you for any ideas!
Feb 8 '07 #1
3 6467
If you set the EnableCrossAppRedirects property to true in your
web.config(s), and both applications have identical machineKey elements (you
cannot use "autogenerate") then it should work.
Peter
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net


"dev648237923" wrote:
We have an asp.net web application that uses Forms Authentication. We need
to launch a second application from links in this app. We don't want the
user to have to also login to this second app. Is there a way to let the
second app know that we are authenticated on the first app. I thought about
just using the http_referrer and saying the second app can not launch
anywhere except from the links on the first app but its too easily spoofed.
I'd love to be able to somehow see the auth ticket from the first app or
something like that.

Thank you for any ideas!
Feb 8 '07 #2
That's great -- thank you!

I noticed an important security note when I looked into this so I'll post
here for any others who see this:
Setting the EnableCrossAppRedirects property to true to allow
cross-application redirects is a potential security threat. When
cross-application redirects are allowed, your site is vulnerable to
malicious Web sites that use your login page to convince your Web site users
that they are using a secure page on your site. To improve security when
using cross-application redirects, you should override the
RedirectFromLoginPage method to allow redirects only to approved Web sites.
(ref.: http://msdn2.microsoft.com/en-us/lib...ty(VS.80).aspx)

"Peter Bromberg [C# MVP]" <pb*******@yahoo.yabbadabbadoo.comwrote in
message news:38**********************************@microsof t.com...
If you set the EnableCrossAppRedirects property to true in your
web.config(s), and both applications have identical machineKey elements
(you
cannot use "autogenerate") then it should work.
Peter
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net


"dev648237923" wrote:
>We have an asp.net web application that uses Forms Authentication. We
need
to launch a second application from links in this app. We don't want the
user to have to also login to this second app. Is there a way to let the
second app know that we are authenticated on the first app. I thought
about
just using the http_referrer and saying the second app can not launch
anywhere except from the links on the first app but its too easily
spoofed.
I'd love to be able to somehow see the auth ticket from the first app or
something like that.

Thank you for any ideas!

Feb 8 '07 #3
Hello dev648237923,

The security warning you saw about the "EnableCrossAppRedirects" setting is
due to the consideration of some potential malicious sites(unexpected
sites) who will send redirection to your page. Actually, the
"EnableCrossAppRedirects" will be only checked when you call
"FormsAuthentication.RedirectFromLoginPage" or "GetRedirectUrl" methods(if
not enable, you can not use the two methods to redirect to/or get redirect
path of other remote application).

Therefore, you can actually disable this setting if you do not have to call
the above two methods. For example, you can let your cross application
always pass a certain security identifier in the querystring when redirect
unauthenticated users to the login application's login.aspx. Thus, the
login page can use the querystring value(or from cookie). And after
authenticated the user, you can simply call
"FormsAuthentication.SetAuthCookie" to set the authentication ticket and
manually use Response.Redirect to forward the user to the original
site(suppose there are only limited applications that can share the same
central login application)

here are some other resources on configuring machine key and cross
application forms authentication:
#How To: Configure MachineKey in ASP.NET 2.0
http://msdn2.microsoft.com/en-us/library/ms998288.aspx

#Single sign-on across multiple applications in ASP.NET
http://www.codeproject.com/aspnet/as...nglesignon.asp

Hope also helps some.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.
Feb 9 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

22
by: owen | last post by:
I have been developing web-based applications for around 3 years, first using ASP, and more recently, ASP.NET. I am starting to wonder if web applications are really the way forward for...
19
by: Siobhan | last post by:
Hi What is the recommended way to store a user's database credentials across the pages of a web application so that each time the database is accessed the system doesn't have to ask them for their...
1
by: X-Killer | last post by:
I've written a website with a login page which uses forms authentication against a username/password table. I've configured the web.config with forms authentication and with loginUrl="login.aspx"...
2
by: pv | last post by:
Hi everyone, I need help with following scenario, please: Users are accessing same web server from intranet (users previously authenticated in Active Dir) and from extranet (common public...
9
by: dana lees | last post by:
Hello, I am developing a C# asp.net application. I am using the authentication and authorization mechanism, which its timeout is set to 60 minutes. My application consists of 2 frames - a...
0
by: PolarBears | last post by:
We have several ASPX 1.1 web applications that reference a Login.aspx page. Now groups and roles have been added to .NET 2.0. And we now have the new Visual Studio 2005. I am guessing that with...
5
by: djhexx | last post by:
Hi. We have an asp.net intranet application written in VB that uses forms authentication for all it's pages. I have a C# asp.net application that I just wrote. The company would like the C#...
6
by: AppleBag | last post by:
I'm having the worst time trying to login to myspace through code. Can someone tell me how to do this? Please try it yourself before replying, only because I have asked this a couple of times in...
5
by: darrel | last post by:
This is an issue I brought up probably a year or so ago, got some advice, then was sidetracked on the project until now. So, here I am again. ;o) The situation is that we have an older chunk of...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
0
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.