Reading a mapped file from Windows service

  • Thread starter Thread starter Robert Scheer
  • Start date Start date
R

Robert Scheer

Hi.

I have a web application that uses an additional config file. That
file is read through the use of the WebConfigurationFileMap class.
Now, we have to write a windows service that needs to read this same
mapped file but I am in doubt if it is possible through the default
configuration classes. Is there anything specific in this process?

Regards,
Robert
 
Well, if you wanted to map a drive in a Windows Service application, you
would use the Net Use command of the O/S, which works on a NT based O/S
other than Vista,  and I suspect Win 2k8 server.  Because at least onVista,
the Net Use command has been removed.

Hi Mr. Arnold,

I don't need to map a drive. It is just a different config file other
than the web.config that I am mapping. But in order to simplify the
question, can a windows service read data from the web.config file
using the native objects from the Configuration namespace?

Regards,
Robert
 
Well, if you wanted to map a drive in a Windows Service application, you
would use the Net Use command of the O/S, which works on a NT based O/S
other than Vista, and I suspect Win 2k8 server. Because at least on Vista,
the Net Use command has been removed.

Hi Mr. Arnold,

I don't need to map a drive. It is just a different config file other
than the web.config that I am mapping. But in order to simplify the
question, can a windows service read data from the web.config file
using the native objects from the Configuration namespace?
 
Back
Top