473,320 Members | 2,048 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Writing an xml file from a session? (question about permissions)


Trying to write an xml file from within a Session. Works fine if I do
it in the Application_Start event of Global.asax, but not in the
Page_Load event of an aspx page.

If I give "Everyone" write permissions to the folder/file, everything
works fine (on my local development machine), but this is not an
option on the production server, which is outside of my control.
This also means that I cannot add new accounts with the required
permissions for use by asp.net sessions.

So the questions are:

1) Is it possible for a session object to use the ASPNET permissions
of the application object?

If not 1), can a session ask the application to perform the write
operation on its behalf? Basically, we are talking about a global
object that needs to be serialized to xml and written to disk, but
other safeguards are in place, ensuring that only one session will
ever attempt this write at any given time, so I am not concerned
about synchronization issues at the moment.

???

Joergen Bech

Nov 19 '05 #1
2 1330
Cam
Hi,

I believe that whatever account the aspnet worker process is impersonating
will need to have the appropriate access. If you have not changed the
default this will be either the logged in user or the local ASPNET account,
depending on several different factors such as browser used.

If you are writing an internet application, you will probably want to have
only anonymous access enabled, and this will be specified to use a specific
account in the live environment. This is the account which will need access
to the place where the files will be written -- and if this isn't on the
local webserver, then it will need to be a domain account and not the local
ASPNET account.

HTH,
C.

"Joergen Bech @ post1.tele.dk>" wrote:

Trying to write an xml file from within a Session. Works fine if I do
it in the Application_Start event of Global.asax, but not in the
Page_Load event of an aspx page.

If I give "Everyone" write permissions to the folder/file, everything
works fine (on my local development machine), but this is not an
option on the production server, which is outside of my control.
This also means that I cannot add new accounts with the required
permissions for use by asp.net sessions.

So the questions are:

1) Is it possible for a session object to use the ASPNET permissions
of the application object?


Nov 19 '05 #2

Thanks for the information, but as I said, the server is not under
my control, so I cannot add users or change permissions at will.

But I managed to get hold of the provider and get him to modify
the permissions for the folder, so everything works now.

Will have to play around with asp.net security in a controlled
environment when time permits.

/JB

On Mon, 11 Jul 2005 05:19:13 -0700, Cam
<Ca*@discussions.microsoft.com> wrote:
Hi,

I believe that whatever account the aspnet worker process is impersonating
will need to have the appropriate access. If you have not changed the
default this will be either the logged in user or the local ASPNET account,
depending on several different factors such as browser used.

If you are writing an internet application, you will probably want to have
only anonymous access enabled, and this will be specified to use a specific
account in the live environment. This is the account which will need access
to the place where the files will be written -- and if this isn't on the
local webserver, then it will need to be a domain account and not the local
ASPNET account.

HTH,
C.

"Joergen Bech @ post1.tele.dk>" wrote:

Trying to write an xml file from within a Session. Works fine if I do
it in the Application_Start event of Global.asax, but not in the
Page_Load event of an aspx page.

If I give "Everyone" write permissions to the folder/file, everything
works fine (on my local development machine), but this is not an
option on the production server, which is outside of my control.
This also means that I cannot add new accounts with the required
permissions for use by asp.net sessions.

So the questions are:

1) Is it possible for a session object to use the ASPNET permissions
of the application object?


Nov 19 '05 #3

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

Similar topics

0
by: Fran Tirimo | last post by:
I am developing a small website using ASP scripts to format data retrieved from an Access database. It will run on a Windows 2003 server supporting FrontPage extensions 2002 hosted by the company...
2
by: Fran Tirimo | last post by:
I am developing a small website using ASP scripts to format data retrieved from an Access database. It will run on a Windows 2003 server supporting FrontPage extensions 2002 hosted by the company...
14
by: Mark C. | last post by:
I'm trying to call a batch file that I've built using the FileSystemObject and CreateObject("Wscript.Shell"), oShell.Run... in an asp script. Naturally, I can get the script to work from a command...
1
by: raydelex | last post by:
I am new to securing a database with logins. My questions is: I want only one database to use a new Workgroup file that I have created, not all the Access databases that I bring up under my...
4
by: HNguyen | last post by:
Hi, I have a Web application in ASP.NET. My Application allows the users upload files into the server after checking their user names and passwords. For each transaction, the Web program will...
4
by: =?Utf-8?B?QmlsbCBNYW5yaW5n?= | last post by:
I have an internal ASP.NET 2.0 web service that does, among other things, expose a method that causes files to be written to a location that the user configures. The web service has been around...
4
by: Gilles Ganault | last post by:
Hello I'm stumped as to why PHP fails writing into a text file, with the script being called through Apache: ============== # pwd /usr/local/www/data/ ============== # ll
1
by: chrisj | last post by:
I'm using freeASPupload and got some assistance integrating to a Member script. It works successfully. In this modified version there are two groups that use this upload script. Members of one...
3
by: sandromani | last post by:
Hello, I am working at a webbased file browser, where users will be able to access, rename, delete, etc files and folders. My question is, what is the best way to handle permissions /...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.