473,695 Members | 1,566 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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:

<authenticati on mode="Forms">
<forms loginUrl="http://intranetURL/logon.aspx"
name="adAuthCoo kie" 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...al as...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 5126
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.c om" 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:

<authenticati on mode="Forms">
<forms loginUrl="http://intranetURL/logon.aspx"
name="adAuthCoo kie" 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...al as...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...perhap s 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.c om" 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:

<authenticati on mode="Forms">
<forms loginUrl="http://intranetURL/logon.aspx"
name="adAuthCoo kie" 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...al as...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.co m 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...perhap s 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.c om" 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:
>
<authenticati on mode="Forms">
<forms loginUrl="http://intranetURL/logon.aspx"
name="adAuthCoo kie" 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...al as...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.c om" 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.co m 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...perhap s 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.c om" 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:

<authenticati on mode="Forms">
<forms loginUrl="http://intranetURL/logon.aspx"
name="adAuthCoo kie" 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...al as...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.c om" 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.co m 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...perhap s 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.c om" 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:
>
<authenticati on mode="Forms">
<forms loginUrl="http://intranetURL/logon.aspx"
name="adAuthCoo kie" 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...al as...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
4830
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 Authentication set up and it worked just fine. Then I realized that I needed to have some pages unsecure. I then created 2 directories. One named Secure and the other named Public. I placed my web.config file in my
11
3579
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 any requested page to automatically go to the Login.aspx page, AND, the ReturnURL querystring is correct in the address bar, but no matter what, I can't get it, once the user is authenticated, to redirect to the new page. It ALWAYS refreshes the...
1
1997
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 have all applications running under v1.1. However, I need the login page and a few apps to be running under using v1.0 with other applications running under v1.1. Now my authentication cookie is no longer being accepted anywhere other than by...
0
4230
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 Applications and owner of Access Microsystems. Doug can be reached at doug@accessmicrosystems.com. --------------------------------------------------------------------------------
2
1518
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 outer application I have <authentication mode="Forms"> <forms name=".ASPXAUTH" loginUrl="Default.aspx" path="/" timeout="20"/> </authentication> While in the web.config of the Sub applications I have
1
2529
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 I have a login page located in the root of the same server: http://server1/login.aspx
2
2497
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 answer as to why it happens. I have two separate web apps sat on different sub domains of the same company realm. eg:
5
1516
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 settings are the same between the apps they should work happily together. The only difference I have between the apps Web.Config settings is their <forms> loginUrl, which isn't supposed to make a difference. App1 Web.Config: <authentication...
1
6445
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. This app uses forms authentication and denies all unauthenticated users. There is a location override in the web.config so that we can open up a directory for unauthenticated users to create a login account. There is only 1 web.config in the...
0
8623
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9113
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8977
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8839
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7656
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6488
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4339
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2997
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2269
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.