By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,492 Members | 1,289 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,492 IT Pros & Developers. It's quick & easy.

Forms Authentication with 2 different apps, same login.aspx

P: n/a
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
Share this Question
Share on Google+
5 Replies


P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.