Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C# 2005 > C# 2005
|
C# 2005 For discussion of Visual C# 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# 2005 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 October 18th, 2008, 02:17 PM
Friend of Wrox
 
Join Date: Oct 2004
Posts: 553
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via MSN to vinod_yadav1919 Send a message via Yahoo to vinod_yadav1919
Default Impersonate windowsservice for network

Impersonate with windows service not work for Service Account..

Client/Business Requirement:-WindowsService1 should fectch files on the client laptop as well as any Mapped drives related with Servers.

To access server,client/business provides service account mydomain\globalServiceAccount and globalserviceAccountPassword

Since this WindowsService1 should fetch Laptop files and any mapped server(service account).

While imporsonating the service it is not fectching any files on the Server
e.g. Z mapped drives is \\abcServer\sharedFolder <--to access this folder Service account is required.

Event after performing imporsonate , my service windowservice1 is not at all fectching any files,where as there
are files available on \\abcServer\SharedFolder.

Let me know if you have any inputs or pointer that will windowService1 to fetch files from the myLaptop where this Service is installed.

1>I logged into my Laptop with my usercredentials(mydomain\myuserId,mypassword)
2>WindowsService1 is runnning on MyLaptop.
3>I Mapped any other server with z drives 'abcServer\sharedFolder.(with service account-mydomain\globalServiceAccount and globalserviceAccountPassword)
4>my WindowsService1 should fetch files with imporsonation from 'abcServer\sharedfolder"
5>my WindowsService1 should also fetch files stored in mydesktop and C: drives files.

any inputs/code snippet/pointer would be a great help

Thanks,
Vinod

Cheers :)

vinod
__________________
Cheers :)

vinod
 
Old October 20th, 2008, 03:43 AM
samjudson's Avatar
Friend of Wrox
 
Join Date: Aug 2007
Posts: 2,128
Thanks: 1
Thanked 189 Times in 188 Posts
Default

Mapped drives are only available if running as an interactive user - therefore no windows service is going to have access to that information.

If you wrote your application as a windows application which started on startup then it might be able to get the correct information.

/- Sam Judson : Wrox Technical Editor -/





Similar Threads
Thread Thread Starter Forum Replies Last Post
Identity Impersonate Tim Carmichael Classic ASP Basics 0 September 18th, 2008 09:46 AM
working with windowsService and oncontinu()method cookie2007 Visual Studio 2005 0 October 31st, 2007 12:11 AM
impersonate problem A.Doroudian ASP.NET 1.0 and 1.1 Professional 0 May 31st, 2006 02:27 AM
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.