473,805 Members | 1,910 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

configuration problem (very urgent)

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="OracleClie nt" value="data source=global;u ser
id=atms_user;pa ssword=sql"></add>
<add key="Connection " value="server=g lobal;user
Id=atms_user;pa ssword=sql"></add>
</appSettings>

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

string provider = ConfigurationSe ttings.AppSetti ngs["Provider"];

I'm getting the following error
Error loading XML file
c:\winnt\micros oft.net\framewo rk\v1.0.3705\Co nfig\machine.co nfig Request for
the permission of type
System.Security .Permissions.St rongNameIdentit yPermission, mscorlib,
Version=1.0.330 0.0, Culture=neutral , PublicKeyToken= b77a5c561934e08 9 failed.
(c:\winnt\micro soft.net\framew ork\v1.0.3705\C onfig\machine.c onfig)
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
Jul 21 '05 #1
1 1281
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/de...amesecover.asp

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

HTH,
Brandon
"Sai Pavan" <Sa******@discu ssions.microsof t.com> wrote in message
news:A2******** *************** ***********@mic rosoft.com...
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="OracleClie nt" value="data source=global;u ser
id=atms_user;pa ssword=sql"></add>
<add key="Connection " value="server=g lobal;user
Id=atms_user;pa ssword=sql"></add>
</appSettings>

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

string provider = ConfigurationSe ttings.AppSetti ngs["Provider"];

I'm getting the following error
Error loading XML file
c:\winnt\micros oft.net\framewo rk\v1.0.3705\Co nfig\machine.co nfig Request for the permission of type
System.Security .Permissions.St rongNameIdentit yPermission, mscorlib,
Version=1.0.330 0.0, Culture=neutral , PublicKeyToken= b77a5c561934e08 9 failed. (c:\winnt\micro soft.net\framew ork\v1.0.3705\C onfig\machine.c onfig)
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

Jul 21 '05 #2

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

Similar topics

9
3096
by: Alessandro | last post by:
When I build a setup project under vb2005, starts "Microsoft sql server 2005 Tool" showing "Please wait while windows configures Microsoft sql server 2005 tools" Then it stop with this message: Failure setting security rights on users account SQLServer2005NotificationServicesUser$M2 If I give the user administrator rights it does not happen and buid goes right. I I remove the user from administrators the message is showed again. I...
7
6151
by: Steven Cliff | last post by:
I have started to use the new Enterprise Library (Jan 06) and have set up a skeleton project using the DAAB. This all seems to work fine apart from when I come to secure the app.config file via encryption. I have encrypted the connectionsettings block in the config file but obviously when I come to deploy the solution to other PC's, it cannot read the block as it doesn't have the keys to decrypt. I understand that as far as ASP.NET...
1
2721
by: Rolf Welskes | last post by:
Hello, I set in the configuration file of the application: <system.web> <pages styleSheetTheme="E01_Theme01" /> ...... This works.
5
2936
by: Hardy Wang | last post by:
Hi all, I understand, in .Net 2.0 we have little bit different model to read config file from .Net 1.1. Basically I need to use WebConfigurationManager.AppSettings to read from web.config, and ConfigurationManager.AppSettings to read from Windows Application config. Here is my question, I have a class library project which will be referenced by both Web and Windows Application in different projects, I need to read config setting inside...
6
4819
by: Jeff Hegedus | last post by:
I have a dll that requires some configuration data. I put the configuration data in a custom configuration section in a config file that is loaded in the installation folder of the dll. If I install the dll to the same directory as the exe which uses it, everything works as expected but if I load the dll in any other directory, I get the following error... 2007-02-04 16:36:51,171 DEBUG CentrifugeBHO.CentrifugeBHO - dllPath =...
1
1785
by: =?Utf-8?B?RGljaw==?= | last post by:
My Windows Application stores its configuration values in app.config and these are typed and accessed via corresponding classes, something like this... <configSections> <section name="Watcher"/> </configSections> <Watcher> <ClockWatcherCollection> <add Name="Blah"/>
7
10831
by: =?Utf-8?B?RG91Z2llIEJyb3du?= | last post by:
Hi I've written custom configuration section (inherits from System.Configuration.ConfigurationSection) to simplify the contents of the config file and to make life easier when accessing them in code. The configuration section is contained within the exe (it's a simple test case!) and everything works well debugging within the IDE or if the application is deployed on a drive or share that has been granted full trust. For the share the...
2
1357
by: sangam56 | last post by:
Hi all asp.net 2.0 users, I want to send the mail to the users of my system when there is any changes in the database or when i assign any user to the project giving them the information about the changes or asignee. For this first i have to configrue Database mail in the SQL Server 2005. I tried this by going to the SQL Server 2005 Management Studio -> Object Explorer -> Management -> .............but there i donot find the Database mail...
3
4431
by: Lance Wynn | last post by:
Hello, I am receiving this error when trying to instantiate a webservice component. I have 2 development machines, both are XP sp2 with VS 2008 installed. On one machine, the code works fine. On the other machine I get the error upon instantiating the service client. I add the reference by choosing Add Service Reference from the project menu, and pointing to the remote wsdl file. I can't seem to find what the difference between the two...
0
9716
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
9596
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10607
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10104
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
7645
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
6875
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5541
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...
1
4317
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3007
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.