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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T06:59:19+00:00 2026-05-16T06:59:19+00:00

I have several WCF services in an ASP.NET application. I want to prevent applications

  • 0

I have several WCF services in an ASP.NET application. I want to prevent applications from outside of my domain from accessing these services. Is there a configuration setting that allows me to block requests from outside of my domain?

Thank you!

  • 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-16T06:59:19+00:00Added an answer on May 16, 2026 at 6:59 am

    EDIT: This will prevent all non-authenticated users from getting to your services. If you need users in your domain who aren’t authenticated to access the services, let me know and I’ll update accordingly.

    Are you using authentication in your ASP.NET application?

    <system.web>
      ...
      <authentication mode="Forms">
        <forms protection="All" defaultUrl="login.aspx" ... />
      </authentication>
      ...
    </system.web>
    

    If so, your .svc files will be inaccessible until your users authenticate. If a non-authenticated user tries to access a .svc file, they will be redirected to your login page.

    EDIT(2):
    Since you need non-authenticated access to the services within your site, one thing you can consider is having a cookie that’s sent to the user’s machine upon the first visit to the site. The cookie could use a create date and some secret key to create a hash, and you can validate the hash on the server for each request. Requests from other sites wouldn’t pass the cookie and your service would manually check to see if that cookie is there or not — if it’s not there, then the request is denied.

    If your WCF services has ASP.NET compatibility enabled (true) and AspNetCompatibilityRequirementsMode set to Allowed or Required, you should have access to HttpContext and cookies. Here‘s more information about ASP.NET compatibility mode.

    This may not be the most appropriate solution as I don’t know your scenario and requirements. But hopefully this helps.

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

Sidebar

Related Questions

I have an asp.net web application that makes calls to several WCF services. The
I am working on an ASP.Net web application in which several WCF services are
I have several WCF services and I want to execute methods in them at
We have a 3 tier application - winform based thick client, several WCF services
I have a simple ASP.NET hosted WCF Service that has several methods that all
I have several asp.net website projects for various sites. Currently I want to add
I have several wcf services which are hosted using ServiceHost class. Now , I
I have an ASP.NET application which talks to a third-party SOAP web service. My
We are running several the same ASP.NET applications (one per customer) based on our
I have several WCF wsHttp services using Transport security over an SSL connection. Presently

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.