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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T15:25:42+00:00 2026-05-12T15:25:42+00:00

One of our application will be run in an iframe, inside salesforce and I’m

  • 0

One of our application will be run in an iframe, inside salesforce and I’m having troubles with accessing the referer. They’d like us to do some referer checks, to make sure the request is coming from salesforce and we’ve been given the IP addresses to check against.

My problem is that anytime I try to access the referer through either of the following two methods:

HttpContext.Current.Request.ServerVariables["HTTP_REFERER"]
HttpContext.Current.Request.UrlReferrer

it returns me null.

Any ideas how could I get hold of the referer?

PS: I’m aware that you can spoof the referer, but it’s part of the requirement.

  • 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-12T15:25:42+00:00Added an answer on May 12, 2026 at 3:25 pm

    If I understand the question correctly you have client sites that refer to your site by embedding IFrames in their webpages the point to your site. You wish to “ensure” that the requests are coming from host page which itself is part of a designated set of sites. The set of designated sites is described by a set of IP addresses. Does that cover it?

    Tricky. First off lets assume you’ve got a referer. You will need to aquire the host name from it (easy enough using the Uri type). Then you need to resolve the IP address for the host name using DNS (again not too difficult with .NET framework).

    Of course you need to get a referer and that is the trickiest bit. Browsers do not always place a referer header in the request. This is especially true when the referee address is not in the same domain as the referer, which is the case here. IOW, this is a showstopper.

    A better approach to solving this problem (and is not prone to spoofing) is to use some hash based authentication. Doesn’t have to be too sophisticated (if the original requirements felt the referer testing was sufficient anyway).

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

Sidebar

Related Questions

For one reason or another, we need to run our JSF2 application on a
Currently, we run into one problem with timeout issue. Our application is based on
In one of our application im getting an exception that i can not seem
For one of our application we are thinking of putting scanned images onto MSMQ
On one of our Java application screens, we want to display data loaded from
Our application needs a simple scheduling mechanism - we can schedule only one visit
One of the memory leaks I've discovered in our application is the java.awt.Window.allWindows private
I am investigating GDI leaks issue in one of our smart-client application. I am
We are building a set of features for our application. One of which is
I am working on wireframe for new feature in our application. One of the

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.