473,442 Members | 4,744 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

capture window username to imporsonate

How do I get the window username and password information so that I can imporsonate to access a remote file server using the UNC path using asp .net or c# code.
Nov 15 '05 #1
2 2447
Jax
The userName can be got like this:

SystemInformation.UserName

Dont know about the password though.
Nov 15 '05 #2
He indicated that he was using ASP.NET. In this case,
SystemInformation.UserName might not work becuase ASP.NET is running in a
special account.

As for the password, imagine how insecure the system would be if any program
at any time could read both the username and password. Trojan horses would
have a field day. So, no, it is probably not possible to read the password.

ASP.NET makes it relatively easy to impersonate the logged in user. It has
been a while since I had to do this but you might try turning anonymous off
and setting the @impersonate attribute on the <identity> tag to "true" in
the machine.config. That way the ASP.NET process takes on the identity of
the person who is sitting at the browser.

"Jax" <an*******@discussions.microsoft.com> wrote in message
news:AD**********************************@microsof t.com...
The userName can be got like this:

SystemInformation.UserName

Dont know about the password though.

Nov 15 '05 #3

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

Similar topics

3
by: Me Mine | last post by:
i, I have trying to code a small console app that will allow a user to select a window and then create a screen capture of the window. I haven't been able to figure out how to do the screen...
6
by: Clara | last post by:
Hi,... I meant to write an application where there is a button in a window and when you click on the button, it will open a new window, but I want the first window to close, replaced by the second...
2
by: aimee | last post by:
Hi. Is there a way to capture the events fired in a PrintDialog? I would like to capture when the user presses "Print" so I can do some cleanup. The asp.net (IE6) application I'm working on has 6...
1
by: DalePres | last post by:
I need to be able to do screen captures of a window that is covered by another window. All the examples I find capture the display at the target window coordinates, so it shows a section of the...
3
by: William Stacey [MVP] | last post by:
Is this a bug in fx2? I expect they did not carry forward all the StartInfo properties to api used with Username/Password. When you remove UserName/password, the window does not show as expected....
4
by: Z0gS | last post by:
Hi How do I the the username that was used when you logged into Windows from asp .net or c#? Thanks Cheers, James
1
by: Marie Mercier | last post by:
Hi, would anyone know how, in VB.NET to capture a username of anyone who accesses my machine from our LAN. I have used System.Diagnostics, but I get no username or machine name. I have been asked...
3
by: Newbie Coder | last post by:
Hello All VB.NET 2003 Code Only (not C#) How do I capture a window by knowing its class name & save it as a jpg on a button click? Of course the window won't be in focus Any help would be...
1
by: geetamadhavi | last post by:
Hi All, I have developed a php applciaiton where a new window is opening on checking the whether valid user orntot how to make that in same window after checking i have die(' not valid user ' ); i...
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
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
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
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...
0
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...
0
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...
0
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.