how can I copy page files inside an asp.net page code?

Discussion in 'ASP .Net' started by Carlos, Jan 29, 2005.

  1. Carlos

    Carlos Guest

    Hi all,

    I just tried the following: code inside an ASP .Net page

    System.IO.File.Copy
    ("C:\\Inetpub\\wwwroot\\aspdesk\\indexd.htm","C:\\Inetpub\\wwwroot\\aspdesk\
    \index.htm");

    and I got:

    Access to the path "C:\Inetpub\wwwroot\aspdesk\indexcopy.htm" is denied.

    Supposedly, I would be able to fix it by:

    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.

    But I did not find such user or group that has asp .net. I just wanted to
    make a page the initial page for the website according to a condition that
    is met. How else can I do that?

    Thanks in advance,

    Carlos.
     
    Carlos, Jan 29, 2005
    #1
    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. Steve Richter
    Replies:
    4
    Views:
    5,563
    Steve Richter
    Apr 18, 2005
  2. Alex
    Replies:
    2
    Views:
    1,289
  3. rdc02271
    Replies:
    24
    Views:
    770
    Jacek Dziedzic
    Dec 27, 2005
  4. Replies:
    26
    Views:
    2,177
    Roland Pibinger
    Sep 1, 2006
  5. luu duong
    Replies:
    2
    Views:
    378
    luu duong
    Oct 8, 2003
Loading...

Share This Page