Bug 15046 - PCL call service crashes using cookie container in PCL
Summary: PCL call service crashes using cookie container in PCL
Alias: None
Product: Android
Classification: Xamarin
Component: Mono runtime / AOT Compiler ()
Version: 4.8.x
Hardware: PC Windows
: Normal normal
Target Milestone: ---
Assignee: Martin Baulig
Depends on:
Reported: 2013-09-27 14:58 UTC by Jon Goldberger [MSFT]
Modified: 2016-11-11 09:50 UTC (History)
3 users (show)

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

Test case (338.86 KB, application/zip)
2013-09-27 14:58 UTC, Jon Goldberger [MSFT]

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 Jon Goldberger [MSFT] 2013-09-27 14:58:56 UTC
Created attachment 5009 [details]
Test case

I have problem with cookie container in PCL. In attached project I have the same web service - once discovered from Android project,
another one from PCL. First of all they are generating 2 different proxies. Though it is strange but I am ok with that. The problem is that
PCL service client crashes when I work with CookieContainer. It compiles ok but when I run I get run-time error:
Could not load type 'System.ServiceModel.Channels.IHttpCookieContainerManager' from assembly 'System.ServiceModel.Http, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
I need cookie container as I am getting authentication cookies from for authentication service for other calls in different service.
You can reproduce it in function
async void button_Click(object sender, EventArgs e)
There are 2 sections
///////// Activity call service ///////////
///////// PCL call service ///////////

Activity call service works and PCL call service crashes.
Any suggestions?
Version info: 

Microsoft Visual Studio Premium 2012
Version 11.0.60610.01 Update 3
Microsoft .NET Framework
Version 4.5.50709

Installed Version: Premium

LightSwitch for Visual Studio 2012 04941-004-0043007-02165
Microsoft LightSwitch for Visual Studio 2012

Office Developer Tools 04941-004-0043007-02165
Microsoft Office Developer Tools

Team Explorer for Visual Studio 2012 04941-004-0043007-02165
Microsoft Team Explorer for Visual Studio 2012

Visual Basic 2012 04941-004-0043007-02165
Microsoft Visual Basic 2012

Visual C# 2012 04941-004-0043007-02165
Microsoft Visual C# 2012

Visual C++ 2012 04941-004-0043007-02165
Microsoft Visual C++ 2012

Visual F# 2012 04941-004-0043007-02165
Microsoft Visual F# 2012

Visual Studio 2012 Code Analysis Spell Checker 04941-004-0043007-02165
Microsoft® Visual Studio® 2012 Code Analysis Spell Checker

Portions of International CorrectSpell™ spelling correction system © 1993 by Lernout & Hauspie Speech Products N.V. All rights reserved.

The American Heritage® Dictionary of the English Language, Third Edition Copyright © 1992 Houghton Mifflin Company. Electronic version licensed from Lernout & Hauspie Speech Products N.V. All rights reserved.

Visual Studio 2012 SharePoint Developer Tools 04941-004-0043007-02165
Microsoft Visual Studio 2012 SharePoint Developer Tools

Mono Tools for Visual Studio 2.0.8152
Mono Tools for Visual Studio provides developers with features which improve the development experience for targeting the Mono runtime.

NuGet Package Manager 2.7.40808.167
NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.

PreEmptive Analytics Visualizer 1.0
Microsoft Visual Studio extension to visualize aggregated summaries from the PreEmptive Analytics product.

SQL Server Data Tools 11.1.20627.00
Microsoft SQL Server Data Tools

Web Developer Tools 1.2.40308.0
Microsoft Web Developer Tools contains the following components:
Page Inspector: Tool that offers an efficient way to decompose Web Applications and diagnose front-end issues.
Web Publishing: Extensions required for Web Publishing for both hosted servers as well as on premises.
Web Form Templates: Includes the default templates for Web Form Applications.
Editor Extensions: Includes HTML, CSS, and JS editor extensions that greatly enhance the development experience.

Xamarin.Android 4.8.02057 (bdc709d1)
Visual Studio plugin to enable development for Xamarin.Android.

Qt Add-in 1.2.0
This is Visual Studio Add-in component for Qt. For more information about Qt, see
Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies)
Comment 4 Yuri 2013-10-02 16:06:15 UTC
Is anything new about that bug? I cannot use web services because I cannot get authentication cookies. This is really a road blocker for me.
Comment 5 Martin Baulig 2016-11-11 09:50:59 UTC
Closing ancient bugs, please reopen if you're still having this problem.