ASP.Net client initiates server side transfers

Dec 17, 2013 at 8:56 PM
I am looking at using Sharpbits to copy files between back-end servers through client based requests initiated from within a ASP.Net MVC 4 application.

I have an MVC application that maintains a list or set of base URIs for a target server and allows a user to specify a source URI from a different server so as to copy to a (base) URI on the target server.
I would like to formulate this as a request that is created on the client web page such that the request would contain both the source and the target URIs and would create a job and utilize the Background Intelligent Transfer Service using the SharpBits base API saving the job id as a request into a database. The client would call back to reflect current status any requests are not complete, perhaps showing a busy icon on those that are still in progress.

Are there any examples of this type of scenario that exist?
Are there any concerns using the Background Intelligent Transfer Service in production?
Will this work in a stateless environment provided that the initial request is made by someone who has permissions to both the source and target URI servers or should this be setup to run as a system account?

Thanks in advance.
Dec 18, 2013 at 11:57 AM
Edited Dec 18, 2013 at 12:21 PM
I've done almost exactly this...

I have a client app. This allows the user to select the source for where the files come from.

I have a web service. This takes care of all DB interaction for keeping track of the jobs, file detail, status, audit trail, etc.

I have a windows service that runs on the target server. This is running under the service account so it can create the BITS job. This service is exposing a WCF service that allows the web page to start/monitor/cancel jobs as required.

When creating the BITS job on that server it will need to be provided credentials that has access to the source server. Make sure the local system account has access to the location you plan to copy to locally.

Hope that helps.
Marked as answer by jkears on 12/18/2013 at 6:19 AM
Dec 18, 2013 at 1:21 PM
Edited Dec 18, 2013 at 1:25 PM
Thanks for your prompt and detailed response.
How did you provide credentials for the alternate server within the BITS API?
Also, would it be OK to run the Windows service on the Source server instead of the Target server?
Dec 18, 2013 at 2:25 PM
To add domain logon credentials to the BitsJob object I named "job":

BitsCredentials bc = new BitsCredentials();
bc.AuthenticationScheme = AuthenticationScheme.Ntlm;
bc.UserName = _sDomain + @"\" + _sUsername;
bc.Password = _sPassword;
bc.AuthenticationTarget = AuthenticationTarget.Server;
job.AddCredentials(bc);

You can run the service wherever you want. I just was suggesting the target server since it sounds like you have one target, but multiple sources.