Note that there are some explanatory texts on larger screens.

plurals
  1. POImpossible issue connecting to Windows Live Messenger network
    primarykey
    data
    text
    <p>This issue is giving me serious headaches, I don't have a clue what's going on here. If you don't have any experience with the Windows Live network, I ask you to read this anyway, maybe it has nothing to do with it and am I overlooking something totally unrelated.</p> <p>In short: I wrote an Objective-C class that allows me to connect to the Windows Live Messenger network, called <code>WLNotificationSession</code>. I works really straightforward, I set the <code>username</code> and <code>password</code> variables and do <code>[notificationSession start];</code>. It then logs in successfully.</p> <p>Let's say I have two Windows Live accounts. The first one, A, is now logged in.</p> <p>The problem arises when I try to fire up <strong>a second</strong> <code>WLNotificationSession</code>, with the other Windows Live account, B. It always fails. The usernames and passwords are 100% correct. When I try to log in B first, it succeeds. When I try A while B is logged in, it fails. <strong>The second login session always fails.</strong></p> <p>It can't be something like "too much log in attempts in a short period of time". When I log in A, quit the app, restart the app and log in A again, <em>both attempts succeed</em>. I can do this within 20 seconds. But, when I fire up the app, log A in, disconnect A, wait 2 hours, log in B (all without closing the app), <em>it fails</em>. (??)</p> <p>For those of you with experience with the WL network: the failure occurs during the Tweener authentication. The part where you get the "Authentication-Info" or "WWW-Authenticate" HTTP header from the login server. When it fails, I get this value: <code>"Www-Authenticate" = "Passport1.4 da-status=failed-noretry,srealm=Passport.NET,ts=-2,prompt,cburl=http://messenger.msn.com/images/logo102x88.gif,cbtxt=.NET%20Messenger%20Service";</code></p> <p>I really hope someone can help with this. Thank you.</p> <p>UPDATE This is some example code. I create a new project, add this code in the applicationDidFinishLaunching method and click Build &amp; Run:</p> <p><code>WLNotificationSession *notificationSession1 = [[WLNotificationSession alloc] init];</code></p> <p><code>notificationSession1.username = @"testaccount1@hotmail.com";</code></p> <p><code>notificationSession1.password = @"testpwd";</code></p> <p><code>[notificationSession1 start];</code></p> <p><code>WLNotificationSession *notificationSession2 = [[WLNotificationSession alloc] init];</code></p> <p><code>notificationSession2.username = @"testaccount2@hotmail.com";</code></p> <p><code>notificationSession2.password = @"testpwd";</code></p> <p><code>[notificationSession2 start];</code></p> <p>notificationSession1 always succeeds, notificationSession2 always fails. No global variables, or shared variables whatsoever.</p> <p>UPDATE 2</p> <p>Following David's suggestion the problem could be cookie-related, I added this code to my project: <code>[[NSHTTPCookieStorage sharedHTTPCookieStorage] setCookieAcceptPolicy:NSHTTPCookieAcceptPolicyNever];</code></p> <p>I also use his method in the comments below to delete any cookies before and after each URL request. This is probably unnecessary, but I do it anyway.</p> <p>I think at this point it is safe to assume it's not the cookies, or there has to be some other place where cookies are stored.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload