New Posts New Posts RSS Feed: Security
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Security

 Post Reply Post Reply
Author
orcities View Drop Down
Senior Member
Senior Member
Avatar

Joined: 28-Aug-2007
Location: United States
Posts: 454
Post Options Post Options   Quote orcities Quote  Post ReplyReply Direct Link To This Post Topic: Security
    Posted: 25-Sep-2012 at 10:56am
When developing a WinRt app do I have to use the Asp.net type security or can I do windows type? I have tried n-tier with the server containing the IEntityLoginManager code and it is never called.

This may seem like an odd question but I am new to WinRt and have never done Win7 phone apps.
Back to Top
sbelini View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 13-Aug-2010
Location: Oakland
Posts: 786
Post Options Post Options   Quote sbelini Quote  Post ReplyReply Direct Link To This Post Posted: 26-Sep-2012 at 12:02pm
Hi,
You can indeed use Windows authentication in a WinRt app. (http://msdn.microsoft.com/en-us/library/hh556233(v=vs.110).aspx)
 
This appears to be a bug. We are investigating the issue and will keep you posted.
 
Regards,
   sbelini
Back to Top
sbelini View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 13-Aug-2010
Location: Oakland
Posts: 786
Post Options Post Options   Quote sbelini Quote  Post ReplyReply Direct Link To This Post Posted: 01-Oct-2012 at 3:29pm
Hi orcities,
 
I looked further and the LoginManager appears to be working properly.
While I can't hit a breakpoint, (like in SL or WPF) I know that the LoginManager is being hit because it writes to the debug log.
 
I'm attaching a simple solution showing it: uploads/892/T12169.zip
 
Regards,
   sbelini.
Back to Top
orcities View Drop Down
Senior Member
Senior Member
Avatar

Joined: 28-Aug-2007
Location: United States
Posts: 454
Post Options Post Options   Quote orcities Quote  Post ReplyReply Direct Link To This Post Posted: 02-Oct-2012 at 8:21am
In running your example. I had forced an error in the Login Manager. The data still loads successfully. This implies it is not working correctly.
Back to Top
sbelini View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 13-Aug-2010
Location: Oakland
Posts: 786
Post Options Post Options   Quote sbelini Quote  Post ReplyReply Direct Link To This Post Posted: 02-Oct-2012 at 10:17am

Note that my LoginManager does not do anything usefull other than write to the log to prove it's being hit.

 
I had not intention of writing a LoginManager that properly authenticates the user as this was not the issue. (You can see I'm just passing null credentials)
As a matter of fact, after the login, the user is still not authenticated.
 
Maybe I misunderstood your original question. I was under the impression that the issue is that the LoginManager was not being hit upon a LoginAsync call. - We already stablished that this is not the case.
 
Please explain in detail what it the problem you are experiencing.
 
Regards,
   sbelini.
 
 
Back to Top
orcities View Drop Down
Senior Member
Senior Member
Avatar

Joined: 28-Aug-2007
Location: United States
Posts: 454
Post Options Post Options   Quote orcities Quote  Post ReplyReply Direct Link To This Post Posted: 02-Oct-2012 at 10:21am
The issue is of course the whole thing. Providing security. Not allowing anything if they do not have permission. I will apply the entity security layer and see if it does not provide results.
Back to Top
orcities View Drop Down
Senior Member
Senior Member
Avatar

Joined: 28-Aug-2007
Location: United States
Posts: 454
Post Options Post Options   Quote orcities Quote  Post ReplyReply Direct Link To This Post Posted: 02-Oct-2012 at 11:19am
Attached please find my example. It does not fail at either the login or the entityqueryinterceptor.

Back to Top
sbelini View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 13-Aug-2010
Location: Oakland
Posts: 786
Post Options Post Options   Quote sbelini Quote  Post ReplyReply Direct Link To This Post Posted: 02-Oct-2012 at 1:11pm
orcities,

Your sample appears to be failing as it should.

It is always failing during Login, throwing a NotImplementedException (it never gets to the QueryInterceptor since login throws):



sbelini.
Back to Top
orcities View Drop Down
Senior Member
Senior Member
Avatar

Joined: 28-Aug-2007
Location: United States
Posts: 454
Post Options Post Options   Quote orcities Quote  Post ReplyReply Direct Link To This Post Posted: 02-Oct-2012 at 1:18pm
When I run it it still give me results. If it fails to login it should not get results. It never throws the error.
Back to Top
sbelini View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 13-Aug-2010
Location: Oakland
Posts: 786
Post Options Post Options   Quote sbelini Quote  Post ReplyReply Direct Link To This Post Posted: 02-Oct-2012 at 2:05pm
Did you make sure to clean/rebuild the solution and close IIS Express?
Back to Top
orcities View Drop Down
Senior Member
Senior Member
Avatar

Joined: 28-Aug-2007
Location: United States
Posts: 454
Post Options Post Options   Quote orcities Quote  Post ReplyReply Direct Link To This Post Posted: 02-Oct-2012 at 2:58pm
I have tried all including restarting machine. Nothing makes the error get thrown or stop the query from loading data.

I am sure if you altered the example to load from northwindib it would give you same results.
Back to Top
sbelini View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 13-Aug-2010
Location: Oakland
Posts: 786
Post Options Post Options   Quote sbelini Quote  Post ReplyReply Direct Link To This Post Posted: 03-Oct-2012 at 10:37am
I had actually created a db based on the model and added a few records when I tested. Still I get the exception thrown as shown in the screenshot.
Back to Top
orcities View Drop Down
Senior Member
Senior Member
Avatar

Joined: 28-Aug-2007
Location: United States
Posts: 454
Post Options Post Options   Quote orcities Quote  Post ReplyReply Direct Link To This Post Posted: 03-Oct-2012 at 10:39am
You have my exact code. Can you help me figure out why I would be getting data when you are getting the error?
Back to Top
orcities View Drop Down
Senior Member
Senior Member
Avatar

Joined: 28-Aug-2007
Location: United States
Posts: 454
Post Options Post Options   Quote orcities Quote  Post ReplyReply Direct Link To This Post Posted: 04-Oct-2012 at 7:29am
In looking further I see that the EntityManager is in fact not logged in. But, why does it still return data?
Back to Top
orcities View Drop Down
Senior Member
Senior Member
Avatar

Joined: 28-Aug-2007
Location: United States
Posts: 454
Post Options Post Options   Quote orcities Quote  Post ReplyReply Direct Link To This Post Posted: 04-Oct-2012 at 7:57am
I added another entity to the edmx and now I get the error. Apparently just rebuilding the model didn't do it. I needed to alter it.

Thank you.


Back to Top
sbelini View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 13-Aug-2010
Location: Oakland
Posts: 786
Post Options Post Options   Quote sbelini Quote  Post ReplyReply Direct Link To This Post Posted: 04-Oct-2012 at 9:39am
Thanks for the update.
I'm glad the issue is gone. I was starting to run out of options here.
 
sbelini.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down