1

Closed

SharpBits does not work with runas command

description

I used SharpBits.Base.dll in my project to transfer file over network. but i am running this in background with admin account..
When i use runas to the exe the job is created but it is suspended.
When resume this job then it gives exception 'Exception from HResult: 0x80200003'
Please Help..
Closed Mar 12, 2015 at 11:30 AM by xidar

comments

xidar wrote Dec 16, 2012 at 7:57 AM

you may need to set credentials for the particular jobs, check this section on BITS documentation
http://msdn.microsoft.com/en-us/library/aa362781(v=vs.85).aspx

Also using the SharpBITS windows client (or other similar tools) you can check if the jobowner is set correctly, and handle authentication.

radsul wrote Dec 17, 2012 at 2:55 AM

but my application is running under administrator privileges not as current logged in user. and bits does nor supports run as command. How can i get the currently logged in user credentials?

xidar wrote Dec 17, 2012 at 3:22 PM

actually looking up the error code, seems you have not added any files to the job

http://msdn.microsoft.com/en-us/library/windows/desktop/aa362823(v=vs.85).aspx

BG_E_EMPTY (0x80200003)
The job must contain one or more files before you can resume the job.

oDlouhy wrote Jan 11, 2013 at 7:44 AM

According to MS, running an application as another user (by using the RunAs command) is not an interactive logon; BITS will not run jobs associated with the specified user.

See http://msdn.microsoft.com/en-us/library/windows/desktop/aa363159(v=vs.85).aspx

wrote Feb 14, 2013 at 8:11 PM

wrote Mar 12, 2015 at 11:30 AM