CTL_E_PERMISSIONDENIED??

M

MikeV06

IIS 6 on Win2003 with Net 2.0

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. Could someone please point me to the correct IIS server
configuration settings and ntfs setting 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.
 
B

Bob Barrows [MVP]

MikeV06 said:
IIS 6 on Win2003 with Net 2.0

I am getting an exception trying to run a simple aspx page. This is

There was no way for you to know it, but this is a classic asp newsgroup.
While you may be lucky enough to find a dotnet-knowledgeable person here who
can answer your question, you can eliminate the luck factor by posting your
question to a group where those dotnet-knowledgeable people hang out. I
suggest microsoft.public.dotnet.framework.aspnet.
causing
the error: objCount = objFSO.CreateTextFile("counter.txt", True). I
have

Why are you using FSO? The .Net library has builtin classes to enable file
i/o
gone through my default web page settings and the ntfs setting for
counter.txt. Could someone please point me to the correct IIS server
configuration settings and ntfs setting so that I can run this page
(and
many others). Thanks.
The ASPNET account needs ntfs Modify permissions for the folder if your site
is using anonymous access. Otherwise, all users of your site must be in a
group that has modify permissions for that folder.
 
M

MikeV06

There was no way for you to know it, but this is a classic asp newsgroup.
While you may be lucky enough to find a dotnet-knowledgeable person here who
can answer your question, you can eliminate the luck factor by posting your
question to a group where those dotnet-knowledgeable people hang out. I
suggest microsoft.public.dotnet.framework.aspnet.

Thank you. I have subscribed to that group along with the webcomponents
group.
Why are you using FSO? The .Net library has builtin classes to enable file
i/o

I have just started trying to learn it. I copied several supposedly asp 101
examples that would create a simple hit counter from the asp site that help
sent me to. Obviously the examples must be out of date. Still I would like
to know the security problems keeping it from working.
The ASPNET account needs ntfs Modify permissions for the folder if your site
is using anonymous access. Otherwise, all users of your site must be in a
group that has modify permissions for that folder.

That is what I thought as well. I gave network service those permissions
and it still did not work. I added everyone and gave it full control just
to make sure it was not a ntfs permission issue.

I am at a loss. I will also try over at the other group too.

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,995
Messages
2,570,228
Members
46,818
Latest member
SapanaCarpetStudio

Latest Threads

Top