473,698 Members | 2,873 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Get the userid from the Authorization Cookie

Somewhere in the code Authorization is set like:

' user id from a login form
......
......
FormsAuthentica tion.SetAuthCoo kie(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.Http Cookie
MyCookie =
Response.Cookie s(System.Web.Se curity.FormsAut hentication.For msCookieName)
Dim UserName As String
UserName = MyCookie.Value

Dec 8 '06 #1
0 859

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

Similar topics

1
5840
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 the userid/password is verified by the web server (Apache in my case). I also understand that any server side program written in php can get the userid from environment variables. I want to be able to find out the userid that the user logged in...
4
1561
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 switched to doing development/debug on a Win2K server with IIS5, and something is obviously wrong). Here's the site: login.aspx /ssl/members/members.aspx
2
4954
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 automatically generated primary key for the table). I want to bind the current user's CartItems to a GridView, which should be really easy. The problem is that I need the UserID as a parameter for my AccessDataSource. The parameters that can be...
2
2745
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 = txtPassword.Text;
4
2546
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 loginUrl="/login.aspx" protection="All" timeout="30" path="/"> <credentials passwordFormat="Clear">
7
1296
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 FormsAuthentication.RedirectFromLoginPage(name, True)
2
522
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 specify password it fails with the dreaded SQL30082N. I have checked all parameters, there is the servicename registered in /etc/services the dbm cfg is set (pasted below). this is a Workgroup Edition, I have tried everything, also note that I can only...
1
6796
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 RESTRICTED"). SQLSTATE=08001. He is getting this when he tries to connect through QUEST CENTRAL. This is not a DBA userid and pwd. I have tried changing AUTHENTICATION
11
2072
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 Numerische Mathematik
0
8683
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
8611
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9031
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...
0
8876
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7741
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...
0
5867
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4372
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
3052
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
2341
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.