Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

CTL_E_PERMISSIONDENIED error

242 views
Skip to first unread message

Amit Anand

unread,
Jun 12, 2002, 9:03:01 AM6/12/02
to
Hi All

I am trying to port some old legacy ASP code to ASP.NET. The default
language used in the ASP was JSCRIPT.
I simply shifted the ASP code to a Jscript WEBFORM.

Now in that code there I need to work with files using the FileSystemObject.
I am trying to create a new file and then open it for writing to it.

var f=fs.OpenTextFile(fp.ParentFolder + "/" + uname + "/prefs.txt", 2);

However I am getting an error

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

This is not very clear to me. I have already given write permissions to the
ASPNET process to the concerned folder.
Please guide me.....

Regards

Amit Anand


Peter Torr (MS)

unread,
Jun 18, 2002, 2:53:56 AM6/18/02
to
"Amit Anand" <amit...@niit.com> wrote in message
news:#52CVIhECHA.1360@tkmsftngp05...

> Now in that code there I need to work with files using the
FileSystemObject.
> I am trying to create a new file and then open it for writing to it.
>
> var f=fs.OpenTextFile(fp.ParentFolder + "/" + uname + "/prefs.txt", 2);
>
> However I am getting an error
>
> System.Security.SecurityException: Exception from HRESULT: 0x800A0046
> (CTL_E_PERMISSIONDENIED).


Hi,

That's an error due to Windows permissions rather than .NET permissions. Are
you sure you have exactly the right path, and have given the right user
read/write access to the path?

Do you have impersonation turned on or anything?

Peter

--
Peter Torr -- pt...@microsoft.com
This must be the disclaimer I waited years to read:
http://www.microsoft.com/info/cpyright.htm

Peter Torr (MS)

unread,
Jun 19, 2002, 2:32:54 AM6/19/02
to
[Resend]
"Peter Torr (MS)" <pt...@microsoft.com> wrote in message news:...
0 new messages