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

C

Carlos

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.
 

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,764
Messages
2,569,567
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top