Waqar Janjua
Waqar Janjua

Reputation: 6123

Is it possible to access client harddisk using asp.net or any client side technology

Actually I want to store a file on a client PC.

I know that asp.net does not allow to access client harddisk but by using any trick or any idea?

For security reasons I want to save a file on client's computer containing user information. I does not want to save a cookie in a user's browser.

Scenario. I want to store something on client's PC permanently by using which I identify the user. Everytime when user login to mysite I will check that file on client's PC. If file is present then user will login sucessfully if file is deleted by the user or by any reason file is deleted or user comes from another PC then again save a file on client's PC. I does not want to save something on browser bcz user may delete the cookies and other histroy.

Don't mark my question as negative, I don't have any harmful intention.

Upvotes: 1

Views: 661

Answers (5)

celem
celem

Reputation: 404

Short answer...no

There are a number of ways to accomplish saving a file to the users machine. They will all require some form of permission from the user. (i.e. a java applet will need trust)

The advantage here is that if you self-sign your applets and use the same sig for all of them then you can obtain trust through another applet and it is then extended to your file writing applet.(if they check the box too) However the user will always have to click at least once that they trust you.

Note that even if trust is extended like this they may well see another trust box asking them to trust microsoft to do file operations(in the case of win systems)...they will always know whats going on

EDIT: Just had a thought, depending on what you want to save you may be able to squeeze it into a cookie or a batch of cookies. A lot of users have these always on and will never know....sneaky

Upvotes: 1

sll
sll

Reputation: 62524

This is break a fundamental security principle of Web Applications

Upvotes: 0

Schroedingers Cat
Schroedingers Cat

Reputation: 3129

"I want to store a file on a client PC without telling to the client." - that is where the real problem lies. You should not do this. And the browser is designed to stop you doing this, quite rightly.

You need to go back and look at what you are wanting to do, and do it differently.

Upvotes: 0

Bogdacutu
Bogdacutu

Reputation: 771

No, it's highly unsafe to have access to the client PC without any permission.

Upvotes: 0

Quentin
Quentin

Reputation: 943630

No, this isn't possible.

Any technology that lets you store files will throw up a stack of security warnings.

Upvotes: 2

Related Questions