pass data to a text file! What this error means?

Discussion in 'ASP .Net' started by sympatico, Jan 22, 2005.

  1. sympatico

    sympatico Guest

    pls help me slove this problem. i am a newbie in using asp.net and SQL
    server 2000 and my problem for now is to pass data to a textfile and i have
    fail to do so.
    the way i did it was i used a datagrid to display certain data for the user
    to choose, as they check the checkbox beside the data, the data shall be
    store into a text file. therefore, i wrote this

    oWrite = oFile.CreateText("C:\Inetpub\wwwroot\VolunteerMatch\tempstore.txt")
    oWrite.WriteLine(Request.Form("mycheckboxgroup"))
    oWrite.Close()

    but in the end, it shows the error like this


    Exception Details: System.UnauthorizedAccessException: Access to the path
    "C:\Inetpub\wwwroot\VolunteerMatch\tempstore.txt" is denied.

    ASP.NET is not authorized to access the requested resource. Consider
    granting access rights to the resource to the ASP.NET request identity.
    ASP.NET has a base process identity (typically {MACHINE}\ASPNET on IIS 5 or
    Network Service on IIS 6) that is used if the application is not
    impersonating. If the application is impersonating via <identity
    impersonate="true"/>, the identity will be the anonymous user (typically
    IUSR_MACHINENAME) or the authenticated request user.

    To grant ASP.NET write access to a file, right-click the file in Explorer,
    choose "Properties" and select the Security tab. Click "Add" to add the
    appropriate user or group. Highlight the ASP.NET account, and check the
    boxes for the desired access

    i do not really know wat this means, could you please help me solve this
    problem? and can u please suggest me how to trigger searching capability?
    can i use the data in the text file to trigger search with other database
    data, so that certain data can be find out as a search result?

    Thank you
     
    sympatico, Jan 22, 2005
    #1
    1. Advertising

  2. In article <U9tId.66168$>,
    says...
    > Exception Details: System.UnauthorizedAccessException: Access to the path
    > "C:\Inetpub\wwwroot\VolunteerMatch\tempstore.txt" is denied.
    >
    > ASP.NET is not authorized to access the requested resource. Consider
    > granting access rights to the resource to the ASP.NET request identity.
    > ASP.NET has a base process identity (typically {MACHINE}\ASPNET on IIS 5 or
    > Network Service on IIS 6) that is used if the application is not
    > impersonating. If the application is impersonating via <identity
    > impersonate="true"/>, the identity will be the anonymous user (typically
    > IUSR_MACHINENAME) or the authenticated request user.
    >
    > To grant ASP.NET write access to a file, right-click the file in Explorer,
    > choose "Properties" and select the Security tab. Click "Add" to add the
    > appropriate user or group. Highlight the ASP.NET account, and check the
    > boxes for the desired access
    >
    > i do not really know wat this means, could you please help me solve this
    > problem?


    Did you follow the instructions shown above? Did you add the user to
    the security tab for the folder?

    --
    Patrick Steele
    Microsoft .NET MVP
    http://weblogs.asp.net/psteele
     
    Patrick Steele [MVP], Jan 23, 2005
    #2
    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. ronaldlee
    Replies:
    3
    Views:
    3,570
    Hans Kesting
    Dec 16, 2004
  2. sympatico
    Replies:
    2
    Views:
    982
    Hans Kesting
    Feb 8, 2005
  3. sympatico
    Replies:
    0
    Views:
    298
    sympatico
    Feb 7, 2005
  4. Elaine Jackson

    'telegraphy' as a means of data entry

    Elaine Jackson, Sep 11, 2004, in forum: Python
    Replies:
    11
    Views:
    476
    Jeff Epler
    Sep 13, 2004
  5. mahesh
    Replies:
    2
    Views:
    1,683
    Ian Collins
    May 17, 2007
Loading...

Share This Page