how to store info in a file with asp

E

EMW

My ASPX file is opened with two arguments, namely the Width and Height of
the browser window.
Since I've got more ASPX files, I need to keep these values.
I was thinking of writing them in an XML file, but when I do this I get an
error telling me my application does not have the right to write to disk.

Suppose I place a new dataset file in the solution explorer, by adding it to
my project, do I then always have access to this file from my program and
can I update it whenever I want to or will I get the same error?

rg,
Eric
 
S

Sharon

asp.net uses a user account to access operating system resources.
your problem is that the account (i think it's "aspnet_wp")
does not have enough permissions to access the location on the disk.
you can grant permissions to the asp.net account,
but, how about storing these values in the session collection?
Session["width"] = width.
sharon.
 
E

EMW

Thanks!

Could you explain a little bit more about the session collection?
And does this permissions stuff also apply about reading a file?

I want to create an XML file at my own pc with some data in it, then copy
this file to the location on the webserver, where my aspx file opens it,
reads it and then creates a table based on it.

rg,
Eric




Sharon said:
asp.net uses a user account to access operating system resources.
your problem is that the account (i think it's "aspnet_wp")
does not have enough permissions to access the location on the disk.
you can grant permissions to the asp.net account,
but, how about storing these values in the session collection?
Session["width"] = width.
sharon.

EMW said:
My ASPX file is opened with two arguments, namely the Width and Height of
the browser window.
Since I've got more ASPX files, I need to keep these values.
I was thinking of writing them in an XML file, but when I do this I get an
error telling me my application does not have the right to write to disk.

Suppose I place a new dataset file in the solution explorer, by adding
it
to
my project, do I then always have access to this file from my program and
can I update it whenever I want to or will I get the same error?

rg,
Eric
 
S

Sharon

EMW said:
Thanks!

Could you explain a little bit more about the session collection?
session is a basic concept when programming for a multiple users
environment.
(which internet is)
theres plenty to read about it in msdn.
And does this permissions stuff also apply about reading a file?
yes.
any type of access.
I want to create an XML file at my own pc with some data in it, then copy
this file to the location on the webserver, where my aspx file opens it,
reads it and then creates a table based on it.
i can think of two ways to do it:
1. transform the xml against xsl document.
2. load the xml into a dataset from which you can produce a dataview
for a datagrid on your page.
rg,
Eric




Sharon said:
asp.net uses a user account to access operating system resources.
your problem is that the account (i think it's "aspnet_wp")
does not have enough permissions to access the location on the disk.
you can grant permissions to the asp.net account,
but, how about storing these values in the session collection?
Session["width"] = width.
sharon.

EMW said:
My ASPX file is opened with two arguments, namely the Width and Height of
the browser window.
Since I've got more ASPX files, I need to keep these values.
I was thinking of writing them in an XML file, but when I do this I
get
 

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

Members online

Forum statistics

Threads
473,734
Messages
2,569,441
Members
44,832
Latest member
GlennSmall

Latest Threads

Top