WebRequest class

Discussion in 'ASP .Net' started by =?Utf-8?B?Y2FzaGRlc2ttYWM=?=, Mar 31, 2006.

  1. I am trying to create an XML file in a shared folder on the intranet but keep
    getting an exception. I am using the Create method of the WebRequest class
    and calling the response method afterwards.

    The syntax is fine, but I am being told that I cannot access the folder.

    IIs has been set to allow anonymous users and I also have <allow users="?"/>
    in the config file. I could grant the ASPNET account access to the folder
    but would prefer running the code as the authenticated user rather than the
    local user.

    The objective is to creater the XML file in the shared folder as an
    anonymous user and allow only that anonymous user to access it again. If
    anyone can suggest another approach I would be grateful.
    =?Utf-8?B?Y2FzaGRlc2ttYWM=?=, Mar 31, 2006
    #1
    1. Advertising

  2. Could you post some sample code that shows how you are using WebRequest to
    create and save a file? A "short but complete" snippet will help.
    Peter

    --
    Co-founder, Eggheadcafe.com developer portal:
    http://www.eggheadcafe.com
    UnBlog:
    http://petesbloggerama.blogspot.com




    "cashdeskmac" wrote:

    > I am trying to create an XML file in a shared folder on the intranet but keep
    > getting an exception. I am using the Create method of the WebRequest class
    > and calling the response method afterwards.
    >
    > The syntax is fine, but I am being told that I cannot access the folder.
    >
    > IIs has been set to allow anonymous users and I also have <allow users="?"/>
    > in the config file. I could grant the ASPNET account access to the folder
    > but would prefer running the code as the authenticated user rather than the
    > local user.
    >
    > The objective is to creater the XML file in the shared folder as an
    > anonymous user and allow only that anonymous user to access it again. If
    > anyone can suggest another approach I would be grateful.
    =?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?=, Mar 31, 2006
    #2
    1. Advertising

  3. The preferred method to set this up security wise would be to create an
    account on the network that has access to just the folder in question and
    then tell IIS to run it's anonymous access with that account.

    Regards,

    --
    S. Justin Gengo
    Web Developer / Programmer

    Free code library:
    http://www.aboutfortunate.com

    "Out of chaos comes order."
    Nietzsche


    "cashdeskmac" <> wrote in message
    news:...
    >I am trying to create an XML file in a shared folder on the intranet but
    >keep
    > getting an exception. I am using the Create method of the WebRequest
    > class
    > and calling the response method afterwards.
    >
    > The syntax is fine, but I am being told that I cannot access the folder.
    >
    > IIs has been set to allow anonymous users and I also have <allow
    > users="?"/>
    > in the config file. I could grant the ASPNET account access to the folder
    > but would prefer running the code as the authenticated user rather than
    > the
    > local user.
    >
    > The objective is to creater the XML file in the shared folder as an
    > anonymous user and allow only that anonymous user to access it again. If
    > anyone can suggest another approach I would be grateful.
    S. Justin Gengo, Mar 31, 2006
    #3
    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. CodeMotion
    Replies:
    0
    Views:
    546
    CodeMotion
    Jul 3, 2003
  2. Andres
    Replies:
    2
    Views:
    6,620
    Natty Gur
    Aug 14, 2003
  3. Sujith Jagini

    problem with webRequest.method = post

    Sujith Jagini, Aug 16, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    1,469
    Natty Gur
    Aug 17, 2003
  4. John Saunders

    Re: problem with webRequest.method = post

    John Saunders, Aug 20, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    406
    John Saunders
    Aug 20, 2003
  5. E11
    Replies:
    1
    Views:
    4,703
    Thomas Weidenfeller
    Oct 12, 2005
Loading...

Share This Page