Restrict aspx page access only through application

  • Thread starter Luis Esteban Valencia
  • 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
 
R

Riki

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.
 
M

Matt Berther

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,598
Members
45,152
Latest member
LorettaGur
Top