none
Window Authentication implementation RRS feed

  • Question

  • Hi guys,

    i am new to wcf service .i just want to implement window authentication for specific user group.Please tell me best way to achieve this.

    Current Implementation:-

    <security mode="TransportCredentialOnly">
                <transport clientCredentialType="Windows" />
              </security>

    <system.web>
        <authentication mode="Windows" />
        <identity impersonate="false" />
      </system.web>

    Anonymous Authentication-Enable

    Window Authentication-Enable

    Thanks In Advance

    • Moved by Sabah ShariqMVP Tuesday, January 31, 2017 9:04 AM Moved From Visual C#
    Tuesday, January 31, 2017 6:11 AM

All replies

  • Hi Vivek,

    This is Visual C# forum. As your issue is related to Windows Service I am moving your thread to WCF forum for getting quick response.

    Your understanding and cooperation will be grateful.

    Thanks,
    Sabah Shariq

    [If a post helps to resolve your issue, please click the "Mark as Answer" of that post or click Answered "Vote as helpful" button of that post. By marking a post as Answered or Helpful, you help others find the answer faster. ]

    Tuesday, January 31, 2017 9:04 AM
  • I am assuming that you are asking for windows authentication  with Authorisation restrictions to specific groups?

    Option A -

    Assuming you have turned on windows authentication for WCF , you can use declarative principle permissions . For details see https://msdn.microsoft.com/en-us/library/ff647503.aspx

        [PrincipalPermission(SecurityAction.Demand, Role = "Administrators")]
        [PrincipalPermission(SecurityAction.Demand, Name = "John")]
        public string WcfOperation(string caller)
        {
         //your regular code here
        }


    Wednesday, February 1, 2017 1:55 AM