473,387 Members | 1,556 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,387 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
1 2479
=?Utf-8?B?Um9nZXI=?= <Ro***@discussions.microsoft.com> wrote in
news:C9**********************************@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?

This news group is for classic ASP. Is this an ASP.NET question? If
so, it's an entirely different technology, and you are more likely to
get relevant help over at microsoft.public.dotnet.framework.aspnet.
--
Mike Brind
Apr 13 '06 #2

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 =...
2
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 will...
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: 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: 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
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?
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
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.