Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6711471
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T08:08:38+00:00 2026-05-26T08:08:38+00:00

I am trying to setup a WCF Data Service to use my custom UserNamePasswordValidator

  • 0

I am trying to setup a WCF Data Service to use my custom UserNamePasswordValidator it is working great for standard WCF Services; the problem I have is this: In my web.config I cannot specify the WCF Data Service endpoint because it does not implement a contract I can use. See below

  <service behaviorConfiguration="GetHttpsIncludeFaults" name="WCFDataService">
    <endpoint
        address=""
        binding="basicHttpBinding"
        bindingConfiguration="BasicHTTP"
        Contract="WHAT-GOES-HERE?"/>
    <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
  </service>

  <behavior name="GetHttpsIncludeFaults">
    <dataContractSerializer maxItemsInObjectGraph="204800" />
    <serviceCredentials>
      <userNameAuthentication userNamePasswordValidationMode="Custom" customUserNamePasswordValidatorType="pjt.UPValidate, pjt"/>
    </serviceCredentials>
    <serviceMetadata httpsGetEnabled="true" />
    <serviceDebug includeExceptionDetailInFaults="true" />
  </behavior>

For my normal WCF services, I simply sepcify the interface that the class implements; with Data Services I have no such interface.

If there is a better way to customize the ServiceBehavior I’m open to that, this is just the only way I know how to do it.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T08:08:38+00:00Added an answer on May 26, 2026 at 8:08 am

    After a bit of poking around, I was able to get a new error by using this contract: System.Data.Services.IRequestHandler.

    After getting past the error that the contract was not implemented by my service, it seems as if WCF Data Services only work with webHttpBinding — which does not support TransportWithmessageCredential security.

    So, this doesn’t exactly answer my question; however, this appears to be the only way to secure a WCF Data Service via a custom username / password validator: http://blogs.msdn.com/b/astoriateam/archive/2010/07/21/odata-and-authentication-part-6-custom-basic-authentication.aspx

    It involves using BASIC authentication, and writing your own HttpModule to have IIS delegate the authentication to your own custom username password validator. Obviously, this should only be used over HTTPS.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a .Net 4.0 WCF service that I'm trying to setup ninject for.
I'm trying to use WCF to consume a web service provided by a third-party's
I'm trying to test validation that I've setup for my wcf service. What's the
here's the setup for the project. I have a WCF Service that is hosted
from what i've seen so far WCF Data Services are pretty easy to setup
In my WCF service, when trying transfer large data I constantly get an error:
I'm trying to use Ninject with a WCF service of mine. I'm using Ninject
I'm trying to add ad-hoc discovery to a simple WCF service-client setup (currently implemented
I'm trying to convert this WSE3.0 code to WCF: // we use Microsoft WSE
I am quite new to WCF and I am trying to setup services and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.