Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > .NET Web Services
.NET Web Services Discussions about .NET XML Web Service technologies including ASMX files, WSDL and SOAP.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the .NET Web Services section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old April 23rd, 2007, 04:12 AM
Authorized User
Join Date: Apr 2005
Posts: 23
Thanks: 0
Thanked 0 Times in 0 Posts
Default Impersonate Thread in webservice

I have a Web Service (.Net Framework 1.1) which throws a thread, and I need that thread run as a specific user.

I wrote in web.config file

<identity impersonate="true" userName="specificuser" password="thepass" />

I set in IIS the anonymouse user as "specificuser"

I set in machine.config

<identity impersonate="false" userName="specificuser" password="thepass"/>

If I run System.Security.Principal.WindowsIdentity.GetCurre nt() in the web services it is the correct user "specificuser", but if I run it in the thread it is always aspnet user.

How can I force to the thread to run with the specific user?

Thanks in advance


Similar Threads
Thread Thread Starter Forum Replies Last Post
Identity Impersonate Tim Carmichael Classic ASP Basics 0 September 18th, 2008 09:46 AM
impersonate problem A.Doroudian ASP.NET 1.0 and 1.1 Professional 0 May 31st, 2006 02:27 AM
Impersonate section of code marrik General .NET 0 February 13th, 2005 07:36 PM
identity impersonate stu9820 ASP.NET 1.0 and 1.1 Basics 1 January 7th, 2004 09:47 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.