System.UnauthorizedAccessException

user

Splendid
Dec 26, 2003
3,943
0
22,780
Archived from groups: microsoft.public.windowsxp.security_admin (More info?)

Don't want to double post but, I am hoping someone here may know the answer:

That sounded like it, but I am getting the same error. I used the wizard to
fully trust C:\Inetpub\wwwroot\VBNET\ManagingData\bin\ManagingData.dll

but got the error "System.UnauthorizedAccessException: Access to the path
"c:\inetpub\wwwroot\VBNET\ManagingData\CategoriesProductsSchema.xsd" is
denied. at System.IO.__Error.WinIOError(Int32 errorCode, String str) at
System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access,
FileShare share, Int32 bufferSize, Boolean useAsync, String msgPath, Boolean
bFromProxy) at System.IO.FileStream..ctor(String path, FileMode mode,
FileAccess access, FileShare share) at System.Xml.XmlTextWriter..ctor(String
filename, Encoding encoding) at System.Data.DataSet.WriteXmlSchema(String
fileName) at ManagingData.EditProducts.btnSave_Click(Object sender,
EventArgs e) in
c:\inetpub\wwwroot\VBNET\ManagingData\EditProducts.aspx.vb:line 574"

Like I said, when ASPNET is a member of Admin it works, is there something
else I need to Fully Trust?
"Chris" <no@spam.com> wrote in message
news:uIe4YX2QFHA.1932@tk2msftngp13.phx.gbl...
> 101 wrote:
>> I get a security error when trying to write out to an XMLSchema file
>> "myDs.WriteXmlSchema(strXMLSchemaFile)". I am running XP SP2, No Domain,
>> MS file and print sharing uninstalled. I was able to get past this by
>> making ASPNET part of the Administrators group. I tried the Power User
>> group (as well as others) to no avail. I also had to install MS file and
>> print sharing in order to even add ASPNET
>> as a member of the Administrator group (or any other group). After adding
>> it to the group I can uninstall file and print sharing and everything
>> works fine.
>>
>> Is making ASPNET a member of the Admin group the correct way of doing
>> this, or should I make a new group with some specific permissions?
>>
>> I am trying to learn .NET programming and trying to avoid going on
>> security tangents. Is this news group the right place or is there a more
>> suitable place for Newbie's.
>
> I think the easiest way to solve this is to just fully trust your assembly
> in the .Net Config Wizard (in your administrative tools).
>
> Chris
 

user

Splendid
Dec 26, 2003
3,943
0
22,780
Archived from groups: microsoft.public.windowsxp.security_admin (More info?)

FYI - Actually Fully Trusting the assembly did help but it appears that file
and print sharing on XP PRO must be installed and the folder containing the
document must be shared on the network with write privliges.

IOW - you must Fully Trust the APP and Allow network users to change my
files.
"101" <AceMagoo61@yahoo.com> wrote in message
news:qiy8e.19008$Xm3.3035@trndny01...
> Don't want to double post but, I am hoping someone here may know the
> answer:
>
> That sounded like it, but I am getting the same error. I used the wizard
> to
> fully trust C:\Inetpub\wwwroot\VBNET\ManagingData\bin\ManagingData.dll
>
> but got the error "System.UnauthorizedAccessException: Access to the path
> "c:\inetpub\wwwroot\VBNET\ManagingData\CategoriesProductsSchema.xsd" is
> denied. at System.IO.__Error.WinIOError(Int32 errorCode, String str) at
> System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access,
> FileShare share, Int32 bufferSize, Boolean useAsync, String msgPath,
> Boolean
> bFromProxy) at System.IO.FileStream..ctor(String path, FileMode mode,
> FileAccess access, FileShare share) at
> System.Xml.XmlTextWriter..ctor(String
> filename, Encoding encoding) at System.Data.DataSet.WriteXmlSchema(String
> fileName) at ManagingData.EditProducts.btnSave_Click(Object sender,
> EventArgs e) in
> c:\inetpub\wwwroot\VBNET\ManagingData\EditProducts.aspx.vb:line 574"
>
> Like I said, when ASPNET is a member of Admin it works, is there something
> else I need to Fully Trust?
> "Chris" <no@spam.com> wrote in message
> news:uIe4YX2QFHA.1932@tk2msftngp13.phx.gbl...
>> 101 wrote:
>>> I get a security error when trying to write out to an XMLSchema file
>>> "myDs.WriteXmlSchema(strXMLSchemaFile)". I am running XP SP2, No Domain,
>>> MS file and print sharing uninstalled. I was able to get past this by
>>> making ASPNET part of the Administrators group. I tried the Power User
>>> group (as well as others) to no avail. I also had to install MS file
>>> and
>>> print sharing in order to even add ASPNET
>>> as a member of the Administrator group (or any other group). After
>>> adding
>>> it to the group I can uninstall file and print sharing and everything
>>> works fine.
>>>
>>> Is making ASPNET a member of the Admin group the correct way of doing
>>> this, or should I make a new group with some specific permissions?
>>>
>>> I am trying to learn .NET programming and trying to avoid going on
>>> security tangents. Is this news group the right place or is there a more
>>> suitable place for Newbie's.
>>
>> I think the easiest way to solve this is to just fully trust your
>> assembly
>> in the .Net Config Wizard (in your administrative tools).
>>
>> Chris
>
>
 

user

Splendid
Dec 26, 2003
3,943
0
22,780
Archived from groups: microsoft.public.windowsxp.security_admin (More info?)

Ok, 4 years with XP and didn't know about shutting off simplified
permissions on folders.

http://support.microsoft.com/?kbid=307874

"101" <AceMagoo61@yahoo.com> wrote in message
news:qiy8e.19008$Xm3.3035@trndny01...
> Don't want to double post but, I am hoping someone here may know the
> answer:
>
> That sounded like it, but I am getting the same error. I used the wizard
> to
> fully trust C:\Inetpub\wwwroot\VBNET\ManagingData\bin\ManagingData.dll
>
> but got the error "System.UnauthorizedAccessException: Access to the path
> "c:\inetpub\wwwroot\VBNET\ManagingData\CategoriesProductsSchema.xsd" is
> denied. at System.IO.__Error.WinIOError(Int32 errorCode, String str) at
> System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access,
> FileShare share, Int32 bufferSize, Boolean useAsync, String msgPath,
> Boolean
> bFromProxy) at System.IO.FileStream..ctor(String path, FileMode mode,
> FileAccess access, FileShare share) at
> System.Xml.XmlTextWriter..ctor(String
> filename, Encoding encoding) at System.Data.DataSet.WriteXmlSchema(String
> fileName) at ManagingData.EditProducts.btnSave_Click(Object sender,
> EventArgs e) in
> c:\inetpub\wwwroot\VBNET\ManagingData\EditProducts.aspx.vb:line 574"
>
> Like I said, when ASPNET is a member of Admin it works, is there something
> else I need to Fully Trust?
> "Chris" <no@spam.com> wrote in message
> news:uIe4YX2QFHA.1932@tk2msftngp13.phx.gbl...
>> 101 wrote:
>>> I get a security error when trying to write out to an XMLSchema file
>>> "myDs.WriteXmlSchema(strXMLSchemaFile)". I am running XP SP2, No Domain,
>>> MS file and print sharing uninstalled. I was able to get past this by
>>> making ASPNET part of the Administrators group. I tried the Power User
>>> group (as well as others) to no avail. I also had to install MS file
>>> and
>>> print sharing in order to even add ASPNET
>>> as a member of the Administrator group (or any other group). After
>>> adding
>>> it to the group I can uninstall file and print sharing and everything
>>> works fine.
>>>
>>> Is making ASPNET a member of the Admin group the correct way of doing
>>> this, or should I make a new group with some specific permissions?
>>>
>>> I am trying to learn .NET programming and trying to avoid going on
>>> security tangents. Is this news group the right place or is there a more
>>> suitable place for Newbie's.
>>
>> I think the easiest way to solve this is to just fully trust your
>> assembly
>> in the .Net Config Wizard (in your administrative tools).
>>
>> Chris
>
>