By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,160 Members | 1,323 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,160 IT Pros & Developers. It's quick & easy.

Problem moving a file

P: n/a
Ale
hi,
i've a problem, i've a web services where i define a function that start an
executable on the server. this Executable must get information from some
file then put the data in a DB. after that it should move the original file
in a folder called "Storico File". The problem is this:
the file aren't moved in the right folder "E:/MyApplication/Storico File"
but in "C:/Windows/System32/Inetsrv/Storico File".... Can someone help me?
The account that start my process is "NT AUTHORITY/SERVIZIO DI RETE" that in
english should be " NT AUTHORITY/NET SERVICE" and i have already given all
the permission on the original folder and on the destination folder...

Thank you in advance

Alessandro
Feb 5 '07 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Hi,

Ale wrote:
hi,
i've a problem, i've a web services where i define a function that start an
executable on the server. this Executable must get information from some
file then put the data in a DB. after that it should move the original file
in a folder called "Storico File". The problem is this:
the file aren't moved in the right folder "E:/MyApplication/Storico File"
but in "C:/Windows/System32/Inetsrv/Storico File".... Can someone help me?
The account that start my process is "NT AUTHORITY/SERVIZIO DI RETE" that in
english should be " NT AUTHORITY/NET SERVICE" and i have already given all
the permission on the original folder and on the destination folder...

Thank you in advance

Alessandro
Normally, you must use the MapPath method to get the physical path to
your web application. My bad italian lets me understand that you tried
this (according to an earlier post of yours) but that for some reason it
didn't work.

However, even in a web service, you have access to HttpContext.Current,
which contains the Request object. The Request object has the MapPath
method. Try this, and if that doesn't work, maybe you need to translate
the reason to english ;-)

Greetings,
Laurent
--
Laurent Bugnion [MVP ASP.NET]
Software engineering, Blog: http://www.galasoft-LB.ch
PhotoAlbum: http://www.galasoft-LB.ch/pictures
Support children in Calcutta: http://www.calcutta-espoir.ch
Feb 5 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.