You must Sign In to post a response.
  • Category: Webservices

    To Provide Authentication before using webserivce

    I Want to provide authentication before i call my web service.in url when i hit my webservice it should ask for login . please provide solution for this
  • #764690
    Hi pratik,

    You have to set following attribute for a web method inside web service first.
    [SoapHeader ("Authentication", Required=true)]
    Then you can implement authentication mechanism inside a webservice and for that refer following URL's:
    http://www.c-sharpcorner.com/UploadFile/8ef97c/web-service-in-Asp-Net-security-by-soap-authentication-pa/
    http://www.codeproject.com/Articles/4398/Authentication-for-Web-Services-using-SOAP-headers
    Hope it helps.
    Regards,
    Shashikant Gurav
    shashikantgurav22@gmail.com

  • #764741
    Here you go for the sample code in this regard,

    https://msdn.microsoft.com/library/9z52by6a(v=vs.100).aspx

    http://www.c-sharpcorner.com/UploadFile/8ef97c/web-service-in-Asp-Net-security-by-soap-authentication-pa/


    Regards,
    Asheej T K


  • Sign In to post your comments