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 7743847
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T09:38:23+00:00 2026-06-01T09:38:23+00:00

I have created an interface with ServiceContract on interface and OperationContract on all its

  • 0

I have created an interface with ServiceContract on interface and OperationContract on all its methods. I implemented this interface in a class and then in my asp.net website i added wcf service which created an svc file (because i wanted to host it in IIS with my website). Now the service is up and accessible at http://localhost:8732/webui/webservice/camservice.svc. Now i want to enable username and password authentication for this service. I suppose svc uses basicHttpBinding because i didn’t have to make any configurations in my web.config to make it run. Now how can i enable username/password authentication on this service? There are lot of articles on internet but, i believe, wcf security is such a giant that i can’t get a focused explanation on username/password authentication with the method i have used. I am using .net 4.0 with vs 2010

Edit: Ok, i have narrowed the problem down a little bit. I believe, message level security is what i need like

<security mode="Message">
                <message clientCredentialType="Certificate" />
            </security>

I could have gone for SSL but for that, i will have to go to db for each service call and authenticate the user. what i prefer is that a client with valid certificate is served by the service. I got a lot of information from this article. What it does not explain is how to setup x509 certificate on client and server and how can i control that only my clients can acquire valid certificate.

  • 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-06-01T09:38:24+00:00Added an answer on June 1, 2026 at 9:38 am

    If you want to achieve username password validation without SSL you can use something called a ClearUsernameBinding that allows you to transport username/password over http.

    NOTE: Do use this only when your service is behind a company firewall that gives enough security to your server that hosts your service.

    In terms of using 2 way SSL you need to install the service certificate .pfx on your server which has been issued by a trusted authority or self signed certificate under Personal store folder of Local Machine account.

    Then for client certificates you need to request the client to send a .cer file and install it on your servers under Trusted People store folder on the local machine account.

    On the client machine you need to install the client certificate .pfx under Personal store folder of Current User.

    NOTE: When using self signed certificate on your server then your client which performs a call to your webservice via code needs to have the below code which is to bypass the security exception that comes up for self signed certificates:

        System.Net.ServicePointManager.ServerCertificateValidationCallback = (sender, cert, chain, error) =>
                                                                                 {
                                                                                     return true;
                                                                                 };
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

alt text http://home.elka.pw.edu.pl/~pkolodzi/Capture.PNG I have created the IAdder interface with two methods: PassA and
I have declared two service contracts as follows: [ServiceContract] public interface IContract1 { [OperationContract]
I have something like this: MathServiceLibrary (WCF Service Library) [ServiceContract] public interface IMathService {
I have created tab style interface using css and javascript with only two tabs
I have created 4 buttons via Interface Builder. I have an array which has
I have created a schema as an agreed upon interface between our company and
I have created a UISegmentedControl with two segments using the interface builder (from storyboard),
Suppose I have created a UIView , MyView , in Interface Builder, and I
I have a Tab Bar Controller created in Interface Builder Within the Tab Bar
I have a ViewController and UIWebView created in Interface Builder in it. I fill

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.