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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T00:56:11+00:00 2026-05-27T00:56:11+00:00

We are building a web service with WCF on .net 4.0. The service will

  • 0

We are building a web service with WCF on .net 4.0. The service will be used mainly by an ASP.net MVC frontend, but will also be used by a .net Windows App.

The basic username/password auth provided won’t do since we don’t want to save user credentials, so I was thinking about authenticating once and creating a simple token (or should I call it a cookie?) with RNGCryptoServiceProvider.GetBytes() and then using that to authenticate further requests.

I’ve looked into the various common methods to do security with WCF and they mostly seem overly complex, especially when all we want to do is essentially pass a cookie to every method call.

What would be the best strategy to pass this cookie from a WCF client to our WCF services? The preferred method would be as tightly coupled with WCF’s security architecture as possible.

So far I was leaning on either using custom HTTP headers, or custom authorization but I’m not convinced which is the more appropriate method, if any.

Keep in mind that for the ASP website, a new channel would be created for every request, while it would be reused on the Windows app.

  • 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-27T00:56:12+00:00Added an answer on May 27, 2026 at 12:56 am

    IMO there are two ways to do wcf security, Transport or Messsage.

    You could implement username type authentication in your application. So the client side would have to fill in a username and password for sending a message.
    so the binding on the client side would look like

    <security mode="TransportWithMessageCredential"> 
       <message clientCredentialType="UserName"/>
    </security>
    

    On the server side you could implement your own password validator, as shown in this example

    doing this would authenticate your message on the server, you can implement whatever logic you want for your password validation. using this your message would be encrypted using ssl and authenticated using your own logic implemented on the service side.

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

Sidebar

Related Questions

I have been building a Asp.net WCF web service with json format. Now I
Building a new ASP.net application, and planning to separate DB, 'service' tier and Web/UI
I'm building a windows service but I would like to get some web pages
I'm building a web service client using vb .net. The web service is secured
I'm building a restful web-service based on Spring. I'm using Spring Security. It will
I have a spring roo web service that I am currently building out but
I'm building a WCF web service which returns a composite object that looks similar
I'm building a WCF web service that requires interop with non-WCF clients (in fact,
I am building a big ASP.NET MVC3 web site. I am going to hit
I'm about to start building WCF web service, and i would like to structure

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.