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

WindowsIdentity.GetCurrent()

I have a desktop and laptop for development.

Both are xps and both are sp2 and both are update to date with
security patches.

On my desktop when I run the LogonUser api function call. It will
create a windowsidentity object and whom I am attemptting to log in
as, but if I look in command window and type
"WindowsIdentity.GetCurrent()" the name property is null

But, if I step through the same thing on my laptop, the
WindowsIdentity.GetCurrent()" returns the user I am logging in as.
Looked at the personal web setting and they are exactly the same. What
might I have differently setup on my desktop compared to my laptop.

This is what is return in the name property of the
WindowsIdentity.GetCurrent():

Name: <error: an exception of type: {System.ApplicationException}
occurred>
And on the laptop, yea you can say it returns the form authentication
users identity

Talked to another developer and he thinks my vs version is bad and
needs to be reinstalled.

Do you have any ideas?

Apr 13 '06 #1
2 2215
Do you log onto your desktop when it starts?

Jeff

"Roger" <Ro***@discussions.microsoft.com> wrote in message
news:56**********************************@microsof t.com...
I have a desktop and laptop for development.

Both are xps and both are sp2 and both are update to date with
security patches.

On my desktop when I run the LogonUser api function call. It will
create a windowsidentity object and whom I am attemptting to log in
as, but if I look in command window and type
"WindowsIdentity.GetCurrent()" the name property is null

But, if I step through the same thing on my laptop, the
WindowsIdentity.GetCurrent()" returns the user I am logging in as.
Looked at the personal web setting and they are exactly the same. What
might I have differently setup on my desktop compared to my laptop.

This is what is return in the name property of the
WindowsIdentity.GetCurrent():

Name: <error: an exception of type: {System.ApplicationException}
occurred>
And on the laptop, yea you can say it returns the form authentication
users identity

Talked to another developer and he thinks my vs version is bad and
needs to be reinstalled.

Do you have any ideas?

Apr 13 '06 #2
Log on the same for both desktop and laptop. Note, this is during
development. No problem on our Production IIS.

Roger

"Jeff Dillon" wrote:
Do you log onto your desktop when it starts?

Jeff

"Roger" <Ro***@discussions.microsoft.com> wrote in message
news:56**********************************@microsof t.com...
I have a desktop and laptop for development.

Both are xps and both are sp2 and both are update to date with
security patches.

On my desktop when I run the LogonUser api function call. It will
create a windowsidentity object and whom I am attemptting to log in
as, but if I look in command window and type
"WindowsIdentity.GetCurrent()" the name property is null

But, if I step through the same thing on my laptop, the
WindowsIdentity.GetCurrent()" returns the user I am logging in as.
Looked at the personal web setting and they are exactly the same. What
might I have differently setup on my desktop compared to my laptop.

This is what is return in the name property of the
WindowsIdentity.GetCurrent():

Name: <error: an exception of type: {System.ApplicationException}
occurred>
And on the laptop, yea you can say it returns the form authentication
users identity

Talked to another developer and he thinks my vs version is bad and
needs to be reinstalled.

Do you have any ideas?


Apr 13 '06 #3

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

Similar topics

0
by: Robert Phillips | last post by:
I periodically get an ApplicationException "access is denied" in the WindowsIdentity._GetCurrentToken() method. Reflector shows the _GetCurrentToken() method as private static extern IntPtr...
8
by: BLiTZWiNG | last post by:
After playing with the code shown and utilising Willy Denyottes' help, I have come to the conclusion that there is some form of difference between the managed WindowsIdentity.Impersonate() over the...
3
by: ZUP_DUDE | last post by:
I have a webservice that is using impersonation. The web service needs to call a System.Diagnostics.Process to execute a batch file. I am having problems executing the batch file. It works fine on...
3
by: diephouse | last post by:
I seem to be having a problem accessing networks shares. For example, I try the following code: File.Exists(@"\\SERVER\share"); always returns false! Or even if I map the drive ...
3
by: Kevin Burton | last post by:
This is more of a solution that raised a question. I have a Web service that does not allow anonymous users. For debugging I put in the following lines in my Web Service: WindowsIdentity wi =...
3
by: Derek Martin | last post by:
Does anyone know how to get the current logged on NAME from AD? I can get the username domain\username, but I would like to actually get John W. Doe from the currently logged in person. Anyone? ...
1
by: Roger | last post by:
I have a desktop and laptop for development. Both are xps and both are sp2 and both are update to date with security patches. On my desktop when I run the LogonUser api function call. It...
1
by: Raghu | last post by:
If a company has windows machines but the directory services is not active directory (say novell's eDirectory for whatever reason and users are authenticated against this non-AD directory...
0
by: meshko | last post by:
I have an ASP.NET application running on Windows 2003 sp 1 The IIS directory is set to allow anonymous access and the user for anonymous access is set to DOMAIN\User. This user has access to...
0
by: Ed Sutton | last post by:
Is there a FileSecurity method that can determine if the current WindowsIdentity has write access to a file? I can get the current windows identity and use FileSecurity to return the ...
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: 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: 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
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
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
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...
0
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,...

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.