locked
How To Login With WinRT And Asp.net Web Api or MVC RRS feed

  • Question

  • Hello People,

    Is There Any Example On Here On How I Can Login From My WinRT Application  Using Asp.net Web Api Or MVC Accounts Controller ? Or Anything Similar ?

    Looking Forward To Your Help.

    Thank You.

    Hamid Wakili

    Monday, September 2, 2013 3:24 PM

Answers

  • Hi, Hamid

    You can use HttpClient to connect to the webservice and get the user’s certificates. Then check the user’s certificates whether identical to the user input in windows store app. If identical, you can save the user’s certificates in Password Vault, when the next time you login, you can directly use the PasswordVault API to read a credential from the Credential Locker.

    Also, there is a Controller for authentication in windows store app, you can refer to this link below:

    http://msdn.microsoft.com/en-us/library/windows/apps/hh464908.aspx

    Best Wishes!


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.


    • Edited by Anne Jing Thursday, September 5, 2013 9:31 AM from
    • Marked as answer by BIRDMAN Rip off Thursday, September 5, 2013 10:44 AM
    Thursday, September 5, 2013 9:30 AM

All replies

  • Hi, Hamid

    Please describe detail about your thread. Do you want to login in a windows store app using authentication? Or you want to login in web service using authentication in windows store app?

    Best Wishes!


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.


    • Edited by Anne Jing Tuesday, September 3, 2013 1:16 PM from
    Tuesday, September 3, 2013 8:17 AM
  • Hello Anne,

    I am using a custom login user control. i have Username And Password textbox's.

    So example:

    If (Username is == Hamid And Password == Wakili ) Then Navigate To MainPage.xaml .

    this is very simple.

    Now lets say i have an asp.net project which has an Account Controller as normal :) which returns Xml or Json . and it runs on localhost:1001/Users/  or  www.hamidwakili.com/Users

    How can i be able to login with this to my Login Button Click . in Normal Desktop Apps its very easy like abc :) .

    I dont want to use  WinRT Authentication but i am storing the values in Password Vault of course.

    Thank You Anne Jing :) :D

    Tuesday, September 3, 2013 8:49 AM
  • Hi, Hamid

    You can use HttpClient to connect to the webservice and get the user’s certificates. Then check the user’s certificates whether identical to the user input in windows store app. If identical, you can save the user’s certificates in Password Vault, when the next time you login, you can directly use the PasswordVault API to read a credential from the Credential Locker.

    Also, there is a Controller for authentication in windows store app, you can refer to this link below:

    http://msdn.microsoft.com/en-us/library/windows/apps/hh464908.aspx

    Best Wishes!


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.


    • Edited by Anne Jing Thursday, September 5, 2013 9:31 AM from
    • Marked as answer by BIRDMAN Rip off Thursday, September 5, 2013 10:44 AM
    Thursday, September 5, 2013 9:30 AM
  • Thank You Anne, 

    You are a saver :) :) . This is what i needed.

    Thank You A lot .

    Hamid Wakili

    Thursday, September 5, 2013 10:48 AM