471,066 Members | 1,183 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,066 software developers and data experts.

Restrict by IP

Working in ASP/VBSCRIPT, I have a snippet that denies access to a page if
the user's IP does not belong to the local network:

<%
Dim RemoteAddr
RemoteAddr = Request.ServerVariables("REMOTE_ADDR")
If instr(RemoteAddr, "192.168.0") Then
Else Response.Redirect ("/Login/entry_denied.asp")
End If
%>

I need to apply this to a ASPX page. Can you help me with the syntax?

Jun 7 '07 #1
2 1065

"Billy Bob" <no*@home.rightnowwrote in message
news:Ot**************@TK2MSFTNGP03.phx.gbl...
Working in ASP/VBSCRIPT, I have a snippet that denies access to a page if
the user's IP does not belong to the local network:

<%
Dim RemoteAddr
RemoteAddr = Request.ServerVariables("REMOTE_ADDR")
If instr(RemoteAddr, "192.168.0") Then
Else Response.Redirect ("/Login/entry_denied.asp")
End If
%>

I need to apply this to a ASPX page. Can you help me with the syntax?

You have posted this in a C++ newsgroup. Try
microsoft.public.dotnet.framework.aspnet instead. I'm sure you will get a
better response.

Brian

Jun 7 '07 #2
Whoops, my mistake. I thought I was there.... Apologies to all I've offended.
Jun 7 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

28 posts views Thread by gc | last post: by
4 posts views Thread by Vijay Kumar R Zanvar | last post: by
7 posts views Thread by tweak | last post: by
1 post views Thread by ccdrbrg | last post: by
2 posts views Thread by pemo | last post: by
12 posts views Thread by Me | last post: by
21 posts views Thread by Niu Xiao | last post: by
2 posts views Thread by venkat | last post: by
reply views Thread by copx | last post: by
23 posts views Thread by raashid bhatt | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.