Restrict aspx page access only through application

  • Thread starter Thread starter Luis Esteban Valencia
  • Start date Start date
L

Luis Esteban Valencia

Hi,

I am using a webbrowser control to access apsx pages in my vb.net
application. I want to block these aspx pages viewing through any other
browser. It should only be accessible through my application.

Please help.

Anish
 
Luis said:
Hi,

I am using a webbrowser control to access apsx pages in my vb.net
application. I want to block these aspx pages viewing through any
other browser. It should only be accessible through my application.

Please help.

Anish

Check the browser agent (Request.ServerVariables("http_user_agent")
in the Page_Load event, and show an error message when it's not
your browser.

You'll have to copy this code to each aspx page,
but you could also create a user control for that, and drop
it on each page.
 
Hello Riki,

Why would you not create a single base Page class that each "protected" page
would inherit from?

This beats adding a control to a page, or copying the code.
 
Back
Top