473,232 Members | 1,504 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,232 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 5285

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: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...

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.