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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T00:39:03+00:00 2026-06-15T00:39:03+00:00

I will be hosting a basic HTTP WCF service using Window Service / Service

  • 0

I will be hosting a basic HTTP WCF service using Window Service / Service Host.
I would like to limit the service to 2 specific window active directory users and these accounts will vary between PRD and DEV environments so they will be set in a config file.

I was wondering what is the best way to do this, I know normally if I was hosting the service using IIS then I could limit it in the Web.config:
http://www.rickgaribay.net/archive/2007/04/04/recipe-wcf-basichttpbinding-with-windows-authentication.aspx
However since i’m hosting using ServiceHost then I don’t believe this is an option.

From what I read it seems possible to do this using PrincipalPermission Declarative attribute at the service class level:
http://msdn.microsoft.com/en-us/library/vstudio/ms731200(v=vs.100).aspx
However I’m not too clear whether this will pass the window account of window service or the account which made the HTTP request. What I need is to pass the HTTP request account.
Also, with declartive attributes, is it possible to use a config file attribute rather than a hard coded one?

Any suggestions, if you need any more info then let me know.

  • 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-15T00:39:04+00:00Added an answer on June 15, 2026 at 12:39 am

    I found the following article suitable for what I needed, basically it involved authorisation using a behavior:
    http://allen-conway-dotnet.blogspot.co.uk/2010/01/how-to-create-aspnet-windows.html

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

Sidebar

Related Questions

Basic architecture: n physical boxes each hosting the same WCF service, sitting begind a
I am making a basic self hosting WCF service, and I was just wondering
I am developing a chat website using jsp/servlet.I will be hosting my website on
My application will be hosted in a shared hosting provider with a limit of
I'm using Linux hosting, & storing some user-uploaded files. What will be the permission
I am wanting to host my WCF Service Library in a windows service. Although
We have a new client that we will be hosting content for. The client
We will be soon hosting a large number of audio and video files that
We are going to be hosting some videos that will be streamed (not progressive
I'm looking for a method in which an application I will be hosting will

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.