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

System.TypeLoadException Could not load type System.Configuration.SingleTagSectionHandler

This is interesting, I have attached my web.config file and the
exception I have been logging. I created a library which provide data
access to a database and a control system. The library is written in
C#. I created a small .exe file to test that the library builds
propertly from configuration and that it communicates properly. This
work great in the System.Windows.Forms. However, when I use the
library in a web enviroment things don't go so well. I copy the
unique instruction in the app.config file the the web.config file.
Bellow is the exception generated, essentially the system crashed when
it tries to load Systetem.Configuration.SingleTagSectionHandler which
I used in the web.config & app.config file.

Now WHY does the config file work in a desktop app enviroment and when
in a web enviroment I get problems! Any suggestions on how to fix the
problem would be much appreciated.

I am using the 1.1 version on the Framework.

The following is the exception which I log :

Exception: System.Configuration.ConfigurationException
Message: Exception creating section handler.
(c:\inetpub\wwwroot\VBTestSorter\web.config line 7)
Source: System.Web
at System.Web.Configuration.HttpConfigurationRecord.G etFactory(String
configKey)
at System.Web.Configuration.HttpConfigurationRecord.E valuate(String
configKey, SectionRecord section)
at System.Web.Configuration.HttpConfigurationRecord.G etConfig(String
configKey, Boolean cacheResult)
at System.Web.Configuration.HttpConfigurationRecord.G etConfig(String
configKey, Boolean cacheResult)
at System.Web.HttpContext.GetConfig(String name)
at System.Web.Configuration.HttpConfigurationSystemBa se.System.Configuration.IConfigurationSystem.GetCo nfig(String
configKey)
at System.Configuration.ConfigurationSettings.GetConf ig(String
sectionName)
at Hinz.WeyerChem.Sorter.DataAccessLayer.Database.tab les.LoadLotDAL.Initialize()

Nested Exception

Exception: System.TypeLoadException
Message: Could not load type
System.Configuration.SingleTagSectionHandler from assembly System.Web,
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a.
Source: mscorlib
at System.Type.GetType(String typeName, Boolean throwOnError)
at System.Web.Configuration.HttpConfigurationRecord.G etFactory(String
configKey)


This is an example of my web.config file :

<configSections>
<sectionGroup name="Sorter">
<section name="connectionString"
type="System.Configuration.SingleTagSectionHandler " />
<section name="sp_prefix"
type="System.Configuration.SingleTagSectionHandler " />
<section name="sp_sufix"
type="System.Configuration.SingleTagSectionHandler " />

</sectionGroup>
<section name="log4net"
type="log4net.Config.Log4NetConfigurationSectionHa ndler,log4net" />
</configSections>

<Sorter>
<connectionString dsn="server=SQL-01;uid=sa;pwd=password;database=SorterUpgrade"
/>
<sp_prefix insert="sp_Insert_" delete="sp_Remove_"
update="sp_Update_" select="sp_Select_" />
<sp_sufix destination="Destination" gradebutton="GradeButton"
gradename="GradeName" button="Button" lot="Lot"
nomThck="NominalThickness" nomWid="NominalWidth"
recalc="RecalcLength" run="Run"
wndThck="ThicknessWindow" wndWid="WidthWindow" master="MasterSort"
sort="Sort"
mastersort_sort="MasterSort_Sort" status="Status" state="State"
species="Species"
catThk="ThicknessCategory" catWid="WidthCategory"
pctWid="WidthCategroyPCT"
catLen="LengthCategory" pctLen="LengthCategoryPCT"
catGrd="GradeCategory"
pctGrd="GradeCategoryPCT"/>
</soreter
<log4net>

......
</log4net>
Nov 17 '05 #1
0 5291

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

Similar topics

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...
0
by: Softer | last post by:
Hi I have been installed Longhorn, alfa version from PDC 2003. I tryed to install Visual Studio 8.0 "Whidbey", version Beta March 2004, under Longhorn and doesen't work. : I instaled Whidbey under...
2
by: Eli Block | last post by:
When getting a type from a dynamically loaded assembly using Assembly.GetType, I receive the following exception: An unhandled exception of type 'System.TypeLoadException' occurred in...
0
by: Greg Bacon | last post by:
I have two C# projects: a production project and NUnit tests for it. I've recently added a test that causes a call into a registered COM component, and now the test fails with a TypeLoadException...
0
by: Pierre-Alain Vigeant | last post by:
Hi, I'm getting a TypeLoadException inside an object that is located in a DLL that is dynamically loaded. I have this main program "main.exe" that dynamically load "main.dll" using o =...
1
by: Tom | last post by:
Having some trouble with my assembly running another assembly, and I am starting to suspect this may be a windows bug or a framework bug. Everything works fine on my development workstation (XP...
2
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...
2
by: Jeff | last post by:
Hey asp.net 2.0 My asp.net 2.0 project has got a assembly load problem: Some of my web.config settings: <membership defaultProvider="AH_MembershipProvider" userIsOnlineTimeWindow="15">
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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,...
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
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...
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,...

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.