Thanks and sorry!

I was on the completely wrong track. Instead of following the download URL being returned I now use the function "mc_issue_attachment_get" and everything works as expected.

Cheers from Stuttgart



Viele Grüße
Uwe Keim

 
Mobil: +49 (170) 3109369

**** www.zeta-producer.com - Kostenlos Homepage erstellen ****
****
www.zeta-test.com - Kostenlose Test-Management-Software ****
**** www.zeta-uploader.com - Kostenlos grosse Dateien versenden ****


2014-07-28 22:22 GMT+02:00 Robert Munteanu <robert.munteanu@gmail.com>:
Hi Uwe,

On Mon, Jul 28, 2014 at 10:49 PM, Uwe Keim <uwe.keim@gmail.com> wrote:
> Successfully using the SOAP API from C#, I can successfully read an issue
> and also get the "download_url" field.
>
> When trying to download the attachment by something like this:
>
> -----------------
> using (var request = new WebClient())
> {
>    request.Credentials = new NetworkCredential(_settings.UserName,
> _settings.Password);
>
>    return request.DownloadData(mantisAtt.download_url);
> }

I have little experience with C#, but it looks like you're setting
HTTP Basic Auth credentials. The username and password should be
supplied as parameters to the SOAP call.

If that's not the root cause, please post the complete request,
leaving out sensitive data.

Thanks,

Robert

> -----------------
>
>
> it "downloads" a HTML page with the login screen instead of the binary
> attachment content.
>
> --
> So my question is:
>
> How can I programmatically download an attachment for an issue?
>
> ------------------------------------------------------------------------------
> Infragistics Professional
> Build stunning WinForms apps today!
> Reboot your WinForms applications with our WinForms controls.
> Build a bridge from your legacy apps to the future.
> http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk
> _______________________________________________
> Mantisbt-soap-dev mailing list
> Mantisbt-soap-dev@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mantisbt-soap-dev
>



--
http://robert.muntea.nu/