In my IIS application I open a file located in the wwwroot directory that way:
C:\Program Files (x86)\IIS Express\ConfigFile.json
C:\Program Files (x86)\IIS Express
Ok, the solution that works in a IIS WCF Service, hosted by a ServiceHost class is:
It gives the full absolute path that is valid in my IIS Express environment and in the deployed IIS environment.
If I remove the '/' it throws the error:
The relative virtual path 'X' is not allowed here.
serviceHostingEnvironment aspNetCompatibilityEnabled="true" does not change anything.
Thanks to VDWWD that helped to find the solution.