473,320 Members | 1,988 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Restrict the access to a particular website

hi,

I had created a web application in c#. It is uploaded and going smoothly. Now the request of the client is to restrict the access of their site. They want access only in some machines(Not in world wide). The restriction cannot be done by using IP address.

I have a logic to implement this. Create a particular folder in all the client machines. Then check for this particular folders existance during run time. If the folder exists then only the client can access the site.

I had created a folder inside the WINDOWS\System32 and check for its existance. It is running smoothly in my machine. But after uploading if can't read the directory. I don't know why it happens so.

I was created the folder by using the following command

md %windir%\System32\MyFolder

I am checking the existance of the folder by using the following code

If(Directory.Exists(@"%windir%\System32\MyFolder")
{
Response.Redirect("LoginPage.aspx");
}

I don't know whether there is any need to set the access permission such as read and write

if u have any idea please share

Thanks
Grace
Jul 21 '08 #1
5 2260
Curtis Rutland
3,256 Expert 2GB
I had created a folder inside the WINDOWS\System32 and check for its existance. It is running smoothly in my machine. But after uploading if can't read the directory. I don't know why it happens so.
This is because ASP.NET doesn't interact with the client computer, only the server. When you were debugging on your local machine, you had access to that folder because your local machine was acting as the server. Once you uploaded the website, the website started looking on the webserver for that folder, which doesn't exist.

ASP.NET is server-side. You can't access the client's filesystem. This approach will not work. I suggest you look at authentication and user logins.
Jul 21 '08 #2
hi all,

can we use the dynamic ip address to identify a paticular computer on the internet .
is there a static ip address for a computer which have dynamic ip to connect to the internet
is an internet connection provider provides both static ip and dynamic ip to a computer

my need is to save the internet ip in the database and check while the user login to my website. if the ip address at the time of login and the ip address i the database are same then he can easily login. it works well with static ip addresses. but when dynamic ip is there then the ip is changing time to time. so i cannot keep it in my database

i am workig in vb.net and my aim to block the unwanted access to my website

please help as early as possible

thanks
grace
Jul 25 '08 #3
Curtis Rutland
3,256 Expert 2GB
Dynamic IP is dynamic...there's no better way of explaining it. It could change at any time, and there is nothing you can do to track it. Once my IP has changed, it's changed, and there is nothing linking me to the old one again.
Jul 25 '08 #4
kenobewan
4,871 Expert 4TB
Please stop mulitiposting, it is against site rules - see Posting Guidelines. I've also noted your one in IIS.
Jul 25 '08 #5
TRScheel
638 Expert 512MB
Your best bet is to set up a login page tied to a database. Another solution, no where near on par with the login page solution, is to have a common password that is required to access the page(s).
Jul 25 '08 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Gerry | last post by:
I have a developer here with a website running with only "Windows Integrated Authentication" set on a Windows 2000 member server that uses GetObject to get a user's group membership in the domain....
3
by: Paul | last post by:
Hi all, at present I I've built a website which can be updated by admin and users. My problem, I've combined "log in" and "access levels" to restrict access to certain pages, using the built...
1
by: sonik son | last post by:
Have a family website which requires username and password to access. I have the code to set a cookie ("user") upon successfull login. However, I cannot figure out how to allow access to the site...
7
by: tweak | last post by:
Can someone give me a short example as how to best use this keyword in your code? This is my understanding: by definition restrict sounds like it is suppose to restrict access to memory...
2
by: pemo | last post by:
In Harbison and Steele's book, they say that using 'restrict' allows functions like memcpy() to be prototyped like this: void * memcpy(void * restrict s1, const void * restrict s2, size_t n); ...
12
by: Me | last post by:
I'm trying to wrap my head around the wording but from what I think the standard says: 1. it's impossible to swap a restrict pointer with another pointer, i.e. int a = 1, b = 2; int *...
0
by: kanu | last post by:
Hi, We have moved our domain controllers from win2K to win3K. The script below doesnt work at all now because by default Win3K disables "Network access: Let Everyone permissions apply to anonymous...
0
by: rajbala | last post by:
Hi all, I want to restrict tomcatserver files to particularly one client that who enters username and password correctly anywhere in web(specifically in another system).But nobody...
1
by: Mubs | last post by:
Hi PPL, On my website i have setup user log in. once they log in i want to restrict certain users from certain pages.. and on some pages i want the user to enter their username and password...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.