Link to home
Start Free TrialLog in
Avatar of PoeticAudio
PoeticAudio

asked on

Web Service will not delete file

I am creating an ASP.NET Web Service and I am trying to do something very basic... delete a file. The code is simple:

//test code
string testFilePath = @"C:\Test\Test.zip";

if(File.Exists(testFilePath))    //it sees the file just fine
    File.Delete(testFilePath);  // then throws an exception... why?

I get an error that states: "Request format is unrecognized."


The same exact code will work perfect in a windows app, but not in this web service... why?

Regards,
- Steven
ASKER CERTIFIED SOLUTION
Avatar of Bob Learned
Bob Learned
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial