473,320 Members | 1,868 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Forms Authentication with 2 different apps, same login.aspx

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#
application to authenticate using the same mechanism as the intranet
app. Therefore...if I try to login to the c# app, it should redirect
me to the intranet login. Once I pass authentication, I should be able
to access the c# app.

Now. Here is a piece of my c# apps web.config:

<authentication mode="Forms">
<forms loginUrl="http://intranetURL/logon.aspx"
name="adAuthCookie" timeout="60" path="/">
</forms>
</authentication>

When I try to access the C# apps page, it redirects me to logon.aspx as
intended. But once I login, it doesn't authenticate me for the C#
app.. If I try to go back to the C# app, it just takes me right back
to login.

An easy solution would be to just to basically merge the c# and the vb
project into one and it would work fine...but...alas...you can't mix
the two languages. How can I get authentication working between to
apps of different language with the same form mechanism?

If you need any more specific information, I will gladly give. Thanks
in advance!!

Jul 12 '06 #1
5 5078
I am not sure. But you can try to put C# applications into the same directory
as VB application. Or do something similar.

David

"dj****@gmail.com" wrote:
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#
application to authenticate using the same mechanism as the intranet
app. Therefore...if I try to login to the c# app, it should redirect
me to the intranet login. Once I pass authentication, I should be able
to access the c# app.

Now. Here is a piece of my c# apps web.config:

<authentication mode="Forms">
<forms loginUrl="http://intranetURL/logon.aspx"
name="adAuthCookie" timeout="60" path="/">
</forms>
</authentication>

When I try to access the C# apps page, it redirects me to logon.aspx as
intended. But once I login, it doesn't authenticate me for the C#
app.. If I try to go back to the C# app, it just takes me right back
to login.

An easy solution would be to just to basically merge the c# and the vb
project into one and it would work fine...but...alas...you can't mix
the two languages. How can I get authentication working between to
apps of different language with the same form mechanism?

If you need any more specific information, I will gladly give. Thanks
in advance!!

Jul 12 '06 #2
Can you do that though? It is my understanding that 2 different apps
would require their own web.config file...Can't have 2 of those in the
same folder...perhaps there is a way I can check for the session
variable \ cookie that the authentication mechanism uses in the C# app
and if it doesn't exist, redirect to the VB's login.aspx? hmm...anyone
else know of a best practices approach to this?

david wrote:
I am not sure. But you can try to put C# applications into the same directory
as VB application. Or do something similar.

David

"dj****@gmail.com" wrote:
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#
application to authenticate using the same mechanism as the intranet
app. Therefore...if I try to login to the c# app, it should redirect
me to the intranet login. Once I pass authentication, I should be able
to access the c# app.

Now. Here is a piece of my c# apps web.config:

<authentication mode="Forms">
<forms loginUrl="http://intranetURL/logon.aspx"
name="adAuthCookie" timeout="60" path="/">
</forms>
</authentication>

When I try to access the C# apps page, it redirects me to logon.aspx as
intended. But once I login, it doesn't authenticate me for the C#
app.. If I try to go back to the C# app, it just takes me right back
to login.

An easy solution would be to just to basically merge the c# and the vb
project into one and it would work fine...but...alas...you can't mix
the two languages. How can I get authentication working between to
apps of different language with the same form mechanism?

If you need any more specific information, I will gladly give. Thanks
in advance!!
Jul 12 '06 #3
Oh yeah...and if I decided to just read the other apps session variable
to determine authentication, how can I do that from another app?

dj****@gmail.com wrote:
Can you do that though? It is my understanding that 2 different apps
would require their own web.config file...Can't have 2 of those in the
same folder...perhaps there is a way I can check for the session
variable \ cookie that the authentication mechanism uses in the C# app
and if it doesn't exist, redirect to the VB's login.aspx? hmm...anyone
else know of a best practices approach to this?

david wrote:
I am not sure. But you can try to put C# applications into the same directory
as VB application. Or do something similar.

David

"dj****@gmail.com" wrote:
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#
application to authenticate using the same mechanism as the intranet
app. Therefore...if I try to login to the c# app, it should redirect
me to the intranet login. Once I pass authentication, I should be able
to access the c# app.
>
Now. Here is a piece of my c# apps web.config:
>
<authentication mode="Forms">
<forms loginUrl="http://intranetURL/logon.aspx"
name="adAuthCookie" timeout="60" path="/">
</forms>
</authentication>
>
When I try to access the C# apps page, it redirects me to logon.aspx as
intended. But once I login, it doesn't authenticate me for the C#
app.. If I try to go back to the C# app, it just takes me right back
to login.
>
An easy solution would be to just to basically merge the c# and the vb
project into one and it would work fine...but...alas...you can't mix
the two languages. How can I get authentication working between to
apps of different language with the same form mechanism?
>
If you need any more specific information, I will gladly give. Thanks
in advance!!
>
>
Jul 12 '06 #4
Can you ference other application in Visual Studio? Does it work?

David

"dj****@gmail.com" wrote:
Oh yeah...and if I decided to just read the other apps session variable
to determine authentication, how can I do that from another app?

dj****@gmail.com wrote:
Can you do that though? It is my understanding that 2 different apps
would require their own web.config file...Can't have 2 of those in the
same folder...perhaps there is a way I can check for the session
variable \ cookie that the authentication mechanism uses in the C# app
and if it doesn't exist, redirect to the VB's login.aspx? hmm...anyone
else know of a best practices approach to this?

david wrote:
I am not sure. But you can try to put C# applications into the same directory
as VB application. Or do something similar.
>
David
>
"dj****@gmail.com" wrote:
>
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#
application to authenticate using the same mechanism as the intranet
app. Therefore...if I try to login to the c# app, it should redirect
me to the intranet login. Once I pass authentication, I should be able
to access the c# app.

Now. Here is a piece of my c# apps web.config:

<authentication mode="Forms">
<forms loginUrl="http://intranetURL/logon.aspx"
name="adAuthCookie" timeout="60" path="/">
</forms>
</authentication>

When I try to access the C# apps page, it redirects me to logon.aspx as
intended. But once I login, it doesn't authenticate me for the C#
app.. If I try to go back to the C# app, it just takes me right back
to login.

An easy solution would be to just to basically merge the c# and the vb
project into one and it would work fine...but...alas...you can't mix
the two languages. How can I get authentication working between to
apps of different language with the same form mechanism?

If you need any more specific information, I will gladly give. Thanks
in advance!!

Jul 13 '06 #5
I found a great simple solution to my problem here:

http://www.codeproject.com/aspnet/as...nglesignon.asp

Thanks for all who tried to help.

david wrote:
Can you ference other application in Visual Studio? Does it work?

David

"dj****@gmail.com" wrote:
Oh yeah...and if I decided to just read the other apps session variable
to determine authentication, how can I do that from another app?

dj****@gmail.com wrote:
Can you do that though? It is my understanding that 2 different apps
would require their own web.config file...Can't have 2 of those in the
same folder...perhaps there is a way I can check for the session
variable \ cookie that the authentication mechanism uses in the C# app
and if it doesn't exist, redirect to the VB's login.aspx? hmm...anyone
else know of a best practices approach to this?
>
david wrote:
I am not sure. But you can try to put C# applications into the same directory
as VB application. Or do something similar.

David

"dj****@gmail.com" wrote:

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#
application to authenticate using the same mechanism as the intranet
app. Therefore...if I try to login to the c# app, it should redirect
me to the intranet login. Once I pass authentication, I should be able
to access the c# app.
>
Now. Here is a piece of my c# apps web.config:
>
<authentication mode="Forms">
<forms loginUrl="http://intranetURL/logon.aspx"
name="adAuthCookie" timeout="60" path="/">
</forms>
</authentication>
>
When I try to access the C# apps page, it redirects me to logon.aspx as
intended. But once I login, it doesn't authenticate me for the C#
app.. If I try to go back to the C# app, it just takes me right back
to login.
>
An easy solution would be to just to basically merge the c# and the vb
project into one and it would work fine...but...alas...you can't mix
the two languages. How can I get authentication working between to
apps of different language with the same form mechanism?
>
If you need any more specific information, I will gladly give. Thanks
in advance!!
>
>
Jul 13 '06 #6

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

Similar topics

6
by: Billy Jacobs | last post by:
I have a website which has both secure and non-secure pages. I want to uses forms authentication. How do I accomplish this? Originally I had my web.config file in the root with Forms...
11
by: ElmoWatson | last post by:
I tried on the Security newgroup, as well as other places, and haven't gotten an answer yet - - I'm pulling my hair out over this one. I'm trying to get Forms Authentication working.....I can get...
1
by: JC | last post by:
I have several applications that use forms authentication and they are currently setup to use a single login page. Everything works fine under v1.0 of the framework and everything works fine if I...
0
by: Anonieko Ramos | last post by:
ASP.NET Forms Authentication Best Practices Dr. Dobb's Journal February 2004 Protecting user information is critical By Douglas Reilly Douglas is the author of Designing Microsoft ASP.NET...
2
by: Dotnet Guy | last post by:
Hi, I have different asp.net applications as sub applications within an application and was using Framework 1.0. And I use forms authentication across the applications. In the web.config file of...
1
by: cab0san | last post by:
I have several applications all on the same server. I would like them to all use the same login page. Example: http://server1/customers/app1.aspx http://server1/suppliers/byregion/app2.aspx ...
2
by: code | last post by:
Hi, I have stumbled across an interesting problem regarding forms authentication over multiple sub domains. The topic has been covered in various forms online but never really gets a definitive...
5
by: Sebastian | last post by:
Hello, I am attempting to share forms authentication between two applications but running into problems. The documentation I've been able to dig up says (to summarize) if the the Web.Config...
1
by: n33470 | last post by:
Hi all, We have an asp.net 1.1 app that we're in the process of converting to 2.0. What I'm about to describe runs just great in the 1.1 framework, but does not work in the 2.0 framework. ...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.