Permission to write to local disk on a Webservice...

R

Raul Cortes

I have been developing winforms for a while.

I had an app, that downlods exchange rates from an html page from a website,
creating a dataset, and then writing the xml to the local drive.
Basically, when I need an old exchange rate, I already have it on my
dataset,
and whenever there is a new exchange rate, I have to do the access to the
html page...


Now I tried to make a webservice that will return an exchange rate for a
particular date,
and if works fine, as long as i don't write the xml file.


This is quite important, because if I can do so, I will record the exchange
rate,
and then next time I need it, I just pick it up...


I have been reading about permissions, but this is some right I have to give
to the webservice itself, not to my webservice user..


Thanks in advance
 
P

Peter Bromberg [C# MVP]

Yes. Your webservice, like any ASP.NET - hosted web application, runs under
an account that typically does not have the permissions you need, for
security reasons.

You can easily modify the user account by adding:

<identity impersonate="true" userName="userThatCanWrite" password="password"
/>

to your web.config.
--Peter
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top