473,386 Members | 1,715 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,386 software developers and data experts.

Get the userid from the Authorization Cookie

Somewhere in the code Authorization is set like:

' user id from a login form
......
......
FormsAuthentication.SetAuthCookie(userid, False)

Is there a way to get this information, the userid string back? I have
tried myself and looked in google but I just cannot find it. I am
trying this NOT WORKING code, that gives me .... Nothing as UserName
literally.

Dim MyCookie As System.Web.HttpCookie
MyCookie =
Response.Cookies(System.Web.Security.FormsAuthenti cation.FormsCookieName)
Dim UserName As String
UserName = MyCookie.Value

Dec 8 '06 #1
0 852

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

Similar topics

1
by: Phillip Wu | last post by:
I have a javascript program that lives in the secure part of a web site. In order to get access to this java program the user needs to log in providing a userid and password. I understand that...
4
by: Mark Olbert | last post by:
I am having a devil of a time trying to get Forms authentication to work in a very simple test webapp (I've gotten it to work many, many times when developing on my WinXP client box, but I've just...
2
by: Luke Dalessandro | last post by:
I am trying to develop a quick Shopping cart for ASP.NET 2.0. I have added a CartItems table to the AspNetDB access database, that contaings CartItems keyed off of the aspney_Users.UserId key (the...
2
by: craigkenisston | last post by:
Hi, I create a one day ticket in my authentication code like this : private void btnLogin_Click(object sender, System.EventArgs e) { string _userId = txtUserId.Text; string _password =...
4
by: Amil | last post by:
I'm using Forms authorization. In my <forms> section I have timeout="30", but when I examine the cookie, it shows it expiring in 2055? Why? <authentication mode="Forms"> <forms...
7
by: dee | last post by:
When i sign on using <authentication mode="Forms"> <forms loginUrl="LogIn.aspx"/> </authentication> My login code is: If MyCheckPassword(name, pwd) Then...
2
by: willyd61 | last post by:
Hello Everyone! Newbie here... I can't configure any remote clients to connect to my DB2 server, I am able to run and connect local from the server, but if I try to connect with a user and...
1
by: chaitu | last post by:
Hi, I have an issue. When a developer tries to connect using an USERID and a ped it gives SQL30082N Attempt to establish connection failed with security reason "19" ("USERID DISABLED or...
11
by: Helmut Jarausch | last post by:
Sorry, but I'm a complete newbee! I need find out under which userid the browser is running. Is this possible with JavaScript? Many thanks for a hint, Helmut Jarausch Lehrstuhl fuer...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...

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.