473,394 Members | 2,063 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,394 software developers and data experts.

How to read a user id

We are using windows authication (ADS) for a Sharepoint Portal web Site.

How can get the user who log in - we have a asp.net form that emails - and
would like to automically put them name in the message - so we know who it
came from.

thanks


Nov 18 '05 #1
3 1136
Request.ServerVariables("LOGON_USER")

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"Dave Tichenor" <da**********@hotmail.com> wrote in message
news:O3**************@TK2MSFTNGP12.phx.gbl...
We are using windows authication (ADS) for a Sharepoint Portal web Site.

How can get the user who log in - we have a asp.net form that emails - and
would like to automically put them name in the message - so we know who it
came from.

thanks

Nov 18 '05 #2
Hi Dave,
Thanks for posting in the community!
From your description, you'd like to get the loged user's
username(idenitity) in your ASP.NET web application. And you're using the
Windows Authentication and also integrated the share-point portal
server,yes?
If there is anything I misunderstood, please feel free to let me know.

As for this problem, I think Kevin's suggestion that use the
Request.ServerVariables("LOGON_USER") is reasonable since the
Request.ServerVariables collection has many useful infos, more detailed
info on them, you can view the following reference in MSDN:

#Request.ServerVariables Collection
http://msdn.microsoft.com/library/en...qocsv.asp?fram
e=true

In addtion, as you're using the Windows Authentication in ASP.NET you can
also try the "HttpContext.Current.User"
it also contained the currently authenticated user's info. Here is the
detailed description on it in MSDN:

#HttpContext.User Property
http://msdn.microsoft.com/library/en...webhttpcontext
classusertopic.asp?frame=true

and here is another tech article discussing on the Authentication and
Authorization model in ASP.NET:
#Authentication and Authorization
http://msdn.microsoft.com/library/en...82003.asp?fram
e=true

Hope they're helpful.
Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx

Nov 18 '05 #3
Hi Dave,
Have you had a chance to try out the suggestions in my last reply or have
you got any further ideas on this issue? If you have any questions or need
any further assitance, please feel free to post here.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx

Nov 18 '05 #4

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

Similar topics

12
by: Chuck Anderson | last post by:
Can anyone point me in the right direction? I want to use Php to automate confirmation of someone joining an email list by them replying to an email (so they don't have to have a browser?). I...
4
by: francis70 | last post by:
Hi, I have these 2 problem? Is there a way in Oracle to read UNCOMMITED data. i.e. in Oracle the normal behaviour is that a user's updates to a table are visible to other users ONLY when the...
2
by: Sandman | last post by:
Just looking for suggestion on how to do this in my Web application. The goal is to keep track of what a user has and hasn't read and present him or her with new material I am currently doing...
18
by: jas | last post by:
Hi, I would like to start a new process and be able to read/write from/to it. I have tried things like... import subprocess as sp p = sp.Popen("cmd.exe", stdout=sp.PIPE)...
5
by: Mitchell S. Honnert | last post by:
Is there a way, given the full path of a folder on a network, that one can programatically tell if you have Read access to that folder? I have an application where the user is able to select a...
3
by: eholz1 | last post by:
Hello PHP Group, I am having trouble setting permissions correctly so that the magickwand api (php 5.2) can read and write images. I usually read a file from one directory, create a magickwand...
0
by: =?Utf-8?B?TG9zdEluTUQ=?= | last post by:
Hi all, I have a column that the user is only allowed to edit if s/he added the row. I set read-only = true for this column when I load the grid. I allow the user to add a row by clicking a...
22
by: pbd22 | last post by:
Hi. I am building a custom telnet interface and my problem is that I want to read the user input along with the previously written stream. Right now I am logging the user. I have Login:...
2
by: brigitte | last post by:
I have installed the front end for my database on several machines (the front end is an mde), which links to a back end on a network drive all my users have access to. To prevent mapping errors,...
23
by: Dan Tallent | last post by:
A textbox has a attribute for ReadOnly. This seems like such a simple concept. When a textbox is set to read only the user cannot change the contents of the field. I have been trying to find...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
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...
0
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,...
0
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...
0
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...

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.