views:

158

answers:

2

Hi,

I'm trying to upload a file with a client application using BITS (Microsoft's Background Intelligent Transfer Service) via HTTPS. The development server I'm uploading to/testing with does not have a properly signed certificate for SSL (it's self-signed). This means that the transfer always errors out, as BITS recognizes that the certificate is self-signed and refuses to complete the job.

Is there any way to programmatically tell BITS ignore the certificate authority and complete the upload? I know there are ways to do this with the HttpWebRequest class in C#, but I don't know how to do this with BITS specifically.

Thanks!

A: 

Use /SETSECURITYFLAGS.

Source: http://www.howtogeek.com/wiki/Bitsadmin

mcandre
I saw that before, but I'm not using BITSAdmin--is there any way to do that programmatically? That's what I'm having trouble figuring out how to do :)
DashRantic
A: 

I think BITS is throwing an exception not because it recognises the cert as being self-signed but rather that it recognises that the cert is not trusted by the client PC. You could try installing the cert in the Trusted Store on your client - I believe BITS will then work over HTTPS.

Peter Kelly