Bug 18868

Summary: HttpClient 403 Forbidden on Mac only
Product: [Mono] Class Libraries Reporter: John Miller [MSFT] <john.miller>
Component: SystemAssignee: Marek Safar <masafa>
Status: RESOLVED FIXED    
Severity: blocker CC: ian.leatherbury, masafa, michael.weber, mono-bugs+mono, mono-bugs+runtime, vargaz
Priority: ---    
Version: 3.2.x   
Target Milestone: Untriaged   
Hardware: Macintosh   
OS: Mac OS   
Tags: Is this bug a regression?: ---
Last known good build:
Attachments: System.dll

Description John Miller [MSFT] 2014-04-08 14:32:34 UTC
The attached Repro Project works when running on Windows, but fails with a 403 forbidden during the http request. 

Attached project is marked private.
Comment 2 Michael Weber 2014-04-10 01:14:56 UTC
Read this article.  It's the same exact problem I'm having.

http://blog.kloud.com.au/2014/03/20/office-365-sharepoint-sign-in-with-xamarin-ios/

Are you going to fix this?  We are a SharePoint shop and we paid $1000s to invest in Xamarin.  All sign-in is broken from my understanding to Office 365 SharePoint Online.

Do you have a work around as I need to do this on Android as well?

You can reproduce the problem by just the code below:
try {
string httpresponse = req.GetStringAsync ("https://login.microsoftonline.com/login.srf").Result;
			} catch (Exception ex) {
				string mess = ex.Message;	
			}

Please provide me an answer asap. We have project kickoff next week.
Comment 4 Zoltan Varga 2014-04-10 15:51:53 UTC
-> class libs.
Comment 5 Zoltan Varga 2014-04-10 15:52:18 UTC
-> class libs.
Comment 6 Marek Safar 2014-04-11 04:29:29 UTC
Works for me on Mono 3.4 when code is changed to Wait in Main and HttpUtility.SendHttpRequest is await-ed
Comment 7 Michael Weber 2014-04-11 08:50:53 UTC
Marak,

I've spent a long time on this bug.  Apparently others have had issues for over 6 months.  Also, it's a huge project killer if I don't get resolved.

Do you have a different version of Mono than 3.2.6?

Are you trying this on a Mac?

Like I mentioned in the case, this will work on Windows.

Please advise what you have tested.

Mike
Comment 8 Marek Safar 2014-04-11 11:00:12 UTC
As I wrote earlier it works on Mac with Mono 3.4.0.
Comment 9 Michael Weber 2014-04-11 11:11:40 UTC
My sincere apologies.  I only read the email notification.

I wasn't aware that I could update Mono apart from Xamarin's updates.

According to Xamarin Studio, the current stable build is integrated with Mono 3.2.6.

Do you have documentation on updating my Max to 3.4?  Should I just download and follow instructions here:
http://www.go-mono.com/mono-downloads/download.html

No compatibility issues with Xamarin?

Thanks again.
Mike
Comment 10 Marek Safar 2014-04-11 11:16:28 UTC
I think 3.4.0 is still in Alpha channel only. In Xamarin Studio go to Check for Updates and switch to Alpha channel. The new version should show up.
Comment 11 Marek Safar 2014-04-11 11:17:19 UTC
If you are not using XS just go to http://www.go-mono.com/mono-downloads/download.html
Comment 12 Michael Weber 2014-04-19 18:31:07 UTC
This needs reopened.  The problem just reappeared in the Alpha channel using Mono 3.4.

Please confirm.
Comment 13 Michael Weber 2014-04-21 09:16:20 UTC
It would be great to get some assistance compiling Mono - or if one of your guys could just compile it for me with CookieContainer.cs fix.  I think I just need the System.Net.dll for Mac OSX.

https://github.com/BEPTEP/mono/compare/patch-1

Our project is supposed to start this week.  We were going to purchase Business for Android but both the price and unstable bugs are probably going to kill off us leveraging Xamarin.

I've spent 20+ hours trying to get it to compile and am receiving the following when running "make."

By the way, I followed instructions here on compiling:
http://mono-project.com/Compiling_Mono_on_OSX

cd mono
CC='cc -m32' ./autogen.sh --prefix=$PREFIX --disable-nls --build=i386-apple-darwin11.2.0
make MONO_LOG_LEVEL=debug


Git submodules updated successfully
/Applications/Xcode.app/Contents/Developer/usr/bin/make  all-recursive
Making all in po
Making all in mcs
make[3]: Nothing to be done for `all-am'.
Making all in libgc
Making all in m4
make[3]: Nothing to be done for `all'.
Making all in include
Making all in private
make[4]: Nothing to be done for `all'.
make[4]: Nothing to be done for `all-am'.
Making all in doc
make[3]: Nothing to be done for `all'.
make[3]: Nothing to be done for `all-am'.
Making all in eglib
/Applications/Xcode.app/Contents/Developer/usr/bin/make  all-recursive
Making all in m4
make[4]: Nothing to be done for `all'.
Making all in src
make[4]: Nothing to be done for `all'.
Making all in mono
Making all in arch
make[4]: Nothing to be done for `all-am'.
Making all in utils
/Applications/Xcode.app/Contents/Developer/usr/bin/make  all-am
make[4]: Nothing to be done for `all-am'.
Making all in io-layer
make[3]: Nothing to be done for `all'.
Making all in cil
make[3]: Nothing to be done for `all'.
Making all in metadata
make[3]: Nothing to be done for `all'.
Making all in mini
/Applications/Xcode.app/Contents/Developer/usr/bin/make  all-am
make[4]: Nothing to be done for `all-am'.
Making all in dis
make[3]: Nothing to be done for `all'.
Making all in monograph
make[3]: Nothing to be done for `all'.
Making all in tests
Making all in cas
Making all in assembly
make[5]: Nothing to be done for `all'.
Making all in linkdemand
make[5]: Nothing to be done for `all'.
Making all in inheritance
make[5]: Nothing to be done for `all'.
Making all in demand
make[5]: Nothing to be done for `all'.
Making all in threads
make[5]: Nothing to be done for `all'.
make[5]: Nothing to be done for `all-am'.
Making all in assemblyresolve
make[4]: Nothing to be done for `all'.
Making all in gc-descriptors
make[4]: Nothing to be done for `all'.
make[4]: Nothing to be done for `all-am'.
Making all in unit-tests
make[3]: Nothing to be done for `all'.
Making all in benchmark
make[3]: Nothing to be done for `all'.
Making all in profiler
make[3]: Nothing to be done for `all'.
make[3]: Nothing to be done for `all-am'.
Making all in ikvm-native
make[2]: Nothing to be done for `all'.
Making all in support
make[2]: Nothing to be done for `all'.
Making all in data
Making all in net_2_0
Making all in Browsers
make[4]: Nothing to be done for `all'.
make[4]: Nothing to be done for `all-am'.
Making all in net_4_0
Making all in Browsers
make[4]: Nothing to be done for `all'.
make[4]: Nothing to be done for `all-am'.
Making all in net_4_5
Making all in Browsers
make[4]: Nothing to be done for `all'.
make[4]: Nothing to be done for `all-am'.
make[3]: Nothing to be done for `all-am'.
Making all in runtime
if test -w /Users/logosair/Documents/mono_3_4/mcs; then :; else chmod -R +w /Users/logosair/Documents/mono_3_4/mcs; fi
cd /Users/logosair/Documents/mono_3_4/mcs && /Applications/Xcode.app/Contents/Developer/usr/bin/make --no-print-directory -s NO_DIR_CHECK=1 PROFILES='net_2_0 net_3_5 net_4_0 net_4_5 xbuild_12   ' CC='cc -m32' all-profiles
Mono: Assembly Loader probing location: '/Library/Frameworks/Mono.framework/Versions/3.4.0/lib/mono/4.5/mscorlib.dll'.
Mono: Image addref mscorlib[0x78e42bc0] -> /Library/Frameworks/Mono.framework/Versions/3.4.0/lib/mono/4.5/mscorlib.dll[0x7900e600]: 2
Mono: AOT module '/Library/Frameworks/Mono.framework/Versions/3.4.0/lib/mono/4.5/mscorlib.dll.dylib' not found: dlopen(/Library/Frameworks/Mono.framework/Versions/3.4.0/lib/mono/4.5/mscorlib.dll.dylib, 9): image not found

Mono: Assembly Loader loaded assembly from location: '/Library/Frameworks/Mono.framework/Versions/3.4.0/lib/mono/4.5/mscorlib.dll'.
Mono: Config attempting to parse: '/Library/Frameworks/Mono.framework/Versions/3.4.0/lib/mono/4.5/mscorlib.dll.config'.
Mono: Config attempting to parse: '/Library/Frameworks/Mono.framework/Versions/3.4.0/lib/../etc/mono/assemblies/mscorlib/mscorlib.config'.
Mono: Assembly mscorlib[0x78e42bc0] added to domain mcs.exe, ref_count=1
Mono: Config attempting to parse: '/Library/Frameworks/Mono.framework/Versions/3.4.0/lib/../etc/mono/config'.
Mono: Config attempting to parse: '/var/root/.mono/config'.
Mono: Assembly Loader probing location: '/Library/Frameworks/Mono.framework/Versions/3.4.0/lib/mono/4.5/mcs.exe'.
Mono: Image addref mcs[0x78e5ad50] -> /Library/Frameworks/Mono.framework/Versions/3.4.0/lib/mono/4.5/mcs.exe[0x7a807600]: 3
Mono: Assembly mcs[0x78e5ad50] added to domain mcs.exe, ref_count=1
Mono: AOT module '/Library/Frameworks/Mono.framework/Versions/3.4.0/lib/mono/4.5/mcs.exe.dylib' not found: dlopen(/Library/Frameworks/Mono.framework/Versions/3.4.0/lib/mono/4.5/mcs.exe.dylib, 9): image not found

Mono: Assembly Loader loaded assembly from location: '/Library/Frameworks/Mono.framework/Versions/3.4.0/lib/mono/4.5/mcs.exe'.
Mono: Config attempting to parse: '/Library/Frameworks/Mono.framework/Versions/3.4.0/lib/mono/4.5/mcs.exe.config'.
Mono: Config attempting to parse: '/Library/Frameworks/Mono.framework/Versions/3.4.0/lib/../etc/mono/assemblies/mcs/mcs.config'.
Mono: Assembly Loader probing location: '/Library/Frameworks/Mono.framework/Versions/3.4.0/lib/mono/4.5/mcs.exe'.
Mono: AOT module '/Library/Frameworks/Mono.framework/Versions/3.4.0/lib/mono/4.5/mcs.exe.dylib' not found: dlopen(/Library/Frameworks/Mono.framework/Versions/3.4.0/lib/mono/4.5/mcs.exe.dylib, 9): image not found

Mono: Assembly Ref addref mcs[0x78e5ad50] -> mscorlib[0x78e42bc0]: 2
Mono: Config attempting to parse: '/Library/Frameworks/Mono.framework/Versions/3.4.0/lib/mono/4.5/mcs.exe.config'.
Mono: Assembly Loader probing location: '/Library/Frameworks/Mono.framework/Versions/3.4.0/lib/mono/4.5/System.Core.dll'.
Mono: Image addref System.Core[0x78e5ca70] -> /Library/Frameworks/Mono.framework/Versions/3.4.0/lib/mono/gac/System.Core/4.0.0.0__b77a5c561934e089/System.Core.dll[0x79046000]: 2
Mono: Assembly System.Core[0x78e5ca70] added to domain mcs.exe, ref_count=1
Mono: AOT module '/Library/Frameworks/Mono.framework/Versions/3.4.0/lib/mono/gac/System.Core/4.0.0.0__b77a5c561934e089/System.Core.dll.dylib' not found: dlopen(/Library/Frameworks/Mono.framework/Versions/3.4.0/lib/mono/gac/System.Core/4.0.0.0__b77a5c561934e089/System.Core.dll.dylib, 9): image not found

Mono: Assembly Loader loaded assembly from location: '/Library/Frameworks/Mono.framework/Versions/3.4.0/lib/mono/4.5/System.Core.dll'.
Mono: Config attempting to parse: '/Library/Frameworks/Mono.framework/Versions/3.4.0/lib/mono/gac/System.Core/4.0.0.0__b77a5c561934e089/System.Core.dll.config'.
Mono: Config attempting to parse: '/Library/Frameworks/Mono.framework/Versions/3.4.0/lib/../etc/mono/assemblies/System.Core/System.Core.config'.
Mono: Assembly Ref addref mcs[0x78e5ad50] -> System.Core[0x78e5ca70]: 2
Mono: Assembly Ref addref System.Core[0x78e5ca70] -> mscorlib[0x78e42bc0]: 3
Mono: Assembly Loader probing location: '/Library/Frameworks/Mono.framework/Versions/3.4.0/lib/mono/4.5/System.dll'.
Mono: Image addref System[0x78e5f6e0] -> /Library/Frameworks/Mono.framework/Versions/3.4.0/lib/mono/gac/System/4.0.0.0__b77a5c561934e089/System.dll[0x79048c00]: 2
Mono: Assembly System[0x78e5f6e0] added to domain mcs.exe, ref_count=1
Mono: AOT module '/Library/Frameworks/Mono.framework/Versions/3.4.0/lib/mono/gac/System/4.0.0.0__b77a5c561934e089/System.dll.dylib' not found: dlopen(/Library/Frameworks/Mono.framework/Versions/3.4.0/lib/mono/gac/System/4.0.0.0__b77a5c561934e089/System.dll.dylib, 9): image not found

Mono: Assembly Loader loaded assembly from location: '/Library/Frameworks/Mono.framework/Versions/3.4.0/lib/mono/4.5/System.dll'.
Mono: Config attempting to parse: '/Library/Frameworks/Mono.framework/Versions/3.4.0/lib/mono/gac/System/4.0.0.0__b77a5c561934e089/System.dll.config'.
Mono: Config attempting to parse: '/Library/Frameworks/Mono.framework/Versions/3.4.0/lib/../etc/mono/assemblies/System/System.config'.
Mono: Assembly Ref addref System.Core[0x78e5ca70] -> System[0x78e5f6e0]: 2
Mono: Assembly Ref addref System[0x78e5f6e0] -> mscorlib[0x78e42bc0]: 4
Mono: Assembly Ref addref mcs[0x78e5ad50] -> System[0x78e5f6e0]: 3
Mono: DllImport attempting to load: 'libc.dylib'.
Mono: DllImport error loading library '/Library/Frameworks/Mono.framework/Versions/3.4.0/lib/mono/4.5/libc.dylib': 'dlopen(/Library/Frameworks/Mono.framework/Versions/3.4.0/lib/mono/4.5/libc.dylib, 9): image not found'.
Mono: DllImport error loading library '/Library/Frameworks/Mono.framework/Versions/3.4.0/lib/mono/4.5/libc.dylib': 'dlopen(/Library/Frameworks/Mono.framework/Versions/3.4.0/lib/mono/4.5/libc.dylib, 9): image not found'.
Mono: DllImport error loading library '/Library/Frameworks/Mono.framework/Versions/3.4.0/lib/mono/4.5/libc.dylib.so': 'dlopen(/Library/Frameworks/Mono.framework/Versions/3.4.0/lib/mono/4.5/libc.dylib.so, 9): image not found'.
Mono: DllImport error loading library '/Library/Frameworks/Mono.framework/Versions/3.4.0/lib/mono/4.5/libc.dylib.bundle': 'dlopen(/Library/Frameworks/Mono.framework/Versions/3.4.0/lib/mono/4.5/libc.dylib.bundle, 9): image not found'.
Mono: DllImport loaded library 'libc.dylib'.
Mono: DllImport searching in: 'libc.dylib' ('libc.dylib').
Mono: Searching for 'isatty'.
Mono: Probing 'isatty'.
Mono: Found as 'isatty'.
Mono: Assembly Loader probing location: '/Library/Frameworks/Mono.framework/Versions/3.4.0/lib/mono/4.5/System.Xml.dll'.
Mono: Image addref System.Xml[0x78f50430] -> /Library/Frameworks/Mono.framework/Versions/3.4.0/lib/mono/gac/System.Xml/4.0.0.0__b77a5c561934e089/System.Xml.dll[0x7982f000]: 2
Mono: Assembly System.Xml[0x78f50430] added to domain mcs.exe, ref_count=1
Mono: AOT module '/Library/Frameworks/Mono.framework/Versions/3.4.0/lib/mono/gac/System.Xml/4.0.0.0__b77a5c561934e089/System.Xml.dll.dylib' not found: dlopen(/Library/Frameworks/Mono.framework/Versions/3.4.0/lib/mono/gac/System.Xml/4.0.0.0__b77a5c561934e089/System.Xml.dll.dylib, 9): image not found

Mono: Assembly Loader loaded assembly from location: '/Library/Frameworks/Mono.framework/Versions/3.4.0/lib/mono/4.5/System.Xml.dll'.
Mono: Config attempting to parse: '/Library/Frameworks/Mono.framework/Versions/3.4.0/lib/mono/gac/System.Xml/4.0.0.0__b77a5c561934e089/System.Xml.dll.config'.
Mono: Config attempting to parse: '/Library/Frameworks/Mono.framework/Versions/3.4.0/lib/../etc/mono/assemblies/System.Xml/System.Xml.config'.
Mono: Assembly Ref addref mcs[0x78e5ad50] -> System.Xml[0x78f50430]: 2
Mono: Assembly Ref addref System.Xml[0x78f50430] -> mscorlib[0x78e42bc0]: 5
Mono: Assembly Loader probing location: '/Library/Frameworks/Mono.framework/Versions/3.4.0/lib/mono/4.5/Mono.Security.dll'.
Mono: Image addref Mono.Security[0x78eb6ae0] -> /Library/Frameworks/Mono.framework/Versions/3.4.0/lib/mono/gac/Mono.Security/4.0.0.0__0738eb9f132ed756/Mono.Security.dll[0x7908b600]: 2
Mono: Assembly Mono.Security[0x78eb6ae0] added to domain mcs.exe, ref_count=1
Mono: AOT module '/Library/Frameworks/Mono.framework/Versions/3.4.0/lib/mono/gac/Mono.Security/4.0.0.0__0738eb9f132ed756/Mono.Security.dll.dylib' not found: dlopen(/Library/Frameworks/Mono.framework/Versions/3.4.0/lib/mono/gac/Mono.Security/4.0.0.0__0738eb9f132ed756/Mono.Security.dll.dylib, 9): image not found

Mono: Assembly Loader loaded assembly from location: '/Library/Frameworks/Mono.framework/Versions/3.4.0/lib/mono/4.5/Mono.Security.dll'.
Mono: Config attempting to parse: '/Library/Frameworks/Mono.framework/Versions/3.4.0/lib/mono/gac/Mono.Security/4.0.0.0__0738eb9f132ed756/Mono.Security.dll.config'.
Mono: Config attempting to parse: '/Library/Frameworks/Mono.framework/Versions/3.4.0/lib/../etc/mono/assemblies/Mono.Security/Mono.Security.config'.
Mono: Assembly Ref addref Mono.Security[0x78eb6ae0] -> mscorlib[0x78e42bc0]: 6
Mono: GC_MAJOR: (user request) pause 9.50ms, total 9.51ms, bridge 0.01ms major 2544K/320K los 3636K/3847K
Mono: Unloading domain mcs.exe[0x7a042360], assembly mscorlib[0x78e42bc0], ref_count=6
Mono: Unloading domain mcs.exe[0x7a042360], assembly mcs[0x78e5ad50], ref_count=1
Mono: Unloading assembly mcs [0x78e5ad50].
Mono: Unloading domain mcs.exe[0x7a042360], assembly System.Core[0x78e5ca70], ref_count=2
Mono: Unloading domain mcs.exe[0x7a042360], assembly System[0x78e5f6e0], ref_count=3
Mono: Unloading domain mcs.exe[0x7a042360], assembly System.Xml[0x78f50430], ref_count=2
Mono: Unloading domain mcs.exe[0x7a042360], assembly Mono.Security[0x78eb6ae0], ref_count=1
Mono: Unloading assembly Mono.Security [0x78eb6ae0].
Mono: Unloading image /Library/Frameworks/Mono.framework/Versions/3.4.0/lib/mono/gac/Mono.Security/4.0.0.0__0738eb9f132ed756/Mono.Security.dll [0x7908b600].
Mono: Unloading image /Library/Frameworks/Mono.framework/Versions/3.4.0/lib/mono/4.5/mcs.exe [0x7a807600].
Mono: Unloading assembly System.Core [0x78e5ca70].
Mono: Unloading image /Library/Frameworks/Mono.framework/Versions/3.4.0/lib/mono/gac/System.Core/4.0.0.0__b77a5c561934e089/System.Core.dll [0x79046000].
Mono: Unloading assembly System [0x78e5f6e0].
Mono: Unloading image /Library/Frameworks/Mono.framework/Versions/3.4.0/lib/mono/gac/System/4.0.0.0__b77a5c561934e089/System.dll [0x79048c00].
Mono: Unloading assembly System.Xml [0x78f50430].
Mono: Unloading image /Library/Frameworks/Mono.framework/Versions/3.4.0/lib/mono/gac/System.Xml/4.0.0.0__b77a5c561934e089/System.Xml.dll [0x7982f000].
Mono: Unloading assembly mscorlib [0x78e42bc0].
Mono: Unloading image /Library/Frameworks/Mono.framework/Versions/3.4.0/lib/mono/4.5/mscorlib.dll [0x7900e600].
-n Bootstrap compiler: 
Mono: Assembly Loader probing location: '/Library/Frameworks/Mono.framework/Versions/3.4.0/lib/mono/4.5/mscorlib.dll'.
Mono: Image addref mscorlib[0x7870fc10] -> /Library/Frameworks/Mono.framework/Versions/3.4.0/lib/mono/4.5/mscorlib.dll[0x792a0600]: 2
Mono: AOT module '/Library/Frameworks/Mono.framework/Versions/3.4.0/lib/mono/4.5/mscorlib.dll.dylib' not found: dlopen(/Library/Frameworks/Mono.framework/Versions/3.4.0/lib/mono/4.5/mscorlib.dll.dylib, 9): image not found

Mono: Assembly Loader loaded assembly from location: '/Library/Frameworks/Mono.framework/Versions/3.4.0/lib/mono/4.5/mscorlib.dll'.
Mono: Config attempting to parse: '/Library/Frameworks/Mono.framework/Versions/3.4.0/lib/mono/4.5/mscorlib.dll.config'.
Mono: Config attempting to parse: '/Library/Frameworks/Mono.framework/Versions/3.4.0/lib/../etc/mono/assemblies/mscorlib/mscorlib.config'.
Mono: Assembly mscorlib[0x7870fc10] added to domain mcs.exe, ref_count=1
Mono: Config attempting to parse: '/Library/Frameworks/Mono.framework/Versions/3.4.0/lib/../etc/mono/config'.
Mono: Config attempting to parse: '/var/root/.mono/config'.
Mono: Assembly Loader probing location: '/Library/Frameworks/Mono.framework/Versions/3.4.0/lib/mono/4.5/mcs.exe'.
Mono: Image addref mcs[0x7980a9b0] -> /Library/Frameworks/Mono.framework/Versions/3.4.0/lib/mono/4.5/mcs.exe[0x792a0000]: 3
Mono: Assembly mcs[0x7980a9b0] added to domain mcs.exe, ref_count=1
Mono: AOT module '/Library/Frameworks/Mono.framework/Versions/3.4.0/lib/mono/4.5/mcs.exe.dylib' not found: dlopen(/Library/Frameworks/Mono.framework/Versions/3.4.0/lib/mono/4.5/mcs.exe.dylib, 9): image not found

Mono: Assembly Loader loaded assembly from location: '/Library/Frameworks/Mono.framework/Versions/3.4.0/lib/mono/4.5/mcs.exe'.
Mono: Config attempting to parse: '/Library/Frameworks/Mono.framework/Versions/3.4.0/lib/mono/4.5/mcs.exe.config'.
Mono: Config attempting to parse: '/Library/Frameworks/Mono.framework/Versions/3.4.0/lib/../etc/mono/assemblies/mcs/mcs.config'.
Mono: Assembly Loader probing location: '/Library/Frameworks/Mono.framework/Versions/3.4.0/lib/mono/4.5/mcs.exe'.
Mono: AOT module '/Library/Frameworks/Mono.framework/Versions/3.4.0/lib/mono/4.5/mcs.exe.dylib' not found: dlopen(/Library/Frameworks/Mono.framework/Versions/3.4.0/lib/mono/4.5/mcs.exe.dylib, 9): image not found

Mono: Assembly Ref addref mcs[0x7980a9b0] -> mscorlib[0x7870fc10]: 2
Mono: Config attempting to parse: '/Library/Frameworks/Mono.framework/Versions/3.4.0/lib/mono/4.5/mcs.exe.config'.
Mono: Assembly Loader probing location: '/Library/Frameworks/Mono.framework/Versions/3.4.0/lib/mono/4.5/System.Core.dll'.
Mono: Image addref System.Core[0x7980c660] -> /Library/Frameworks/Mono.framework/Versions/3.4.0/lib/mono/gac/System.Core/4.0.0.0__b77a5c561934e089/System.Core.dll[0x7a2aac00]: 2
Mono: Assembly System.Core[0x7980c660] added to domain mcs.exe, ref_count=1
Mono: AOT module '/Library/Frameworks/Mono.framework/Versions/3.4.0/lib/mono/gac/System.Core/4.0.0.0__b77a5c561934e089/System.Core.dll.dylib' not found: dlopen(/Library/Frameworks/Mono.framework/Versions/3.4.0/lib/mono/gac/System.Core/4.0.0.0__b77a5c561934e089/System.Core.dll.dylib, 9): image not found

Mono: Assembly Loader loaded assembly from location: '/Library/Frameworks/Mono.framework/Versions/3.4.0/lib/mono/4.5/System.Core.dll'.
Mono: Config attempting to parse: '/Library/Frameworks/Mono.framework/Versions/3.4.0/lib/mono/gac/System.Core/4.0.0.0__b77a5c561934e089/System.Core.dll.config'.
Mono: Config attempting to parse: '/Library/Frameworks/Mono.framework/Versions/3.4.0/lib/../etc/mono/assemblies/System.Core/System.Core.config'.
Mono: Assembly Ref addref mcs[0x7980a9b0] -> System.Core[0x7980c660]: 2
Mono: Assembly Ref addref System.Core[0x7980c660] -> mscorlib[0x7870fc10]: 3
Mono: Assembly Loader probing location: '/Library/Frameworks/Mono.framework/Versions/3.4.0/lib/mono/4.5/System.dll'.
Mono: Image addref System[0x7980f2d0] -> /Library/Frameworks/Mono.framework/Versions/3.4.0/lib/mono/gac/System/4.0.0.0__b77a5c561934e089/System.dll[0x7a2ab800]: 2
Mono: Assembly System[0x7980f2d0] added to domain mcs.exe, ref_count=1
Mono: AOT module '/Library/Frameworks/Mono.framework/Versions/3.4.0/lib/mono/gac/System/4.0.0.0__b77a5c561934e089/System.dll.dylib' not found: dlopen(/Library/Frameworks/Mono.framework/Versions/3.4.0/lib/mono/gac/System/4.0.0.0__b77a5c561934e089/System.dll.dylib, 9): image not found

Mono: Assembly Loader loaded assembly from location: '/Library/Frameworks/Mono.framework/Versions/3.4.0/lib/mono/4.5/System.dll'.
Mono: Config attempting to parse: '/Library/Frameworks/Mono.framework/Versions/3.4.0/lib/mono/gac/System/4.0.0.0__b77a5c561934e089/System.dll.config'.
Mono: Config attempting to parse: '/Library/Frameworks/Mono.framework/Versions/3.4.0/lib/../etc/mono/assemblies/System/System.config'.
Mono: Assembly Ref addref System.Core[0x7980c660] -> System[0x7980f2d0]: 2
Mono: Assembly Ref addref System[0x7980f2d0] -> mscorlib[0x7870fc10]: 4
Mono: Assembly Ref addref mcs[0x7980a9b0] -> System[0x7980f2d0]: 3
Mono C# compiler version 3.4.0.0
Mono: GC_MAJOR: (user request) pause 0.44ms, total 0.44ms, bridge 0.00ms major 592K/224K los 0K/0K
Mono: Unloading domain mcs.exe[0x7870e580], assembly mscorlib[0x7870fc10], ref_count=4
Mono: Unloading domain mcs.exe[0x7870e580], assembly mcs[0x7980a9b0], ref_count=1
Mono: Unloading assembly mcs [0x7980a9b0].
Mono: Unloading domain mcs.exe[0x7870e580], assembly System.Core[0x7980c660], ref_count=2
Mono: Unloading domain mcs.exe[0x7870e580], assembly System[0x7980f2d0], ref_count=3
Mono: Unloading image /Library/Frameworks/Mono.framework/Versions/3.4.0/lib/mono/4.5/mcs.exe [0x792a0000].
Mono: Unloading assembly System.Core [0x7980c660].
Mono: Unloading image /Library/Frameworks/Mono.framework/Versions/3.4.0/lib/mono/gac/System.Core/4.0.0.0__b77a5c561934e089/System.Core.dll [0x7a2aac00].
Mono: Unloading assembly System [0x7980f2d0].
Mono: Unloading image /Library/Frameworks/Mono.framework/Versions/3.4.0/lib/mono/gac/System/4.0.0.0__b77a5c561934e089/System.dll [0x7a2ab800].
Mono: Unloading assembly mscorlib [0x7870fc10].
Mono: Unloading image /Library/Frameworks/Mono.framework/Versions/3.4.0/lib/mono/4.5/mscorlib.dll [0x792a0600].
MCS     [net_2_0] mscorlib.dll
Mono: Assembly Loader probing location: './../../class/lib/build/mscorlib.dll'.
Mono: Image addref mscorlib[0x79949ce0] -> /Users/logosair/Documents/mono_3_4/mcs/class/lib/build/mscorlib.dll[0x7a0ad000]: 2
Mono: Assembly Loader probing location: './../../class/lib/build/mscorlib.dll'.
Mono: AOT loaded AOT Module for /Users/logosair/Documents/mono_3_4/mcs/class/lib/build/mscorlib.dll.

Mono: Assembly Loader loaded assembly from location: './../../class/lib/build/mscorlib.dll'.
Mono: Config attempting to parse: '/Users/logosair/Documents/mono_3_4/mcs/class/lib/build/mscorlib.dll.config'.
Mono: Config attempting to parse: '/Users/logosair/Documents/mono_3_4/runtime/etc/mono/assemblies/mscorlib/mscorlib.config'.
Mono: AOT FOUND method System.OutOfMemoryException:.ctor (string) [0x192e3f0 - 0x192e430 0x1c6f426]
Mono: AOT FOUND method System.NullReferenceException:.ctor (string) [0x19270c0 - 0x1927100 0x1c6f1ac]
Mono: AOT FOUND method System.StackOverflowException:.ctor (string) [0x1932630 - 0x1932660 0x1c6f61d]
Mono: Assembly mscorlib[0x79949ce0] added to domain mcs.exe, ref_count=1
Mono: Config attempting to parse: '/Users/logosair/Documents/mono_3_4/runtime/etc/mono/config'.
Mono: Assembly Loader probing location: './../../class/lib/build/mcs.exe'.
Mono: Image addref mcs[0x798435f0] -> /Users/logosair/Documents/mono_3_4/mcs/class/lib/build/mcs.exe[0x7a0abe00]: 3
Mono: Assembly mcs[0x798435f0] added to domain mcs.exe, ref_count=1
Mono: Assembly Loader probing location: './../../class/lib/build/System.Core.dll'.
Mono: Image addref System.Core[0x798442d0] -> /Users/logosair/Documents/mono_3_4/mcs/class/lib/build/System.Core.dll[0x7a8ab800]: 2
Mono: Assembly System.Core[0x798442d0] added to domain mcs.exe, ref_count=1
Mono: AOT module '/Users/logosair/Documents/mono_3_4/mcs/class/lib/build/System.Core.dll.dylib' not found: dlopen(/Users/logosair/Documents/mono_3_4/mcs/class/lib/build/System.Core.dll.dylib, 9): image not found

Mono: Assembly Loader loaded assembly from location: './../../class/lib/build/System.Core.dll'.
Mono: Config attempting to parse: '/Users/logosair/Documents/mono_3_4/mcs/class/lib/build/System.Core.dll.config'.
Mono: Config attempting to parse: '/Users/logosair/Documents/mono_3_4/runtime/etc/mono/assemblies/System.Core/System.Core.config'.
Mono: Assembly Loader probing location: './../../class/lib/build/System.Xml.dll'.
Mono: Image addref System.Xml[0x79844a20] -> /Users/logosair/Documents/mono_3_4/mcs/class/lib/build/System.Xml.dll[0x7a8abe00]: 2
Mono: Assembly System.Xml[0x79844a20] added to domain mcs.exe, ref_count=1
Mono: AOT module '/Users/logosair/Documents/mono_3_4/mcs/class/lib/build/System.Xml.dll.dylib' not found: dlopen(/Users/logosair/Documents/mono_3_4/mcs/class/lib/build/System.Xml.dll.dylib, 9): image not found

Mono: Assembly Loader loaded assembly from location: './../../class/lib/build/System.Xml.dll'.
Mono: Config attempting to parse: '/Users/logosair/Documents/mono_3_4/mcs/class/lib/build/System.Xml.dll.config'.
Mono: Config attempting to parse: '/Users/logosair/Documents/mono_3_4/runtime/etc/mono/assemblies/System.Xml/System.Xml.config'.
Mono: Assembly Loader probing location: './../../class/lib/build/System.dll'.
Mono: Image addref System[0x798451a0] -> /Users/logosair/Documents/mono_3_4/mcs/class/lib/build/System.dll[0x7a8ac400]: 2
Mono: Assembly System[0x798451a0] added to domain mcs.exe, ref_count=1
Mono: AOT module '/Users/logosair/Documents/mono_3_4/mcs/class/lib/build/System.dll.dylib' not found: dlopen(/Users/logosair/Documents/mono_3_4/mcs/class/lib/build/System.dll.dylib, 9): image not found

Mono: Assembly Loader loaded assembly from location: './../../class/lib/build/System.dll'.
Mono: Config attempting to parse: '/Users/logosair/Documents/mono_3_4/mcs/class/lib/build/System.dll.config'.
Mono: Config attempting to parse: '/Users/logosair/Documents/mono_3_4/runtime/etc/mono/assemblies/System/System.config'.
Mono: AOT loaded AOT Module for /Users/logosair/Documents/mono_3_4/mcs/class/lib/build/mcs.exe.

Mono: Assembly Loader loaded assembly from location: './../../class/lib/build/mcs.exe'.
Mono: Config attempting to parse: '/Users/logosair/Documents/mono_3_4/mcs/class/lib/build/mcs.exe.config'.
Mono: Config attempting to parse: '/Users/logosair/Documents/mono_3_4/runtime/etc/mono/assemblies/mcs/mcs.config'.
Mono: Assembly Loader probing location: './../../class/lib/build/mcs.exe'.
Mono: Assembly Ref addref mcs[0x798435f0] -> mscorlib[0x79949ce0]: 2
Mono: Assembly Ref addref mcs[0x798435f0] -> System.Core[0x798442d0]: 2
Mono: Assembly Ref addref System.Core[0x798442d0] -> mscorlib[0x79949ce0]: 3
Mono: Assembly Ref addref System.Core[0x798442d0] -> System[0x798451a0]: 2
Mono: Assembly Ref addref System[0x798451a0] -> mscorlib[0x79949ce0]: 4
Mono: AOT FOUND method Mono.CSharp.Driver:Main (string[]) [0x2573f60 - 0x2574200 0x297f7fc]
Mono: AOT FOUND method System.Environment:GetEnvironmentVariable (string) [0x1912570 - 0x19125e0 0x1c6e9b8]
Mono: AOT NOT FOUND: System.Security.SecurityManager:get_SecurityEnabled ().
Mono: AOT FOUND method System.Security.SecurityManager:.cctor () [0x1a92790 - 0x1a92800 0x1c79484]
Mono: AOT NOT FOUND: System.Environment:internalGetEnvironmentVariable (string).
Mono: AOT FOUND method string:op_Equality (string,string) [0x1932910 - 0x1932940 0x1c6f631]
Mono: AOT FOUND method string:.cctor () [0x193c6d0 - 0x193c710 0x1c6fa09]
Mono: AOT NOT FOUND: string:GetLOSLimit ().
Mono: AOT FOUND method Mono.CSharp.Location:.cctor () [0x25ee250 - 0x25ee290 0x2982b13]
Mono: AOT FOUND method System.EmptyArray`1:.cctor () [0x190da00 - 0x190da70 0x1c6e7a8]
Mono: AOT FOUND method Mono.CSharp.Location:Reset () [0x25ee990 - 0x25eea10 0x2982b5a]
* Assertion at tramp-x86.c:180, condition `code [0] == 0xff' not met

Stacktrace:

  at <unknown> <0xffffffff>
  at Mono.CSharp.Location.Reset () <0x0002f>
  at Mono.CSharp.Location..cctor () <0x00029>
  at (wrapper runtime-invoke) object.runtime_invoke_void (object,intptr,intptr,intptr) <0xffffffff>
  at <unknown> <0xffffffff>
  at Mono.CSharp.Driver.Main (string[]) <0x00044>
  at (wrapper runtime-invoke) <Module>.runtime_invoke_int_object (object,intptr,intptr,intptr) <0xffffffff>

Native stacktrace:

0   mono                                0x0014b55a mono_handle_native_sigsegv + 426
1   mono                                0x00201a8b sigabrt_signal_handler + 171
2   libsystem_platform.dylib            0x903e2deb _sigtramp + 43
3   ???                                 0xffffffff 0x0 + 4294967295
4   libsystem_c.dylib                   0x9044229c abort + 155
5   mono                                0x00441743 monoeg_g_logv + 323
6   mono                                0x004417e7 monoeg_assertion_message + 71
7   mono                                0x001f78be mono_arch_patch_plt_entry + 142
8   mono                                0x001505c6 mono_class_init_trampoline + 182
9   ???                                 0x0066f23c 0x0 + 6746684
10  mcs.exe.dylib                       0x025ee27a Mono_CSharp_Location__cctor + 42
11  ???                                 0x006fcea1 0x0 + 7327393
12  mono                                0x00037fa6 mono_jit_runtime_invoke + 2342
13  mono                                0x00342190 mono_runtime_invoke + 208
14  mono                                0x00342f30 mono_runtime_class_init_full + 2880
15  mono                                0x003423e7 mono_runtime_class_init + 39
16  mono                                0x00150568 mono_class_init_trampoline + 88
17  ???                                 0x0066f23c 0x0 + 6746684
18  ???                                 0x006fcd9a 0x0 + 7327130
19  mono                                0x00037fa6 mono_jit_runtime_invoke + 2342
20  mono                                0x00342190 mono_runtime_invoke + 208
21  mono                                0x0034e402 mono_runtime_exec_main + 738
22  mono                                0x0034e117 mono_runtime_run_main + 1079
23  mono                                0x0010324e mono_jit_exec + 286
24  mono                                0x001071c7 main_thread_handler + 647
25  mono                                0x00105b16 mono_main + 9014
26  mono                                0x00021e18 mono_main_with_options + 1016
27  mono                                0x00021a10 main + 64
28  libdyld.dylib                       0x90c96701 start + 1
29  ???                                 0x0000001d 0x0 + 29

Debug info from gdb:

Process 34557 stopped
* thread #1: tid = 0x104e8, 0x94068ff2 libsystem_kernel.dylib`__wait4 + 10, queue = 'com.apple.main-thread', stop reason = signal SIGSTOP
  thread #2: tid = 0x104f5, 0x94063fb6 libsystem_kernel.dylib`semaphore_wait_trap + 10
  thread #3: tid = 0x104f6, 0x94069992 libsystem_kernel.dylib`kevent64 + 10, queue = 'com.apple.libdispatch-manager'
  thread #4: tid = 0x104f7, 0x94069046 libsystem_kernel.dylib`__workq_kernreturn + 10
  thread #5: tid = 0x104f8, 0x94069046 libsystem_kernel.dylib`__workq_kernreturn + 10
(lldb) * thread #1: tid = 0x104e8, 0x94068ff2 libsystem_kernel.dylib`__wait4 + 10, queue = 'com.apple.main-thread', stop reason = signal SIGSTOP
  * frame #0: 0x94068ff2 libsystem_kernel.dylib`__wait4 + 10
    frame #1: 0x90460ec5 libsystem_c.dylib`waitpid$UNIX2003 + 48
    frame #2: 0x0014b6d5 mono`mono_handle_native_sigsegv(signal=6, ctx=0xbffde77c) + 805 at mini-exceptions.c:2305
    frame #3: 0x00201a8b mono`sigabrt_signal_handler(_dummy=6, info=0xbffde73c, context=0xbffde77c) + 171 at mini-posix.c:206
    frame #4: 0x903e2deb libsystem_platform.dylib`_sigtramp + 43

  thread #2: tid = 0x104f5, 0x94063fb6 libsystem_kernel.dylib`semaphore_wait_trap + 10
    frame #0: 0x94063fb6 libsystem_kernel.dylib`semaphore_wait_trap + 10
    frame #1: 0x0042f86f mono`mono_sem_wait(sem=0x0053fcc0, alertable=1) + 31 at mono-semaphore.c:121
    frame #2: 0x0033c9c1 mono`finalizer_thread(unused=0x00000000) + 209 at gc.c:1073
    frame #3: 0x002ffe6c mono`start_wrapper_internal(data=0x79953810) + 1020 at threads.c:647
    frame #4: 0x002ffa62 mono`start_wrapper(data=0x79953810) + 34 at threads.c:694
    frame #5: 0x00439472 mono`inner_start_thread(arg=0xbffdeb48) + 626 at mono-threads-posix.c:94
    frame #6: 0x99dd05fb libsystem_pthread.dylib`_pthread_body + 144
    frame #7: 0x99dd0485 libsystem_pthread.dylib`_pthread_start + 130

  thread #3: tid = 0x104f6, 0x94069992 libsystem_kernel.dylib`kevent64 + 10, queue = 'com.apple.libdispatch-manager'
    frame #0: 0x94069992 libsystem_kernel.dylib`kevent64 + 10
    frame #1: 0x941e58ad libdispatch.dylib`_dispatch_mgr_invoke + 238
    frame #2: 0x941e5546 libdispatch.dylib`_dispatch_mgr_thread + 52

  thread #4: tid = 0x104f7, 0x94069046 libsystem_kernel.dylib`__workq_kernreturn + 10
    frame #0: 0x94069046 libsystem_kernel.dylib`__workq_kernreturn + 10
    frame #1: 0x99dd1dcf libsystem_pthread.dylib`_pthread_wqthread + 372

  thread #5: tid = 0x104f8, 0x94069046 libsystem_kernel.dylib`__workq_kernreturn + 10
    frame #0: 0x94069046 libsystem_kernel.dylib`__workq_kernreturn + 10
    frame #1: 0x99dd1dcf libsystem_pthread.dylib`_pthread_wqthread + 372
Executing commands in '/tmp/mono-gdb-commands.n2Lci6'.
(lldb)  process attach --pid 34557
Process 34557 stopped
Executable module set to "/Users/logosair/Documents/mono_3_4/mono/mini/mono".
Architecture set to: i486-apple-macosx.
(lldb)  script lldb.debugger.HandleCommand ("thread list")
(lldb)  script lldb.debugger.HandleCommand ("thread backtrace all")
(lldb)  detach
Detaching from process 34557
(lldb)  quit
error: Aborting reading of commands after command #4: 'quit' failed with <unknown error>.
Aborting after_file command execution, command file: '/tmp/mono-gdb-commands.n2Lci6' failed.
Process 34557 detached
(lldb) 
=================================================================
Got a SIGABRT while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries 
used by your application.
=================================================================

/bin/sh: line 1: 34557 Abort trap: 6          MONO_PATH="./../../class/lib/build:$MONO_PATH" /Users/logosair/Documents/mono_3_4/runtime/mono-wrapper ./../../class/lib/build/mcs.exe /codepage:65001 -unsafe -nostdlib -nowarn:612,618 -d:INSIDE_CORLIB -d:LIBC -d:NET_1_1 -d:NET_2_0 -nowarn:1699 -nostdlib -lib:./../../class/lib/net_2_0 -debug -optimize /noconfig -resource:resources/collation.core.bin -resource:resources/collation.tailoring.bin -resource:resources/collation.cjkCHS.bin -resource:resources/collation.cjkCHT.bin -resource:resources/collation.cjkJA.bin -resource:resources/collation.cjkKO.bin -resource:resources/collation.cjkKOlv2.bin --runtime:v2 -target:library -out:../../class/lib/net_2_0/tmp/mscorlib.dll @corlib.dll.sources
make[8]: *** [../../class/lib/net_2_0/tmp/mscorlib.dll] Error 134
make[7]: *** [do-all] Error 2
make[6]: *** [all-recursive] Error 1
make[5]: *** [all-recursive] Error 1
make[4]: *** [profile-do--net_2_0--all] Error 2
make[3]: *** [profiles-do--all] Error 2
make[2]: *** [all-local] Error 2
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
bash-3.2#
Comment 14 Michael Weber 2014-04-21 10:59:08 UTC
One more comment.

Around 4/14/2014, I was able to log into SharePoint Online from the attached code using Xamarin Studio Alpha Channel with Mono 3.4 on my Mac thanks to help from Xamarin support.  

On Thursday, 4/24/2014, I published an app to the Apple Store which had me go through quite a few steps.

On Saturday, 4/26/2014, I could no longer programmatically log in to SharePoint Online but I was still using Xamarin Studio Alpha Channel with Mono 3.4.  

I would love for someone to confirm that the attached code no longer works so I can eliminate the possibility that the app publishing process I went through on 4/24 didn't goof my environment.

Thanks.
Mike
Comment 15 John Miller [MSFT] 2014-04-21 16:13:31 UTC
# I installed the latest Alpha:

Runtime:
	Mono 3.4.0 ((no/d4511ef)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 304000185

Xamarin.iOS
Version: 7.2.1.101 (Business Edition)
Hash: 2f75908
Branch: 
Build date: 2014-04-14 11:05:48-0400

# Running the Repro Project attached I get the following exception:

"Invalid cookie domain: login.microsoftonline.com"

StackTrace: 

  at System.Net.HttpWebRequest.EndGetResponse (IAsyncResult asyncResult) [0x0005e] in /Volumes/build-root-ramdisk/mono-3.4.0/mcs/class/System/System.Net/HttpWebRequest.cs:985 
  at System.Threading.Tasks.TaskFactory`1[System.Net.WebResponse].InnerInvoke (System.Threading.Tasks.TaskCompletionSource`1 tcs, System.Func`2 endMethod, IAsyncResult l) [0x00000] in /Volumes/build-root-ramdisk/mono-3.4.0/mcs/class/corlib/System.Threading.Tasks/TaskFactory_T.cs:473 
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000b] in /Volumes/build-root-ramdisk/mono-3.4.0/mcs/class/corlib/System.Runtime.ExceptionServices/ExceptionDispatchInfo.cs:62 
  at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter[System.Net.WebResponse].GetResult () [0x00034] in /Volumes/build-root-ramdisk/mono-3.4.0/mcs/class/corlib/System.Runtime.CompilerServices/ConfiguredTaskAwaitable_T.cs:62 
  at System.Net.Http.HttpClientHandler+<SendAsync>c__async0.MoveNext () [0x00245] in /Volumes/build-root-ramdisk/mono-3.4.0/mcs/class/System.Net.Http/System.Net.Http/HttpClientHandler.cs:319 
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000b] in /Volumes/build-root-ramdisk/mono-3.4.0/mcs/class/corlib/System.Runtime.ExceptionServices/ExceptionDispatchInfo.cs:62 
  at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter[System.Net.Http.HttpResponseMessage].GetResult () [0x00034] in /Volumes/build-root-ramdisk/mono-3.4.0/mcs/class/corlib/System.Runtime.CompilerServices/ConfiguredTaskAwaitable_T.cs:62 
  at System.Net.Http.HttpClient+<SendAsyncWorker>c__async0.MoveNext () [0x000a9] in /Volumes/build-root-ramdisk/mono-3.4.0/mcs/class/System.Net.Http/System.Net.Http/HttpClient.cs:273 
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000b] in /Volumes/build-root-ramdisk/mono-3.4.0/mcs/class/corlib/System.Runtime.ExceptionServices/ExceptionDispatchInfo.cs:62 
  at System.Runtime.CompilerServices.TaskAwaiter`1[System.Net.Http.HttpResponseMessage].GetResult () [0x00034] in /Volumes/build-root-ramdisk/mono-3.4.0/mcs/class/corlib/System.Runtime.CompilerServices/TaskAwaiter_T.cs:59 
  at MySPOWin8App.HttpUtility+<SendHttpRequest>c__async0.MoveNext () [0x002bf] in /Users/John/Downloads/ForbiddenTest-2/ForbiddenTest/HttpUtility.cs:64
Comment 16 Marek Safar 2014-04-22 08:32:19 UTC
The server is responding with invalid cookie.

Fixed in Mono master to handle this case.
Comment 17 Michael Weber 2014-04-22 10:26:46 UTC
John Miller confirmed yesterday that the problem reappeared in Xamarin Studio Alpha Channel with Mono 3.4.

Marek - did you run the test recently in your environment and it worked?  It stopped working in my environment last Saturday.  As noted above, it worked a week ago Monday with Mono 3.4.

Thanks.
Mike
Comment 18 Marek Safar 2014-04-22 10:29:30 UTC
I ran the test and it works for me now. If you rely on some 3rd party server response you cannot assume your code will always work. I don't know what cookie was sent before but the one the server sends now was causing another sort of errors.
Comment 19 Michael Weber 2014-04-22 10:39:27 UTC
Hi Marek,

From your statement above, you're saying that the code works for you "now"?

You can successfully log in?

If so, can you upload the project?


Or are you saying that this is separate issue now?  Something has changed in the past week with the cookie which broke Mono.  This still works on Windows in Xamarin Studio.

Thanks.
Mike
Comment 20 Marek Safar 2014-04-22 10:41:41 UTC
I can log in with Mono after this fix https://github.com/mono/mono/commit/09366779f094b37e0240c0bcd09c0b5a07fc2135

Xamarin Studio on windows is using .net not mono IIRC
Comment 21 Michael Weber 2014-04-22 10:49:22 UTC
Would you please upload or send me the OSX dll that has your fix (System.Net.dll)?

Thanks so much for your contribution.

One more question, I would love to get this compiling on my own Mac.  Did you following instructions here for compilation on Mac OSX?
http://mono-project.com/Compiling_Mono_on_OSX

More specifically:
PATH=$PREFIX/bin:$PATH
git clone https://github.com/mono/mono.git
cd mono
CC='cc -m32' ./autogen.sh --prefix=$PREFIX --disable-nls --build=i386-apple-darwin11.2.0
make
make install
Comment 22 Marek Safar 2014-04-22 10:56:44 UTC
Created attachment 6631 [details]
System.dll
Comment 23 Marek Safar 2014-04-22 10:57:43 UTC
I am compiling on Mac using

 ./autogen.sh CFLAGS="-m32" -prefix=/Users/marek/mono --host=i86-apple-darwin11  --enable-nls=no

Attached you can find 4.5 System.dll which should have the fix included.