defaultnetworkcredentials - C# Windows Service Invalid credentials -


i have c# windows service used pull files machine on same domain. when run windows service console application, pull files other computer. however, running windows service return : invalid credentials for: 192.168.100.53 (servernotfoundmipexception)

i tried change service log on local service or network service no success. following onstart method: [permissionset(securityaction.demand, name = "fulltrust")] protected override void onstart(string[] args)

in application properties, security section, checked enable clickonce security settings, full trust application.

the credential type used is:

case credentialtype.windows: { var nc = credentialcache.defaultnetworkcredentials; 

what missing windows failed pull files other computer ?

i assume reading files windows share, \\computer2\share\path\file.ext.

account under server runs must able to

  1. access network,
  2. authenticate domain controller
  3. able logon computer2 network (assigned via control panel->admin tools->local security policy).
  4. have access rights share in question.

localsystem , localservice fail @ #1. no network access.

networkservice gives #1, fails on #2 - it's local account , domain controller not know it.

what need run service under specific domain acount, not local account, , configure account able logon remotely computer2 , have read access share share.

alternatively, may expose files via different protocol not require authentication, e.g. ftp or http.


Comments

Popular posts from this blog

java - Run a .jar on Heroku -

java - Jtable duplicate Rows -

validation - How to pass paramaters like unix into windows batch file -