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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T19:27:20+00:00 2026-06-14T19:27:20+00:00

Background (which may be already evident from the multitude of questions I’ve asked about

  • 0

Background (which may be already evident from the multitude of questions I’ve asked about DNOA thus far): I’m working on a web application portal running in my employer’s intranet. However, since this is an intranet, all of the various relying parties (and the provider) have urls that look like this: http://servername/path; notably missing a TLD.

This code in DotNetOpenAuth (UntrustedWebRequestHandler.IsUriAllowable(Uri uri)) performs the following check:

if (!uri.Host.Contains(".")) {
    return failsUnlessWhitelisted("it does not contain a period in the host name.");
}

Obviously since all of my RP’s are simply server names with no TLDs they all fail this check.
Now, I realize I could just add them all to the web.config whitelist (which I’ve tried for a few and it works as expected), but seeing as new servers will be added dynamically I don’t see this as an ideal solution.

So my question is: Should I be trying to modify web.config dynamically? (preliminary research I’ve done on this indicates it would be a pain)
Or, is there some way to programatically set the whitelist?

  • 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-14T19:27:21+00:00Added an answer on June 14, 2026 at 7:27 pm

    There is no programmatic way to modify the host whitelist, unfortunately.

    If you are in a trusted environment, you can circumvent the UntrustedWebRequestHandler class and use a web request handler which doesn’t include the host name check (or checks that it matches whatever policy you need). There is a built-in DotNetOpenAuth.Messaging.StandardWebRequestHandler that you can use that is a straight pass-through (doesn’t add any extra network-level security checks) that is recommended if you trust all the servers you will ask DotNetOpenAuth to connect to.

    var rp = new OpenIdRelyingParty();
    rp.Channel.WebRequestHandler = new StandardWebRequestHandler();
    
    var op = new OpenIdProvider();
    op.Channel.WebRequestHandler = new StandardWebRequestHandler();
    

    If you want to apply some more cautious policy (perhaps have some centralized list of whitelisted hosts), you can implement the IDirectWebRequestHandler yourself, and you can use the existing UntrustedWebRequestHandler class for inspiration if necessary. Then of course set the above properties to your own implementation.

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

Sidebar

Related Questions

I'm writing in ASP.NET (which may be irrelevant in the end). I've already addressed
I have a background in iPhone development, which may be a cause of some
Some background, the relevance of which may fluctuate: I am currently in possesion of
I need to animate my background which have 6 images and that needed to
I have a panel with transparent background which i use to draw an image.
I want to make a DIV background (which doesn't have a background color) flash
I have a background worker which calls a function within a separate class. This
I have a background worker which can be cancelled. The normal flows interrupt itself
For a background job which I would like to run in a J2EE container,
I've been writing a background service which enforces my client's security policies on company

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.