Web Service - Authentication to Web Users

Ravi_ThakkarRavi_Thakkar Member Posts: 392
edited 2013-02-28 in NAV Three Tier
Hi all Experts,

Acc. to my knowledge, Web Services provodes windows authentication.
So, on developing the web application whether we need to customize the authentication part or it will be handled automatically by the Web Services' windows authentication?

Please mension the proper method.
Thanks in Advance.
Ravi_Thakkar
Ahmedabad, Gujarat, India
E Mail : ravi.thakkar@hotmail.com

Answers

  • kinekine Member Posts: 12,562
    The service have two properties - "Credentials" and "UseDefaultCredentials". Depends on how you set them. If you set UseDefaultCredentials to true, the application will take the account under which is running and use it as credentials for connecting to the WebService.
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • Ravi_ThakkarRavi_Thakkar Member Posts: 392
    Hi, Kine,

    Thanks for your reply.
    I got your point. But, I need some detailed document related to Web Services and Credentials.

    Please, suggest me any of the help links or posts or materials.

    Thanks in Adv.
    Ravi_Thakkar
    Ahmedabad, Gujarat, India
    E Mail : ravi.thakkar@hotmail.com
  • kinekine Member Posts: 12,562
    edited 2009-01-28
    Just look into MSDN help about credentials. E.g. http://msdn.microsoft.com/en-us/library/aa374789(VS.85).aspx
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • NickANickA Member Posts: 32
    This works for me from c# ...
    <webservice>.UseDefaultCredentials = false;
    <webservice>.Credentials = new System.Net.NetworkCredential("<user>", "<password>", "<domain>");
    

    hth
  • Ravi_ThakkarRavi_Thakkar Member Posts: 392
    Hi Kine,

    Thanks for your reply.
    But at your specified link there is no any content. Error is as shown in attachment.
    kine wrote:
    Jst look into MSDN help about credentials. E.g. http://msdn.microsoft.com/en-us/library/aa374789(VS.85).aspx

    Please, suggest.

    Thanks.
    Ravi_Thakkar
    Ahmedabad, Gujarat, India
    E Mail : ravi.thakkar@hotmail.com
  • kinekine Member Posts: 12,562
    Because you entered just part of the URL. The automatic URL detection failed on the parentheses, I repaired the URL manually in my previous post... 8)
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • Ravi_ThakkarRavi_Thakkar Member Posts: 392
    Oh I am sorry.

    Thanks.
    Ravi_Thakkar
    Ahmedabad, Gujarat, India
    E Mail : ravi.thakkar@hotmail.com
  • Ravi_ThakkarRavi_Thakkar Member Posts: 392
    Hi, NickA

    Thanks for Reply.
    Whether the method done by you asking to enter the Username and Password or you have done Hard-Code in Coding?
    Please, specify.
    NickA wrote:
    This works for me from c# ...
    <webservice>.UseDefaultCredentials = false;
    <webservice>.Credentials = new System.Net.NetworkCredential("<user>", "<password>", "<domain>");
    

    hth
    Thanks.
    Ravi_Thakkar
    Ahmedabad, Gujarat, India
    E Mail : ravi.thakkar@hotmail.com
  • NickANickA Member Posts: 32
    ?? Not sure of your meaning.

    It was a very simple c# example. Replace <webservice> with your webservice and <user>, <password>, <domain> with your actual credentials.
  • Ravi_ThakkarRavi_Thakkar Member Posts: 392
    Thanks to all.
    My problem has been solved.

    We can do by both the ways. I wasted so much time for it.

    1) We can block the system generated Dialog for the authentication by some settings on IIS.
    And then by making our own Login Page.
    2) By using System Generated Dialog, created by some settings on IIS.

    Thanks.
    Ravi_Thakkar
    Ahmedabad, Gujarat, India
    E Mail : ravi.thakkar@hotmail.com
  • KCLaiKCLai Member Posts: 31
    Hi Ravi,

    would you be able to share the screen shots of your findings.

    Thanks
  • ewebtonicewebtonic Member Posts: 1
    If you are looking for website designing service company in Patna then it is better to get from Ewebtonic Services Pvt. Ltd. We actually used to provide services which are provided on time and in budget. If you are looking for such service then it is better to get from such service.

    Website Designing Service Company in Bihar
Sign In or Register to comment.