473,786 Members | 2,380 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

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
Nov 17 '05 #1
2 3150
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="tr ue" userName="userT hatCanWrite" password="passw ord"
/>

to your web.config.
--Peter
"Raul Cortes" <no****@nowhere .com> wrote in message
news:Ox******** ******@tk2msftn gp13.phx.gbl...
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

Nov 17 '05 #2
Thank you Peter, that is exactly what I was looking for!!!!
Raul

"Peter Bromberg [C# MVP]" <pb*******@yaho o.com> wrote in message
news:OJ******** ******@tk2msftn gp13.phx.gbl...
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="tr ue" userName="userT hatCanWrite"
password="passw ord" />

to your web.config.
--Peter
"Raul Cortes" <no****@nowhere .com> wrote in message
news:Ox******** ******@tk2msftn gp13.phx.gbl...
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


Nov 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
2553
by: Russ | last post by:
Hello. My new dev machine is running XP Pro. In the past all equipment has only used Windows 2000. I have had a lot of problems getting my projects up and running on the new machine. The current one is a permission error. The project is a VC++ Web Service. It works fine when the service is hosted on the old W2K dev machine, but on the new XP machine I get a permission error when the service tries to open a text file on the Windows...
1
3457
by: Mohan | last post by:
Hi, I have developed a .NET Windows application. I able to run(Execute) it from the local drive of my PC. If I try to execute it from the SourceControl(Clear case) or from Shared drives, then it is not starting the application, but given the below error. Request for the permission of type System.Security.Permission.RegistryPermission, mscorlib, Version=1.0.5000.0, Culture=neutral,PublicKeyToken=b77a5c561934e089 failed
9
2009
by: TPS | last post by:
I have a virtual directory where all posted files are stored. The ASP app does not have rights to the share on the other server where the vir dir resides. What is the best way to give the asp app the rights to post files to the vir dir. Thanks
2
3688
by: Taishi | last post by:
New user of SQL Everything is on the same machine My error is close to the bottom After reading it today, I can see there is a problem with 2 dbases 'PUBS' and 'Master' There are also some comments from the group: ---microsoft.public.sqlserver.odbc-- subject: Permission Denied -- Thanks for help guys I was able to find a trial version of the Enterprise Manager.
4
2543
by: Santaji | last post by:
Hi, We have an ASP.NET application which needs to write some files on the disk. For these we need to give ASP.NET user the Write permission for that particular folder. This is possible from Windows explorer. We don't want to given permission from Windows Explorer. Is there any way of giving Write permission for folder through code ? We want to assign the Write permission for the folder at the installation time. Is it possible ? Please let...
0
1014
by: Sachin | last post by:
Hi All, I have following scenario. 1) Server Name: Server1 Web Site: WebUI (An ASP.NET Application) Impersonation User: WebUIUser (Specified in Web.Config, under identity section) Authentication: Windows
1
2195
by: gilad.kapel | last post by:
Hi Some background: working with VS 2005 + Win2003 + IIS6. I have a webservice that creates (if the directory doesn't exist the webservice creates it) a directory "Temp" under the webservice local directory (usualy c:\inetpub\wwwroot\<service name>\Temp) I'm able to create the directory but when I try to write to it I get premission error. for solving this I allow "Full Control" to IIS_WPG
5
3039
by: =?Utf-8?B?UGF0Y2g2MQ==?= | last post by:
I am new to .Net programming, but I am experienced with VB6. I am using VB 2008 Express to write a small program to copy a directory structure and files from a CD to a folder on C: drive. I have a form with 2 buttons; one to do the copying and one to cancel. Here is my code for the copying button: Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
0
9647
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9492
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10360
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10163
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10108
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
6744
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5397
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4064
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2894
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.