Solved

How to use ServiceSecurityContext.Current in WCF

Posted on 2009-05-12
2
3,470 Views
Last Modified: 2012-05-06
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
Comment
Question by:elkhawajah
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 22

Expert Comment

by:cookre
ID: 24370833
0
 
LVL 1

Accepted Solution

by:
elkhawajah earned 0 total points
ID: 24373115
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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction Although it is an old technology, serial ports are still being used by many hardware manufacturers. If you develop applications in C#, Microsoft .NET framework has SerialPort class to communicate with the serial ports.  I needed to…
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

710 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question