web.config to app.config issues...

Can I use a custom config section found in a web.config file in a app.config file?

Something like this:

<section name="CS" type="CSSection, __code"/>

<CS defaultConnectionStringName="LocalSqlServer">
<Commands providerType="DAL.SqlClient.SqlCommandsProvider" />
I have tried it and .net doesn't seem to like it, producing and error something like this
"An error occurred creating the configuration section handler for CS: Could not load file or assembly '__code' or one of its dependencies. 
The system cannot find the file specified. (C:\cs\CS_Service\bin\Debug\cs_service.exe.config line 7)" 
...any ideas why? 
6/5/2007 7:34:13 AM
asp.net.config-deploy 12495 articles. 0 followers. Follow

1 Replies

Similar Articles

[PageSpeed] 25
Get it on Google Play
Get it on Apple App Store

I assume that you are using .NET Framework 2.0 or later.

 <section name="CS" type="CSSection, __code"/>
 Here type will be complete class name i.e Complete namespace plus class name and it's version details ...
 default is Complete  class name. This class should be inherited from System.Configuration.ConfigurationSection.
i.e basically it will be Handler class for your config file, then you can able to remove this type of error.

If you want to help to write such type of handler class please let me know.



Ziaul Haque
Capgemini, Pune

NB: Mark as Answer if above satisfies you.
6/5/2007 10:30:12 AM

Similar Artilces:

Need to put this in a web.config file. Transfer a collection from app.config to web.config.
<!--<setting name="Groups" serializeAs="Xml"> <value> <ArrayOfString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <string>GL CA Corporate Data</string> <string>GL CONT Contractors</string> <string>GL IT SolutionDelivery</string> </ArrayOfString> </value> </setting>-->   I need to put this in the below web.config.<?xml version="1.0"?><!-- Note: As an alternative to hand editing this fi...

app.config and web.config deployments and installers
I use web deployment projects for changing web.config values based on the configuration build types I have setup (dev/test/stage/prod) and it works excellent for building installers in multiple environments.  Now, I am trying to do the same the Windows Applications.  How can I automate the changing of app.config values based on the build configuration (dev/test/stage/prod)?  Any help would be much appreciated. Thanks,Chris...

Read info from web.config, machine.config, app.config....
I know how to read info from the web.config, see code:  Protected path As String = "/Framework" Protected config As Configuration = WebConfigurationManager.OpenWebConfiguration(path) How can I read also the data from machine.config and other config files, like the app.configs?Johan TheunissenMCPD, MCSE, MCTS BizTalk 2006==============================Please mark the most helpful reply/replies as "Answer". ...

App.config to Web.config
I have been running a console app, to process a paypal payment.  The code gets a value from the app.config file. <add key="PAYFLOW_HOST" value="payflowpro.paypal.com" /> However I have now incorporate the code into a web application and put the key into my web.config file, will the code now know to look for this key in this place? If your code is getting the value from your config file using ConfigurationManager.AppSettings["PAYFLOW_HOST"] then it should use the correct config file automatically.  Console apps, windows services and wind...

I have setup custom config sections. I need to know how to loop through a configuration group and get all of the config sections in that group. Thanks could you post an example of what you have Trey Exactly, your question is not clear at all. Regards.Bilal Hadiar, MCP, MCTS, MCPD, MCTMicrosoft MVP - Telerik MVP...

Hello!! I'm development a web application in n-tiers. The UI have a web.config, and the other tiers using app.config. The problem is that the application doesn´t recognize the app.config files. Only the web.config of the UI. For example: I try to put the connections string in a app.config in the data access, but when it runing, throws a error that says: "Database undefined". But when I put the connections strings in the web.config, it runing well. I need help!!!Alvaro HdezDeveloper To use xml atributes from WebConfig and AppConfig u must add referance to System...

How do I merge web services' app.config with web app's web.config? Help!!
I have a web application project that uses a separate class library containing web service references (service layer). I want to be able to configure the web reference URLs dynamically and I know you can set this up by setting the URL behavior to  'Dynamic', etc, etc. The problem is VS2005 puts the URLs in the project's app.config file. When the class library becomes a DLL component, I have no way of accessing the app.config file.Is there a way to make the web reference project to look for the URLs in the web.config instead of its app.config? Or is there a way to merge this app.config w...

.NET 2.0 encryption web.config/app.config options?
Situation: 13 servers containing both ASP .Net web sites and .NET apps. Servers are broken up in Developemnt, Test, and Production types.Issue: Need to encrypt all app.config and web.config files.Currently we are using .NET 1.1, so I had developed (test working, not yet deployed) a shared (GAC) utility that would be responsible for providing an interface to allow the encryption (DPAPI + Second Entropy) of information for the developer to manually place in each web.conf/app.config file during development. The backend of this utility was referenced by the *.config files in decrypting values on...

running 2 web.configs in the same website 1 in /web.config and one in /swf/web.config
Im having issues doing this. and when i remove the authentication from the swf/web.config it still doesnt seem to be applying to the child website at all. Whats the proper way to set a child website? Thanks!!  The lower most web.config overrides all previous settings. So if you remove the section from the /swf/web.config whatever settings you have in the web.config in the next higher level will have an effect on the content of the child folder.So instead of removing a section, try giving appropriate settings in the /swf/web.config....

app.config and web.config problems
Hi all, I've structured my application in the following way.:1. I've created a library project (.dll) with the BLL and DAL (built using the DataSet VS 2005 designer), at this moment I was asked to put the connection string inside of an app.config file (decrypted).2. In a second project (Web Application) I've put a reference for the .dll mentioned above.3. When I ran the web project for the first time I've got an error indicating that the .dll didn't find the connectionstring used to build the DAL so after some tips I performed a "copy and paste" from app.config...

web.config and app.config in VS2005
Hi thereI'm new to web programming. I'm using asp.net 2.0(vb.net) in Visual Studio 2005. When writing windows applications I use app.config to store string constants. I simply Right click on my project name in Solution Explorer and choose properties. Then I click Settings and type in the name of the constant, type = string, scope = application, the value and I could retrieve it in any form or class of the project using My.Settings.sConstant.How can I do that in web applications using web.config?thanks    Add the following, of course with your own constants: undefinedappSett...

app.config & web.config
I have a solution file which includes DAL project,BLL and web project. my web application is using web.config for connection string and DAL is using app.config and it makes problem for me when I publish the web site. because every time I wanna to change the connection I have to republish the web site. I was wondering is there any way that app.config or even my datasets in DAL get the connection string from web.config file? I googled it but i didn't find any good soloutions. Thanks.      Friend, you can use the connection string specified in the Web.Config itse...

web.config vs app.config
So, I'm building a composite control that has 3 web references I dynamically set in the Settings/app.config file.  What I'm looking for is a way to allow the consuming developer to edit the URLs in design-time.  However, I can't seem to get to the configuration of my compiled DLL.  Can anyone suggest a way, using code or web.config or whatever, that will allow me to do this?Chris StewartCompiledMonkey.com Anyone?Chris StewartCompiledMonkey.com Look at your generated proxies (from wsdl.exe or WS add web reference feature, which are basically the same). You should be able to...

is web.config the equivalent to app.config
is app.config only for winforms,  can a webservice for example have a  app.config http://www.dotnetspider.com/qa/Question21.aspxIf my reply helps answer your question then please mark as answer. web.config is the equivalent. You cannot have an app.config for web forms. Only machine.config and web.config...

Web resources about - web.config to app.config issues... - asp.net.config-deploy

Proxy auto-config - Wikipedia, the free encyclopedia
Computer operating systems (e.g., Microsoft Windows , Mac OS X , Linux ) require a number of settings to communicate over the Internet . These ...

Platform Updates: New Industry Pages, Refreshed Services Status Page, and New Parse Config Dashboard
Platform Updates: New Industry Pages, Refreshed Services Status Page, and New Parse Config Dashboard

App Config for Android - YouTube
Free version: https://play.google.com/store/apps/details?id=fi.aarosoft.appconfig.free Full version: https://play.google.com/store/apps/deta ...

HP unveils cloud config manager
HP this week unveiled a network virtualization system for large enterprise and cloud providers designed to simplify network configuration.

China configs 'firewall' against official meddling in judicial cases
China configs 'firewall' against official meddling in judicial cases

Group criticizes Apple’s removal of IPv6 in Airport config tool
Back in January of this year Apple released AirPort Utility 6.0 , an updated version of the configuration tool for setting up home networks and ...

System Software: Configs for Mac 128K, XL, 512, & 512KE (7/94)
Macintosh 128K Currently ships with: Product no longer available. Supports: System 2.0 and Finder 4.1. Recommended: System 2.0 and Finder 4.1. ...

Free 32GB Apple TV and $60-$111 discounts on iMac 4Ks & iMac 5Ks, plus $150 coupons on all custom configs ...
Whether you want a free Apple TV plus discounts, a free AppleCare extended protection plan plus discounts, or just the lowest prices anywhere ...

Dell releases updated XPS-13 Developer Edition in wide variety of configs
... is available immediately in North America and Europe. According to Dell’s announcement blog post , there is a wide variety of possible configurations ...

Config error at Boston-area hosting company takes down Reddit, others
... hosting provider briefly knocked several large services and websites dependent on Amazon and AWS offline on Tuesday night, thanks to a configuration ...

Resources last updated: 2/12/2016 7:39:59 PM