Forms Authentication with 2 different apps, same login.aspx

D

djhexx

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!!
 
G

Guest

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

David
 
D

djhexx

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?
 
D

djhexx

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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top