If you're hosting the WCF service in IIS or a Windows Service, it will be running under a different profile. Unless the environment variable is set as a system variable, it will be specific to your user profile, and will not be available to the WCF code.
in my application taht runs in Windows Embedded Compact 7 OS (with Compact Framework 3.5) I have a problem reading a xml file with DataSet.ReadXml.
I have made a little test to reproduce the problem:
PrivateSub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim dati As DataSet = New DataSet("Programmazione")
Dim fname AsStringDim j AsInt32Try
fname = "\Program Files\SmartDeviceProject1\default_19.prg"'this works'fname = "\Program Files\SmartDeviceProject1\default_20.prg" 'this doesn't workDim fs AsNew FileStream(fname, FileMode.Open, FileAccess.Read)
Dim xr As XmlReader = System.Xml.XmlReader.Create(fs)
j = dati.ReadXml(xr) 'j = 3 = XmlReadMode.InferSchema
Catch ex As Exception
I have two test file: default_19.prg and default_20.prg.
The first is a little shorter than the second and it is read without problem, the second fails without raising an exception (at least an exception that I can catch).
I don't know if it is a file dimension problem or something else.
The two files are quite long and I apologize for this but I post them here otherwise who could help me?