Click here to Skip to main content
15,881,882 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a page that creates a file to a local directory, and I need to past that file to Folder in another domain computer

As i understand, if I use Impersonation I should make a web service or something like that on the target server.

Is there an easier way of achieving this? Just a simple way of passing credentials and paste a file on the remote server
Posted

This is an ASP.NET question ? You say you have a 'page', but you did not tag your question as ASP.NET. How do you create a file locally ? I can only assume you mean that the user downloads the file. As it's created on the server, it's the server that should then copy the file to the other server, if they are on a network, OR the other server should impliment a webservice which you can call to pass the file over.


wrote:
Is there an easier way of achieving this? Just a simple way of passing credentials and paste a file on the remote server


Web services are trivial to write, so I don't know there's an 'easier' way at all, but for there to be an alternative way, the machines need to be on the same network, and not just connected by the internet.
 
Share this answer
 
yes is ASP net.

the file is created on the server hosting the web page, using File.Create(...

i need to copy that file in the other server, yes machines are on the same network, but in a different Domain.
 
Share this answer
 
You should edit your post to add details, so that they are part of the question and not an 'answer'.

I still think that a web service could be more robust, but if they are on the same network, then if you can set up permissions to copy files between them, you should be able to just do a copy. The other advantage of a web service is that it can process the incoming file, or store it in a specific location, without your web server code having to know anything more than that it is sending the file to a web service.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900