ASP.NET Custom Identity bad environment !

O

Olivier Matrot

Hello all,
Environment : Windows 2003/ASP.NET 2.0.
I have changed the process identity of an application pool to a custom
identity following this link :
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnpag2/html/paght000009.asp

This is working partially. The worker process use my custom identity but do
not load the corresponding profile (or fails to do it ?). Thus, the
environment of the process is inherited from the identity of the parent
process, which is lcoal system.

I need to have a correct profile because, I need to acces the user's
temporary directory. Last but not least, I want to use SQL Express 2005 User
Instances. This is not working for the same reason : bad user profile.

Any help appreciated.

TIA.
 
D

Dominick Baier

Hi,

yes - you can load it by hand - but i wouldn't really recommend that because
it kind of hacky

do this from the cmdline:

runas /u:youruser /profile cmd.exe

then you have to enter the pwd etc...the profile is loaded as long as the
cmd.exe is living....

don't quote me on that ;)

dominick
 
O

Olivier Matrot

Is there a way to have a profile loaded by hand ?
I already know that in IIS7, profiles could be loaded. This is nice.
 
J

Joe Kaplan

Could you also p/invoke into LoadUserProfile to accomplish the same thing?
I haven't tried it...

Joe K.
 
O

Olivier Matrot

I just tried it.
This is weird. There is no error on LoadUserProfile, but the environment
remains unchanged...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top