FaultException WebService c# when creating file on server

MixMaker

New Member
I have a problem with my webservice (no WCF).So, I have a webservice stored on my server (windows 2008 R2).I have a function to create an XML file with XmlTextWritter.When I launch the webservice into my server's browser, and I test my function, all run normally.But when I called this function with my client app (WPF on my computer, not on server), I have this error :\[code\]Server can't process this request. ---> Unable to find 'C:\inetpub\wwwroot\WebServicePROJETDEV\App_Data\Worlds\test.xml'.\[/code\]The XmlTextWritter must created the file but it sayed it not found it. This error occured just when I'm using the client side.This is my function GenerateXML where the variable "path" is the name of world (String parameter of function) :\[code\]try { XmlTextWriter rw = new XmlTextWriter("C:\\inetpub\\wwwroot\\WebServicePROJETDEV\\App_Data\\Worlds\\" + path + ".xml", Encoding.UTF8); rw.Formatting = Formatting.Indented; rw.WriteStartDocument(); rw.WriteStartElement("world"); rw.WriteStartElement("name"); rw.WriteString(nameOfWorld); rw.WriteEndElement(); rw.WriteEndDocument(); rw.Flush(); rw.Close(); return true;}catch(Exception e){ Console.WriteLine(e.StackTrace); return false;}\[/code\]Someone know why server side, all run, and client side, the script can't create/found the file ?
 
Back
Top