Newbie question: Local file access from an ASP app.
-
Hey folks, I need to build an application that does some local file manipulation (editing, copying, etc.) on the behalf of the user. How restrictive is ASP in terms of client side machine access? I could just write a client-server app instead, but seems like that would take bit more effort. Thx NIK
-
Hey folks, I need to build an application that does some local file manipulation (editing, copying, etc.) on the behalf of the user. How restrictive is ASP in terms of client side machine access? I could just write a client-server app instead, but seems like that would take bit more effort. Thx NIK
nicknotyet wrote:
How restrictive is ASP in terms of client side machine access?
All you need is to give the asp user account permission to the folder where the files are located. It is that simple. [edit] my bad. I did not read OP post completely. There is no way you can access the client machine from asp.net :-O [/edit]
ɟnsnʎ ʎlʇuǝƃıllǝʇuı uoıʇsǝnb ɐ ʞsɐ oʇ ʍoɥ [^]
modified on Thursday, April 23, 2009 9:32 AM
-
nicknotyet wrote:
How restrictive is ASP in terms of client side machine access?
All you need is to give the asp user account permission to the folder where the files are located. It is that simple. [edit] my bad. I did not read OP post completely. There is no way you can access the client machine from asp.net :-O [/edit]
ɟnsnʎ ʎlʇuǝƃıllǝʇuı uoıʇsǝnb ɐ ʞsɐ oʇ ʍoɥ [^]
modified on Thursday, April 23, 2009 9:32 AM
Really!!! So I can just use something like string path = "C:\\MyFiles\SomeFile.Txt"; File.OpenText(path); ... in code behind?
-
Really!!! So I can just use something like string path = "C:\\MyFiles\SomeFile.Txt"; File.OpenText(path); ... in code behind?
No. Actually, ASP/ASP.NET will not have any access to the client's computer drives at all. I think only an ActiveX control might be able to access client files. Doing what you wrote would open SomeFile.Txt in the C:\\MyFiles directory of the server. Scott
-
No. Actually, ASP/ASP.NET will not have any access to the client's computer drives at all. I think only an ActiveX control might be able to access client files. Doing what you wrote would open SomeFile.Txt in the C:\\MyFiles directory of the server. Scott
One Yes and One No - I am well confused.
-
One Yes and One No - I am well confused.
nicknotyet wrote:
One Yes and One No - I am well confused.
my bad. I have to read your post again. scottgp is right, you can not access client machine from asp.net. I read your post as you want to access server files. The only way you can access client machines is through explicit permission of the use and other technologies such as activex. sorry of the confusion, I take my earlier post back
ɟnsnʎ ʎlʇuǝƃıllǝʇuı uoıʇsǝnb ɐ ʞsɐ oʇ ʍoɥ [^]
-
nicknotyet wrote:
One Yes and One No - I am well confused.
my bad. I have to read your post again. scottgp is right, you can not access client machine from asp.net. I read your post as you want to access server files. The only way you can access client machines is through explicit permission of the use and other technologies such as activex. sorry of the confusion, I take my earlier post back
ɟnsnʎ ʎlʇuǝƃıllǝʇuı uoıʇsǝnb ɐ ʞsɐ oʇ ʍoɥ [^]
No worries, at least I can make an informed decision. I am kind of inclined to just do this old-school and roll my own pseudo database and write the app in straight C/++. It will be screaming fast and have no platform dependencies. The time I would have spent ramping up on SQL, .NET, DAO, IIS, etc, can be spent on implementation. Thanks again for the input. NIK