Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Read ASP.NET Forms Authentication cookie from classic ASP?

Posted on 2004-09-01
5
Medium Priority
?
731 Views
Last Modified: 2013-12-30
I'm using ASP.NET forms authentication to write a cookie containing the currently logged in username:

<authentication mode="Forms">
         <forms name=".ASPXINTRANETAUTH" loginUrl="/login.aspx" protection="All" timeout="60" />
</authentication>
<authorization>
           <allow users="*" />
</authorization>

My login.aspx page creates the cookie with this command:
FormsAuthentication.RedirectFromLoginPage(Username.Value, PersistCookie.Checked);

MY QUESTION: Is there a way to access the username stored in the cookies using Classic ASP?  I want users to be able to login using the ASP.NET app, but I also want them to be able to access legacy ASP apps which I plan to re-code to use the currently logged in username supplied by the ASP.NET cookie.

I looked at the cookie contents, and I can't make out a username from it:

.ASPXINTRANETAUTH
4F3FD9C282F1B7CFFAC07AC7469550E5ECFD31584D6CE3D461A371F83B16A9E30DCB066 818C61F8F46C8F50A46ABEE6C5497F7179EB4716088F7A6B3CC59C8037E0A52FF20922B52
test_server/
1024
394652160
33332915
688688176
29659219
*

Security isn't of utmost importance for this app.

Thanks,
Daniel
0
Comment
Question by:hendridm
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 9

Accepted Solution

by:
Rodney Helsens earned 1800 total points
ID: 11956721
The value is encoded..you should be able to decode the cookie via VBScript, take a look at this
http://blogs.x2line.com/al/articles/146.aspx
0
 
LVL 33

Expert Comment

by:raterus
ID: 11956870
Well you don't have to use that authentication cookie with Forms Authentication, in fact, if security isn't that much of an issue, you can create your own cookie that forms authentication will use.  Then you can keep the username cleartext.
0
 

Expert Comment

by:alejandrorivera
ID: 39746671
this link is broken
http://blogs.x2line.com/al/articles/146.aspx

any chance you can post the solution here?
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this Article, I will provide a few tips in problem and solution manner. Opening an ASPX page in Visual studio 2003 is very slow. To make it fast, please do follow below steps:   Open the Solution/Project. Right click the ASPX file to b…
Today is the age of broadband.  More and more people are going this route determined to experience the web and it’s multitude of services as quickly and painlessly as possible. Coupled with the move to broadband, people are experiencing the web via …
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Suggested Courses

719 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question