Click here to Skip to main content
15,891,757 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a windows form application which saves the log in a text or HTML format. I want to save this log to a server located at some place via HTTP.

For eg:

I have a site say www.abc.com and I have a windows form application at my client side from which I am accessing www.abc.com using browser control of .net and
now I want to save some page or want to create some file say text.xml file on this server(www.abc.com where the site is located) and write some information to that file in some directory.How can I achieve this.


I dont know If any other method is there. But could you please help me with feasible solution. Note I do not have a network access to this system.
Posted

1 solution

One of the straight forward (and not recommended) way is to configure the read/write permission on a folder within IIS.

https://www.webwiz.co.uk/kb/asp-tutorials/server-permissions.htm

However, what I would recommend to is to build a web service (ASMX, Web API etc.) on your web server to support read and write operations.

What you would do it then just pass the binary data to this web service and it will make sure to write the file on a specific location on server.

There are enough examples of this on internet. For e.g.:

http://stackoverflow.com/questions/16175004/how-to-read-a-text-file-with-a-web-service
 
Share this answer
 
Comments
VipinKumar Maurya 6-Nov-14 4:53am    
If I want to write using 1st solution then how can this be done. I mean how do I create a folder structure on the server from the windows form application and then save file or check whether folder structure exists on the server.

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