473,396 Members | 1,678 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

System.UnauthorizedAccessException: When writing XMLSchema

101
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.
Nov 21 '05 #1
4 1472
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
Nov 21 '05 #2
101
That sounded like it, but I am getting the same error. I used the wizard to
fully trust C:\Inetpub\wwwroot\VBNET\ManagingData\bin\Managing Data.dll

but got the error "System.UnauthorizedAccessException: Access to the path
"c:\inetpub\wwwroot\VBNET\ManagingData\CategoriesP roductsSchema.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:uI**************@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

Nov 21 '05 #3
101
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.

"Chris" <no@spam.com> wrote in message
news:uI**************@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

Nov 21 '05 #4
101
Ok, 4 years with XP and didn't know about shutting off simplified
permissions on folders. :(

So, Fully Trust the assembly, shut off simplified permissions and give ASP
..NET Write permission on the file.

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

Thank You!
"101" <Ac********@yahoo.com> wrote in message
news:qQu8e.18716$Xm3.7007@trndny01...
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.

Nov 21 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Burton Roberts | last post by:
This is also posted in the security newsgroup. Sorry for cross-posting, but I'm desperate. I have a Winforms application in VB.NET with a SQL Server (MSDE) backend. In the root application...
1
by: Krazitchek | last post by:
Hi, i check all directories on a disk but an error occurs when i try to enter in the "System Volume Information" directory. Is there a way to "jump" this directory without to check the name of...
5
by: ToddT | last post by:
i've got one app that writes large files to a specific directory that is watched by another app via an instance of the file system watcher class. my problem is that the second app is notified when...
4
by: ASP Yaboh | last post by:
I have app that writes text files to any location of the users choosing in the network. It has been working for 18months. An exception has begun occurring where a folder on a network share is...
0
by: Efi | last post by:
Hi, We have a simple 3 tier application which its core application is VC++ 6.0 ATL COM running as a server application in the COM+. An asp pipe is in charge of handling the requests and passes it...
7
by: Peter Afonin | last post by:
Hello, I'm using this code to access a network share from an asp.net page: Dim dir As DirectoryInfo = New DirectoryInfo("\\10.0.0.150\FormLib\") Dim files() As FileInfo = dir.GetFiles("*.eps")...
0
by: masago | last post by:
Hi....how are you ?? they can help me to solve this problem ?? Access to the path = "c:\windows\microsoft.net\framework\v1.1.4322\Temporary ASP.NET = Files\reports\06639073\bbab30a7" is...
0
by: nime | last post by:
I've got a problem. I cannot debug my app. which one contains WebBrowser control. I found a resolution but it's for an ASP related problem. I couldn't find a correct "user" to give permisson then...
2
by: job | last post by:
In a sharepoint setup using smartpart to load our user controls using enterprise blocks (data) we are getting some strange errors (logged to the event log). We dont get the error all the time. When...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.