Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > C# and C > C# 2005 > C# 2005
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old October 18th, 2008, 02:17 PM
Friend of Wrox
 
Join Date: Oct 2004
Location: delhi, delhi, India.
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
  #2 (permalink)  
Old October 20th, 2008, 03:43 AM
samjudson's Avatar
Friend of Wrox
Points: 8,687, Level: 40
Points: 8,687, Level: 40 Points: 8,687, Level: 40 Points: 8,687, Level: 40
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2007
Location: Newcastle, , United Kingdom.
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 -/
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 06:36 PM.


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