473,671 Members | 2,446 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 1268
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.athenane ws.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 customdatasolut ions dot us
"anon" <no***@nowhere. spam> wrote in message
news:41******** **@alt.athenane ws.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
2580
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
6205
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
2038
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 hosts are using copying rather than a deployment project. What problems might this run into? I.e.,...
9
3016
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
4329
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
8124
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 to write the file to. I've also tried using the web config identity impersonation to use my user...
17
1685
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
2652
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 'nobody'. Tech support is through email, and level one is not that bright, or at
0
8401
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
8926
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
8824
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...
0
8673
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7444
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6236
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4227
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...
0
4416
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2060
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.