Bug 6515 - Custom headers are not included in call to web service
Summary: Custom headers are not included in call to web service
Alias: None
Product: Android
Classification: Xamarin
Component: BCL Class Libraries ()
Version: 4.2.x
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Martin Baulig
Depends on:
Reported: 2012-08-13 13:12 UTC by David
Modified: 2012-09-24 14:49 UTC (History)
5 users (show)

Is this bug a regression?: ---
Last known good build:

Solution demonstrating the problem (654.34 KB, application/x-zip-compressed)
2012-08-13 13:12 UTC, David
windows output (131.02 KB, image/png)
2012-08-13 13:12 UTC, David
android output (37.77 KB, image/png)
2012-08-13 13:13 UTC, David
Monotouch Example (6.60 KB, application/x-zip-compressed)
2012-08-16 09:00 UTC, David
Monotouch output (110.97 KB, image/png)
2012-08-16 09:01 UTC, David

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description David 2012-08-13 13:12:14 UTC
Created attachment 2340 [details]
Solution demonstrating the problem

When calling a WCF web service and adding a cusome header the header is not included in the message to the web service.  I have attached a soultion that demonstrates the problem.  The solution includes a windows phone app and an android application that use the same code to add an authorization header.  The service method simply returns all of the headers.  I have also included the output from both apps showing that the windows app includes the header while the android app does not.

You will need to change change the endpoint addresses to match your installation.  See MainPage.xaml.cs line 29 and activity1.cs line 37 for these changes.
Comment 1 David 2012-08-13 13:12:48 UTC
Created attachment 2341 [details]
windows output
Comment 2 David 2012-08-13 13:13:08 UTC
Created attachment 2342 [details]
android output
Comment 3 David 2012-08-13 13:17:50 UTC
Please note that this bug is preventing us from continuing work on our product, so we are hoping for a speedy resolution.
Comment 4 David 2012-08-16 09:00:54 UTC
Created attachment 2362 [details]
Monotouch Example

The same issue occurs in MonoTouch.  I have attaches a soultion that demonstrates the issue there.  The URL on line 21 in file GetHeadersSource.cs will need to be changed to match your insstallation.
Comment 5 David 2012-08-16 09:01:54 UTC
Created attachment 2363 [details]
Monotouch output
Comment 6 Martin Baulig 2012-09-17 11:45:38 UTC
Should be fixed now.  The code was already there, but disabled for monotouch.

master 25f9a11, mono-2-10 8a92161, mobile-master 39a06c3, mobile-master-2-12 ea87047