473,404 Members | 2,174 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,404 software developers and data experts.

Error loading XML file c:\...\machine.config Request for the permission of type System.Security.Permissions.StrongNameIdentityPerm ission


I have seen the posts on various places on the internet about .NET
framework mismatch issues and I don't think that is my problem. ; )

When I execute the following C++.NET code:

String *ipAddress = S"";
IDictionary *server_config =
dynamic_cast<IDictionary*>(ConfigurationSettings:: GetConfig("ServerAddress")
);
ipAddress = dynamic_cast<String*>(server_config->get_Item(S"IP"));
I get the following .NET Framework exception on some computers:
Error loading XML file
c:\winnt\microsoft.net\framework\v1.1.4322\Config\ machine.config Request
for the permission of type
System.Security.Permissions.StrongNameIdentityPerm ission, mscorlib,
Version=1.90.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
failed.
(C:\winnt\microsoft.net\framework\v1.1.4322\Config \machine.config)
Details window:

************** Exception Text **************
System.Configuration.ConfigurationException: Error loading XML file
c:\winnt\microsoft.net\framework\v1.1.4322\Config\ machine.config Request for
the permission of type
System.Security.Permissions.StrongNameIdentityPerm ission, mscorlib,
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 failed.
(c:\winnt\microsoft.net\framework\v1.1.4322\Config \machine.config)
at System.Configuration.ConfigurationSettings.GetConf ig(String
sectionName)
I am using the following app.config file (named appropriately for my
application of course):

<configuration>
<configSections>
<section name="ServerAddress"
type="System.Configuration.SingleTagSectionHandler ,System" />
<section name="IFacAddress"
type="System.Configuration.SingleTagSectionHandler ,System" />
<section name="LogFile"
type="System.Configuration.SingleTagSectionHandler ,System" />
</configSections>

<ServerAddress IP="10.0.0.41" Port="443" />
<IFacAddress IP="" Port="300" />
<LogFile dir="C:\\serv\\Server\\logs" name="Server.log"/>

<system.net>
<connectionManagement>
<add address="*" maxconnection="200" />
</connectionManagement>
</system.net>
<system.runtime.remoting>
<application>
<client>
<wellknown type="DBIISRemotingService.DBService,
DBIISRemotingService"

url="http://10.0.0.29:30303/DBIISRemotingService/DBService.rem" />
</client>
<channels>
<channel ref="http" port="0">
<clientProviders>
<formatter ref="binary" />
</clientProviders>
</channel>
</channels>
</application>
<customErrors mode="off" />
</system.runtime.remoting>
<startup>
<supportedRuntime version="V1.1.4322" />
</startup>
</configuration>
I can't seem to figure out what the problem is. I don't particularly
want to even access the machine.config file, I want the data that is in the
app.config file. Surely I don't need to have StrongNameIdentity permissions
to read my own app.config file. I have check the .NET framework permissions
and as far as I can tell the assembly is running with full trust so it
should have all the permissions it needs. The code above is executed from
within a .NET dll, which is called by a .NET application, perhaps that is
the problem.

If you need any more info I'd be happy to post it.

Thanks,

-Chris
Jul 21 '05 #1
1 4328
Hi Chris,

Thanks for your post. I am checking this issue on my side and I will update
you with my information.

Have a nice day!

Regards,

HuangTM
Microsoft Online Partner Support
MCSE/MCSD

Get Secure! -- www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Jul 21 '05 #2

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

Similar topics

3
by: Sai Pavan | last post by:
Error loading XML file c:\winnt\microsoft.net\framework\v1.0.3705\Config\machine.config Request for the permission of type System.Security.Permissions.StrongNameIdentityPermission, mscorlib,...
0
by: Nic Butler | last post by:
Hi, I've got a win form app that takes an arbitrary file from the local drive, calls a webservice function, passing the file's byte array plus an number of other params. About half the time I...
0
by: Jeff | last post by:
Hello, I've run into a problem with my asp.net application and would like to know whether the error is likely with my remote host. The problem is an unhandled exception, and the exception...
2
by: Jeff | last post by:
Hello, I've run into a problem with my asp.net application and would like to know whether the error is likely with my remote host. The problem is an unhandled exception, and the exception...
2
by: Sue | last post by:
W2K Server, IIS 5.0, SQL 7, Integrated Security, web app. When user tried to bring up app in IE6, got the following error Error loading XML file c:\winnt\microsoft.net\framework\v1.0.370...
9
by: Tim D | last post by:
Hi, I originally posted this as a reply to a rather old thread in dotnet.framework.general and didn't get any response. I thought it might be more relevant here; anyone got any ideas? My...
1
by: Chris | last post by:
I have seen the posts on various places on the internet about .NET framework mismatch issues and I don't think that is my problem. ; ) When I execute the following C++.NET code: String...
10
by: Rider | last post by:
Hi, simple(?) question about asp.net configuration.. I've installed ASP.NET 2.0 QuickStart Sample successfully. But, When I'm first start application the follow message shown. ========= Server...
3
by: Mike | last post by:
Hi I have problem as folow: Caught Exception: System.Configuration.ConfigurationErrorsException: An error occurred loading a configuration file: Request for the permission of type...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
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,...
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
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...
0
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
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...

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.