I've created a fairly simply web service that has 1 method: UploadFile. Obviously, it works on my machine ©. However, once I upload it, the method return status 202 (Accepted). However, the file never arrives there and there are no errors that I can see. I've added logging to pretty much every second like of code, but it does not seem like the method actually executes.
How do I debug something like that?
Here is my server-side code for reference:
[ServiceContract]
interface IUploaderService
{
[OperationContract(IsOneWay = true)]
[WebInvoke(Method = "POST", UriTemplate = "/UploadFile?fileName={fileName}")]
void UploadFile(string fileName, Stream fileContents);
}
[ServiceBehavior(InstanceContextMode = InstanceContextMode.PerCall)]
[AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
public class UploaderService : IUploaderService //ServiceHostFactory
{
public void UploadFile(string fileName, Stream fileContents)
{
Log.Add("In UploadFile");
}
}