Problem moving a file

  • Thread starter Thread starter Ale
  • Start date Start date
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
 
Hi,
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top