473,790 Members | 3,200 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

System.Unauthor izedAccessExcep tion: When writing XMLSchema

101
I get a security error when trying to write out to an XMLSchema file
"myDs.WriteXmlS chema(strXMLSch emaFile)". 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 1494
101 wrote:
I get a security error when trying to write out to an XMLSchema file
"myDs.WriteXmlS chema(strXMLSch emaFile)". 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\wwwr oot\VBNET\Manag ingData\bin\Man agingData.dll

but got the error "System.Unautho rizedAccessExce ption: Access to the path
"c:\inetpub\www root\VBNET\Mana gingData\Catego riesProductsSch ema.xsd" is
denied. at System.IO.__Err or.WinIOError(I nt32 errorCode, String str) at
System.IO.FileS tream..ctor(Str ing path, FileMode mode, FileAccess access,
FileShare share, Int32 bufferSize, Boolean useAsync, String msgPath, Boolean
bFromProxy) at System.IO.FileS tream..ctor(Str ing path, FileMode mode,
FileAccess access, FileShare share) at System.Xml.XmlT extWriter..ctor (String
filename, Encoding encoding) at System.Data.Dat aSet.WriteXmlSc hema(String
fileName) at ManagingData.Ed itProducts.btnS ave_Click(Objec t sender,
EventArgs e) in
c:\inetpub\wwwr oot\VBNET\Manag ingData\EditPro ducts.aspx.vb:l ine 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******** ******@tk2msftn gp13.phx.gbl...
101 wrote:
I get a security error when trying to write out to an XMLSchema file
"myDs.WriteXmlS chema(strXMLSch emaFile)". 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******** ******@tk2msftn gp13.phx.gbl...
101 wrote:
I get a security error when trying to write out to an XMLSchema file
"myDs.WriteXmlS chema(strXMLSch emaFile)". 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********@yah oo.com> wrote in message
news:qQu8e.1871 6$Xm3.7007@trnd ny01...
I get a security error when trying to write out to an XMLSchema file
"myDs.WriteXml Schema(strXMLSc hemaFile)". 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
5471
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 directory I have an XML file, LicXML.XML which holds licensing info for the app. On one group of machines where the users have restricted privileges, the deserialization of this file trips an error as follows (excuse mispellings from my client):
1
4872
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 the current directory to verify it's not "System Volume Information" ? Or, how to catch this error and continue the process when the error occurs ?
5
2026
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 files are created, but the first app hasn't finished writing to it - causing a "file is already open" error when the second app trys to open the file for processing. what i need is a "file closed" event to be thrown by the file system watcher...
4
4211
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 denying access to the File.CreateText(_filename) method. The user has write access. They can create a text file through explorer no problem. I am not a member of the group that has write access. As a test, I logged into the network as a Domain Admin...
0
2477
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 to the COM for processing. We are now trying to migrate the asp pipe to Asp.Net. When running the above configuration with Asp.Net on IIS 5.0 (W2K) we have no problems but when trying the do it on IIS 6.0 (W2K3) we are getting the following...
7
4804
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") When I try to do it, I get this error: System.UnauthorizedAccessException: Access to the path
0
1793
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 denied.=20 Description: An unhandled exception occurred during the execution of the =
0
2332
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 I've added Everyone and refreshed policies (gpupdate /force), restarted VB IDE but still got the problem. What is the "worker process" for VB IDE? CODE:
2
14379
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 we get the error CPU goes 100% We have been through all we can think of, but have not been able to locate the source to the error. Any suggestions?
0
9666
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10201
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10147
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9987
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7531
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5424
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5552
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3709
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2910
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.