Print Page | Close Window

Authentication fails in OOB app on Apple Mac

Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce 2010
Forum Discription: For .NET 4.0
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=2349
Printed Date: 19-Apr-2024 at 2:29pm


Topic: Authentication fails in OOB app on Apple Mac
Posted By: geoffapple
Subject: Authentication fails in OOB app on Apple Mac
Date Posted: 06-Dec-2010 at 7:36am
I have a Silverlight application configured to use Asp.net forms authentication and and it can be run in or out of browser.

In the browser, on both Windows and Mac, authentication works as expected. I can successfully login using LoginAsync and the subsequent queries pass the user information back and forth between the server and client. The same is true of the Out of Browser app on Windows.

However, this does not work on the Mac when running out of browser. The login appears to complete successfully but on any queries the user appears unauthenticated on the server. ie I am using query interceptors to filter returned items based on the logged in user, but these fail as the user appears 'not logged in' (I do not get an error but no items are returned)

Using fiddler, the .ASPXAUTH cookie appears to be passed back to the server so I am not sure why this does not work. To re-iterate, it does work on Windows.

I found http://blogs.msdn.com/b/kylemc/archive/2010/05/14/ria-services-authentication-out-of-browser.aspx - this  blog entry that seems to describe a fix for a similar problem using Ria Services, but I am not sure if this applies to Devforce or how to implement it.

Many Thanks
Geoff



Replies:
Posted By: geoffapple
Date Posted: 10-Dec-2010 at 8:24am
My bad

I was using HttpContext.Current.User in the EntityServerQueryInterceptor to get the logged in user. That worked in- browser on Windows and Mac and out-of-browser on Windows but not oob on Mac.

Getting the user using this.Principal (me.Principal in  http://vb.net/ - vb.net ) solved the identity problem. It now works in all scenarios.


Posted By: JaimeBula
Date Posted: 06-Feb-2011 at 12:44pm
How did you exactly solve this issue?
 
I haven't found anything like this.Principal on my WCF Service.
 
I'm hanving exactly the same issue here.
 
Best Regards.
 
JB


Posted By: geoffapple
Date Posted: 07-Feb-2011 at 1:45am
I am using this in EntityServerQueryInterceptor (FilterQuery) and EntityServerSaveInterceptor (ExecuteSave) on the server.

In those methods you can access the current logged in user Principal using this.Principal or me.Principal.




Posted By: Cartmill
Date Posted: 05-Apr-2011 at 7:34pm
Originally posted by JaimeBula

How did you exactly solve this issue?
 
I haven't found anything like this.Principal on my WCF Service. http://www.ebelow.com/ipad-2-case-iPad2case-iPad-2-cases.html - ipad 2 cases
http://www.ebelow.com/ipad-2-leather-cases.html - ipad2 leather case
http://www.ebelow.com/iPad2-cases-cheap-iPad2-cases-iPad2-case.html - iPad2 case I'm hanving exactly the same issue here.
 
Best Regards.
 
JB

I was using HttpContext.Current.User in the EntityServerQueryInterceptor to get the logged in user. That worked in- browser on Windows and Mac and out-of-browser on Windows but not oob on Mac.



Print Page | Close Window