473,516 Members | 3,465 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Writing a file on a shared host

I am a bit of a newbie to asp.net, and I have purchased a cheap shared host
account to try to learn about it.

I've tried a few things quite successfully, but when I try to write an XML
file out (XmlTextWriter) it fails due to an unauthorised access. I think I
am probably trying to write to c:\

How do I write data to my home page area on the host disk?
Nov 18 '05 #1
2 1252
WJ
You would create a virtual folder inside your website and allows the account
that runs your web site "write" privilege. Normally, it is ASPNET (a non-ad
Windows account)

John

"anon" <no***@nowhere.spam> wrote in message
news:41**********@alt.athenanews.com...
I am a bit of a newbie to asp.net, and I have purchased a cheap shared host
account to try to learn about it.

I've tried a few things quite successfully, but when I try to write an XML
file out (XmlTextWriter) it fails due to an unauthorised access. I think I
am probably trying to write to c:\

How do I write data to my home page area on the host disk?

Nov 18 '05 #2

You need to create a folder within your site and ask the host to grant write
permission for whatever account asp.net is running under. It is not always
the 'ASPNET' account. Some hosts create an account for each site.
If you don't want anyone else to be able to view/download the files in that
folder, you will also need to ask them to remove those permissions.
Otherwise, if someone typed the path/name of your file in their browser
address bar, they would view or be prompted to download the file depending
on what type of file it is.
I have run into this several times and usually it is not a problem to have
the permissions set even on a cheap host.

HTH
--

Alphonse Giambrone
Email: a-giam at customdatasolutions dot us
"anon" <no***@nowhere.spam> wrote in message
news:41**********@alt.athenanews.com...
I am a bit of a newbie to asp.net, and I have purchased a cheap shared host account to try to learn about it.

I've tried a few things quite successfully, but when I try to write an XML
file out (XmlTextWriter) it fails due to an unauthorised access. I think I
am probably trying to write to c:\

How do I write data to my home page area on the host disk?

Nov 18 '05 #3

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

Similar topics

13
2551
by: Bryan Harrington | last post by:
Hello all.. I'm working on an application that I'd like to use some shared files. Right now my directory structure is: / (root) .../Shared/ .../Reports/ .../Tools/
96
6154
by: BadPony | last post by:
Anyone using Peoplesoft on a Federated UDB (shared nothing)Environment on Open System Platforms? Preferably AIX, but any war stories would be good. TEA EB-C
3
2034
by: Steve Brecher | last post by:
VS.NET help on deployment indicates that, while using a deployment project requires administrative access to IIS, " we recommend deploying your project in most cases, because it allows you to take advantage of extensive deployment project management features, such as registration and IIS configuration." I guess that users of shared web...
9
3004
by: Ivan Demkovitch | last post by:
Hi! I would like to know if I can save File on Server using server-side code? For example, I like to create thumbnail images and populate specific directory. Do I need specific permissions to do this? (I use public host) Thanks!
5
4318
by: Phil Kelly | last post by:
Hi I need to write the contents of a structure to a binary file - there is one string and 2 integers, but I can't seem to figure out how to write the data correctly. If I am simply writing text to a file there is no problem - that starts when I attempt to write the structure. Can someone help me out, please?
1
8104
by: Duffman | last post by:
Hi, I have what seems to be a common problem, but the solutions I've found don't seem to work. I would like to use a web service to create a file at a UNC location in a shared file. Currently I'm just running it locally and saving the file locally using my machines UNC path. I have given user ASPNET full control over the folder I want...
17
1672
by: Paul | last post by:
On my development computer, I have virtual named host set up, like www.site1.lab. When I upload those to my web site for customer review under mywebsite.com/clients/site1/ it throws some of the source file references off and it does not work properly. My references are like: require_once($_SERVER."/utility/top.php");
13
2639
by: eclipsme | last post by:
I thought I had this licked, but apparently not. I have a file upload script that attempts to upload a file to a directory in the public_html directory - www.domain.com/upload The permissions for the directory have to be 777 for this to work or esle it aborts with a permissions error - obviously a problem. The php script runs as user...
0
7273
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...
0
7182
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...
0
7405
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. ...
0
7574
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...
1
7136
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...
0
7547
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5106
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
4769
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...
0
3265
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...

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.