CTL_E_PERMISSIONDENIED ??

M

MikeV06

IIS 6 on Win2003 with Net 2.0

I have just started trying to learn asp. As my first attempt, I copied some
example asp 101 code that supposedly will create a hit counter.

I am getting an exception trying to run a simple aspx page. This is causing
the error: objCount = objFSO.CreateTextFile("counter.txt", True). I have
gone through my default web page settings and the ntfs setting for
counter.txt. I gave network service modify, write, read, execute
permissions and it did not work. Just to make sure it was not a ntfs issue,
I added everyone with full control, but still it does not work. Could
someone please point me to the correct IIS server configuration settings,
ntfs setting, and asp settings so that I can run this page (and many
others). Thanks.


Server Error in '/' Application.
--------------------------------------------------------------------------------

Security Exception
Description: The application attempted to perform an operation not allowed
by the security policy. To grant this application the required permission
please contact your system administrator or change the application's trust
level in the configuration file.

Exception Details: System.Security.SecurityException: Exception from
HRESULT: 0x800A0046 (CTL_E_PERMISSIONDENIED)


Source File: c:\inetpub\wwwroot\hitit.aspx Line: 27

Source Error:
Line 25: visitorcount = visitorcount + 1
Line 26: objCount.close
Line 27: objCount = objFSO.CreateTextFile("counter.txt", True)
Line 28: objCount.WriteLine(visitorcount)
Line 29: end if

I have a web.config file in the web root directory that says:

<?xml version="1.0" encoding="utf-8"?>
<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
<appSettings>
<add key="hitit.aspx" value="full" />
</appSettings>
</configuration>

I have dug through help files until I am about blind. Is this the correct
syntax? It does not work with this?

Thanks.
 

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

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,598
Members
45,145
Latest member
web3PRAgeency
Top