I'm creating a window service which will monitor the folder and upload files to server if any new files created. Here I'll have only web URL with virtual directory , created via IIS. Is it possible to upload a file to server only with URL.
I've tried using webclient to upload, its throwing error
The remote server returned an error: (405) Method Not Allowed.
This was my sample code tried:
using (WebClient client = new WebClient())
{
client.UploadFile(targetURL, phscialpath);
}
Gave required permissions, to both IIS and physical path folder.