views:

135

answers:

2

I have a web application which has Forms Authentication however one of the pages has to be accessed via a 3rd party application. This 3rd party app sends its request with querystring parameters and data is returned. This page has been setup so Forms Authentication does not apply to it.

I do not want this data available if someone finds the URL that the 3rd party app is using (and their is a high chance of this happening) and they put it in the browser.

How is this possible?

+1  A: 

Well, depending on what you are doing there a few things.

  1. If the third party application will always be calling from the same IP you could limit based on request IP, but not 100% fool-proof
  2. If you are concerned about people stealing the link DO NOT pass authentication via querystring, as then they have everything setup
  3. Potentially look at implementing basic authentication at the IIS level, if the 3rd party can pass credentials through their request

Added Detail

Per your request, here is a link on how to setup basic authentication. Basic IIS Authentication.

This should work out well in your case.

Mitchel Sellers
1. The 3rd party will not always come from the same IP2. No authentication is used in querystring however parameters are sent that returns data.3. Do you have any info to set this up?
Jon
Thanks but the 3rd party app request is silent a bit like a web service so prompting them with a popup box is not an option.
Jon
They can make it silent, they just have to pass the credentials with the request.
Mitchel Sellers
They cannot send credentials through a HTTP Post, querystring is the only option
Jon
How are they sending the post? It can be done, I do it all the time.
Mitchel Sellers
I mean the 3rd party app sends a URL Request with query string parameters and then processes what the Response is ie/data. The 3rd party app cannot post data to the URL only a get.
Jon
Ok, what is is using to do the get? What language?
Mitchel Sellers
It uses Microsoft Java
Jon
If they are using a WebRequest or similar object to make the call, they can pass NetworkCredentials with the request!
Mitchel Sellers
It uses this..http://msdn.microsoft.com/en-us/library/aa284811%28VS.60%29.aspx
Jon
A: 

I don't know if this will work for the situation you are describing, but you might try calling

MembershipUser User = Membership.GetUser();

In your Page_Load method for the page in question and checking to see if a valid user was returned. This is probably not a perfect solution though, as it would only block authenticated users.

What are the circumstances that would allow a user to find the link to this page? Also, do you have any sort of control over how the 3rd party app is sending its request?