Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 3550
  • Last Modified:

How to use ServiceSecurityContext.Current in WCF

Hi Experts ..

I have a WCF service self-hosted, I am trying to access ServiceSecurityContext.Current from within the operations of the WCF service, but it always NULL.

I am testing the WCF Service and I am trying to find a way to pass non-null ServiceSecurityContext.Current. any idea?

Thanks,
0
elkhawajah
Asked:
elkhawajah
1 Solution
 
elkhawajahAuthor Commented:
I fixed it by editing the binding configuration (app.config):

 <wsHttpBinding>
          <binding name="securingWSHttpBinding"  >
            <security mode ="Message">
              <transport clientCredentialType="Windows" />
              <message establishSecurityContext="true" />
            </security>
          </binding>
      </wsHttpBinding>

Thanks,
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now