I'm having a couple of websites hosted different places, which I want to backup regularly.
However I only need the user-uploaded files, so I've made a simple Web service on each site, with the same definition:
public class BackupService : System.Web.Services.WebService
{
[WebMethod]
public string[] GetFileList()
{
// Get list from DB
}
}
The namespace is obviously different, however I think it should be possible to use a single stub for this, and just call that stub with different URLs.
The problem is, I can't seem to find any examples of how to do this - so either it's not possible (which I doubt until proven wrong) or I just suck at searching.
Can anyone come up with an idea of how to do this ?
The reason I want to do it, is I regularly add new websites to my "backup list", and I don't want to recompile my backup software each time. Currently I don't backup the files, I just get the databases, and these I've just defined in an XML document, so each new website is just an entry in the XML.
My hope is that it's possible to do the same with the webservices, so I can just add the ASMX url in my XML file, and thus avoid recompiling.