M
moondaddy
using asp.net 2.0, I have an interesting requirement. I have an aspx page
which I need to prevent someone from opening by calling it's URL. Here's
the scenario:
I have an aspx page which is used to host html help documentation that was
generated from a help authoring tool. The information in this documentation
is sensitive and the only people allowed to see it are the users of the
application (a winforms 1.1 app). I replaced the main page of the help
documentation (which was a frames page) with this aspx page so I could
secure it.
Currently to secure this aspx frame page, the winforms app calls a web
service which generates a GUID and caches it on the server for 10 seconds
and returns the GUID to the winform client. The winform client calls the
aspx frame page via its URL and passes in the GUID as a parameter. On the
server side, if it can find the GUID, the page will open as expected. If it
doesn't find the GUID, it redirects to an error page. This way you can
never open the page by just entering its URL into a browser.
This works good for allowing only the winforms app to open the help
documentation. However, I have 2 problems.
1) the help documentation has tons of JavaScript that executes when the
main frame page is called up and passing in a GUID messes things up as it
expects No parameters, or special parameters (and not a GUID).
2) for some reason, this page pulls up incredibly slow from the remote
server which I have not figured out yet. It doesn't load with a lot of
overhead( pages, images, etc.). It loads fast on my local machine. If I
post the help documentation using a html main page and not the aspx page and
simply call it up via its URL (as normal) it loads fast. Therefore, I think
the problem has something to do with my code and or the JavaScript which
doesn't like the GUID.
My code is very minimal and using the same code in other scenarios runs
lightning fast.
so I was going to try: calling a blank page and pass in my GUID parameter.
if the server finds the GUID in cache, then do a redirect to the aspx frame
page which contains the help documentation. If I use this method, the page
is now left unsecured as you could now call it from a URL. is there a way
to force a page to only be called from a redirect?
Can anyone recommend a better way to secure this aspx frame page?
Thanks.
which I need to prevent someone from opening by calling it's URL. Here's
the scenario:
I have an aspx page which is used to host html help documentation that was
generated from a help authoring tool. The information in this documentation
is sensitive and the only people allowed to see it are the users of the
application (a winforms 1.1 app). I replaced the main page of the help
documentation (which was a frames page) with this aspx page so I could
secure it.
Currently to secure this aspx frame page, the winforms app calls a web
service which generates a GUID and caches it on the server for 10 seconds
and returns the GUID to the winform client. The winform client calls the
aspx frame page via its URL and passes in the GUID as a parameter. On the
server side, if it can find the GUID, the page will open as expected. If it
doesn't find the GUID, it redirects to an error page. This way you can
never open the page by just entering its URL into a browser.
This works good for allowing only the winforms app to open the help
documentation. However, I have 2 problems.
1) the help documentation has tons of JavaScript that executes when the
main frame page is called up and passing in a GUID messes things up as it
expects No parameters, or special parameters (and not a GUID).
2) for some reason, this page pulls up incredibly slow from the remote
server which I have not figured out yet. It doesn't load with a lot of
overhead( pages, images, etc.). It loads fast on my local machine. If I
post the help documentation using a html main page and not the aspx page and
simply call it up via its URL (as normal) it loads fast. Therefore, I think
the problem has something to do with my code and or the JavaScript which
doesn't like the GUID.
My code is very minimal and using the same code in other scenarios runs
lightning fast.
so I was going to try: calling a blank page and pass in my GUID parameter.
if the server finds the GUID in cache, then do a redirect to the aspx frame
page which contains the help documentation. If I use this method, the page
is now left unsecured as you could now call it from a URL. is there a way
to force a page to only be called from a redirect?
Can anyone recommend a better way to secure this aspx frame page?
Thanks.