Hi Experts:
Is there an ASP.NET API to find a file on CLIENT machine? I'm using asp.net
2.0.
Thanks in Advance!
Polaris
Peter Bromberg [C# MVP] - 02 Jul 2007 20:48 GMT
No. ASP.NET has no knowledge whatsoever about the client; it runs only on the
webserver. In addition, browser security restrictions disallow specific
access to the client filesystem for -- I hope -- obvious reasons. What
exactly is it that you need to do?
-- Peter
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
BlogMetaFinder(BETA): http://www.blogmetafinder.com
> Hi Experts:
>
[quoted text clipped - 3 lines]
> Thanks in Advance!
> Polaris
Eliyahu Goldin - 02 Jul 2007 21:20 GMT
There is a technology to achieve this. It is WSH - Windows Scripting Host.
It has nothing to do with asp.net. Your client will have to customize his
security setting to allow it.

Signature
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
> Hi Experts:
>
[quoted text clipped - 3 lines]
> Thanks in Advance!
> Polaris
John Timney (MVP) - 02 Jul 2007 22:10 GMT
To do that you would have to be running something client side - like an
activeX with appropriate permissions to access the file ssytem from within a
browser, and asp.net is a server side technology with no access to the
client other than to accept a request from it to process something,a nd send
a response. The reponse would need to contain an activeX (or something
else) for the browser to activate it.
Regards
John Timney (MVP)
http://www.johntimney.com
http://www.johntimney.com/blog
> Hi Experts:
>
[quoted text clipped - 3 lines]
> Thanks in Advance!
> Polaris
Mark Rae - 02 Jul 2007 22:27 GMT
> Is there an ASP.NET API to find a file on CLIENT machine? I'm using
> asp.net 2.0.
To add to what Peter, John and Eliyahu have said, an ActiveX solution is
technically feasible but will need very careful planning, and will only ever
be of any use in a controlled internal environment such as a corporate
intranet where you can manage both the client browser and the local security
settings.
If this is for a public website, you have next to no chance! For one thing,
an ActiveX solution will only be viable for Internet Explorer (you *could*
think about a Java applet instead), but can you imagine how you would feel
if you visited a website which popped up a message saying "Just a second
while we download and install a utility which will scan your hard
drives."... :-)

Signature
Mark Rae
ASP.NET MVP
http://www.markrae.net
bruce barker - 03 Jul 2007 00:07 GMT
java applets run in a sandbox, and will not allow this either. .net
components also run in sandbox and prevent this, but with the cas
utility the user could allow it.
-- bruce (sqlwork.com)
>> Is there an ASP.NET API to find a file on CLIENT machine? I'm using
>> asp.net 2.0.
[quoted text clipped - 11 lines]
> "Just a second while we download and install a utility which will scan
> your hard drives."... :-)
Mark Rae - 03 Jul 2007 01:09 GMT
> java applets run in a sandbox, and will not allow this either
OK - I didn't know that...
Thanks.

Signature
Mark Rae
ASP.NET MVP
http://www.markrae.net