Solved

How to use ServiceSecurityContext.Current in WCF

Posted on 2009-05-12
2
3,352 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
2 Comments
 
LVL 22

Expert Comment

by:cookre
Comment Utility
0
 
LVL 1

Accepted Solution

by:
elkhawajah earned 0 total points
Comment Utility
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Extention Methods in C# 3.0 by Ivo Stoykov C# 3.0 offers extension methods. They allow extending existing classes without changing the class's source code or relying on inheritance. These are static methods invoked as instance method. This…
This article introduced a TextBox that supports transparent background.   Introduction TextBox is the most widely used control component in GUI design. Most GUI controls do not support transparent background and more or less do not have the…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

771 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now