how to store info in a file with asp

Discussion in 'ASP .Net' started by EMW, Apr 15, 2004.

  1. EMW

    EMW Guest

    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
    EMW, Apr 15, 2004
    #1
    1. Advertising

  2. EMW

    Sharon Guest

    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" <SomeOne@MicroSoftdotCom> wrote in message
    news:407efdaa$0$41763$...
    > 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
    >
    >
    Sharon, Apr 16, 2004
    #2
    1. Advertising

  3. EMW

    EMW Guest

    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" <> schreef in bericht
    news:...
    > 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" <SomeOne@MicroSoftdotCom> wrote in message
    > news:407efdaa$0$41763$...
    > > 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
    > >
    > >

    >
    >
    EMW, Apr 16, 2004
    #3
  4. EMW

    Sharon Guest

    "EMW" <SomeOne@MicroSoftdotCom> wrote in message
    news:407f739f$0$41764$...
    > 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" <> schreef in bericht
    > news:...
    > > 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" <SomeOne@MicroSoftdotCom> wrote in message
    > > news:407efdaa$0$41763$...
    > > > 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
    > > >
    > > >

    > >
    > >

    >
    >
    Sharon, Apr 17, 2004
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?UnVkeQ==?=

    to store or not to store an image

    =?Utf-8?B?UnVkeQ==?=, Mar 29, 2005, in forum: ASP .Net
    Replies:
    6
    Views:
    617
    =?Utf-8?B?UnVkeQ==?=
    Mar 30, 2005
  2. =?Utf-8?B?TWFyaw==?=

    Where does VS2005 store csproj file info?

    =?Utf-8?B?TWFyaw==?=, Jan 7, 2006, in forum: ASP .Net
    Replies:
    2
    Views:
    2,470
  3. Alan Silver
    Replies:
    2
    Views:
    337
    Alan Silver
    Jun 5, 2006
  4. Samir A. Mamude

    Store credit card info with Security

    Samir A. Mamude, Jan 8, 2004, in forum: ASP .Net Security
    Replies:
    1
    Views:
    102
    Alek Davis
    Jan 8, 2004
  5. Christopher Brandsdal

    store info in database.

    Christopher Brandsdal, Sep 4, 2003, in forum: ASP General
    Replies:
    4
    Views:
    150
Loading...

Share This Page