Reputation: 3979
I hosted a WCF web Service on my server Windows 2008 R2. Everything works perfectly on my localhost project Visual Studio 2012.
However, once deployed on my server. My application throws an exception when my WCF trying to save an XML file in the C:\.
I immediately think it came from a permissions problem. I've tried adding rights in writings on the user IUSR but it changed nothing. I even tried to apply all the rights to the user "Everyone". But without success! An idea ? thanks
Here's screenshots of on the configuration of my project:
Code that throws the exception:
XmlTextWriter myXmlTextWriter = new XmlTextWriter("c:/world.xml", null);
Upvotes: 0
Views: 2051
Reputation: 29668
Why are you saving to the root drive folder? What happens when you try and save to for example C:\Stuff
?
If this isn't running as something like Network Service
I would hazard a guess it's because of something like UAC which will prevent you from writing to certain places considered restricted.
Upvotes: 1