impersonate

Ethics & Impersonation: Alternatives?

Have you ever troubleshoot for your customer and ask (or really want to) their credentials to check their settings if the fault is there? Our solution to this is to implement impersonation feature to login as any users and have access to everything users do. In this case, a mail application. Although we don't need the password to imperso...

Why CreateProcessAsUser requires interactive window station on Vista/Windows 7?

I had to delve into this because the code that worked fine on Windows 2003/XP doesn't on Windows 7. Application launched by the use of CreateProcessAsUser fails with 0xc0000142 error code. The difference between my old code and one available from MSDN at Starting an Interactive Client Process in C++ is that I didn't set up privileges and...

Supplying Basic Authentication credentials to a protected folder in ASP.NET

I have a Barclays payment system which posts its results back to an ASP.NET page inside a folder protected with Basic Authentication (the rest of the site uses Forms). The payment system works fine but I also have a credit system which means that if credit > total then the payment system is bypassed and I just want to call the page mysel...

WCF service hosted on IIS and client website on IIS

Here's the desired setup: Service with wsHttpBinding is on IIS 6 on Machine 1 behind the firewall. Client is front end website on IIS 6 on Machine 2 on a DMZ. We are currently able to authenticate the client using Windows authentication, but with impersonation <identity impersonate="true" userName="OurCompany\Me" password="Blahblah...

Creating local machine accounts using ASP.NET MVC

We are trying to create a web interface allowing local user accounts to be created on the web server. Only local administrators can have this right. It cannot be delegated under the local security policy. These are approaches we have tried so far: Running the Application Pool as a local administrator: this does work, but its not an a...

Installing Visual Studio 2003 on Windows 7 64-bit

My team is currently supporting a 1.1 app and we are installing VS.NET 2003 on Windows 7. We haven't had any issues on the 32-bit machines, but FrontPage Server Extensions are failing to install on my 64-bit machine. Others say that they have done this successfully, so I wanted to know if anyone here has and if they know of a solutio...

.NET Impersonate and file upload issues

I have a webpage that allows a user to upload a file to a network share. When I run the webpage locally (within VS 2008) and try to upload the file, it works! However, when I deploy the website to the webserver and try to upload the file through the webpage, it doesn't work! The error being returned to me on the webserver says "Access ...

what is impersonate in asp.net web.config?

Please guide me. if i gave anonymous access to site in iis and if i gave impersonate = true in its web.config then what should happen? ...

asp.net httpmodule loses its identity on callback

My HttpModules uses the PreRequestHandlerExecute event and seems to be losing the identity which I am impersonating when I get to the callback function. I can check the user it is running under (with Environment.UserName) and it goes from the impersonated user (in the begin function) to Network Service(in the end function). Anyone seen ...

Windows Service running as LocalSystem but needs to start a process as the currently logged on user

I'm running a windows service (written using .NET) as the user - LocalSystem. From the service, I need to start a process but as the currently logged on user. If I user Process.Start(process_name), it runs with the privilege of the service by default - that's as LocalSystem. How do I impersonate the currently logged on user and run the ...

How to impersonate a non-existent user

We have a 3rd party webservice used to authorise users. Primarily it takes the calling user, checks their identity, and returns a cookie for subsequent requests. I would like to unit test it, making sure it throws the appropriate exception. Ideally something like this: var dummyIdentity = WindowsIdentity.GetAnonymous(); using (dummyId...

Token access to sharepoint Web service

Here is my problem, I have one webpart that will retrieve current username and its token, using this code: SPUser myUser = SPControl.GetContextWeb(Context).CurrentUser; This information will be forwarded to external system, that will invoke windows service to download a document in sharepoint using sharepoint webservice. The probl...