configuration problem (very urgent)

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm doing asp.net application. In my web.config file i have added key as
following
<appSettings>
<add key="Provider" value="3"></add>
<add key="OracleClient" value="data source=global;user
id=atms_user;password=sql"></add>
<add key="Connection" value="server=global;user
Id=atms_user;password=sql"></add>
</appSettings>

Now when I run my application and trying to get the provider from web.config
as below

string provider = ConfigurationSettings.AppSettings["Provider"];

I'm getting the following error
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,
Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 failed.
(c:\winnt\microsoft.net\framework\v1.0.3705\Config\machine.config)


It seems instead of reading from web.config the application is trying to
read from machine.config.


please help me out in this aspect i'm stuck at this point from yesterday
 
Give this a shot:

- Install .NET Framework 1.1 (looks like you're using 1.0)...
www.microsoft.com/net
- Go to Control Panel > Administrative Tools > Microsoft .NET Framework 1.1
Wizards > Adjust .NET Security. Under there, "make changes to this
computer", and TEMPORARILY click on each different zone and slide the slider
up to 'full trust'.

See if that gets you going temporarily, and then check out:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetsec/html/netframesecover.asp

There you can read up on .NET's security features and why you're getting
this error.

HTH,
Brandon
 
Back
Top