Click here to Skip to main content
Rate this: bad
Please Sign up or sign in to vote.
See more: C# ASP.NET IIS Web Services
This is the first small web application I have built. What it does is create a XML file from data in Oracle. The file is created properly and it then will use a web service already created to submit the file for processing.
I have never published to IIS 7.0 before but I followed the directions I found here and got it running.
The problem is when it is submitted with the web service.
I get the following error:

System.Configuration.ConfigurationErrorsException: An error occurred creating the configuration section handler for applicationSettings/WebApplication.Properties.Settings: Could not load file or assembly 'System, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The system cannot find the file specified. (C:\inetpub\wwwroot\MTC_UPLOAD\web.config line 9) ---> System.IO.FileNotFoundException: Could not load file or assembly 'System, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The system cannot find the file specified.
File name: 'System, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089'
at System.Configuration.TypeUtil.GetTypeWithReflectionPermission(IInternalConfigHost host, String typeString, Boolean throwOnError)
at System.Configuration.RuntimeConfigurationRecord.RuntimeConfigurationFactory.Init(RuntimeConfigurationRecord configRecord, FactoryRecord factoryRecord)
at System.Configuration.RuntimeConfigurationRecord.RuntimeConfigurationFactory.InitWithRestrictedPermissions(RuntimeConfigurationRecord configRecord, FactoryRecord factoryRecord)
at System.Configuration.RuntimeConfigurationRecord.RuntimeConfigurationFactory..ctor(RuntimeConfigurationRecord configRecord, FactoryRecord factoryRecord)
at System.Configuration.RuntimeConfigurationRecord.CreateSectionFactory(FactoryRecord factoryRecord)
at System.Configuration.BaseConfigurationRecord.FindAndEnsureFactoryRecord(String configKey, Boolean& isRootDeclaredHere)
WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
--- End of inner exception stack trace ---
at System.Configuration.BaseConfigurationRecord.FindAndEnsureFactoryRecord(String configKey, Boolean& isRootDeclaredHere)
at System.Configuration.BaseConfigurationRecord.GetSectionRecursive(String configKey, Boolean getLkg, Boolean checkPermission, Boolean getRuntimeObject, Boolean requestIsHere, Object& result, Object& resultRuntimeObject)
at System.Configuration.BaseConfigurationRecord.GetSection(String configKey, Boolean getLkg, Boolean checkPermission)
at System.Configuration.BaseConfigurationRecord.GetSection(String configKey)
at System.Web.HttpContext.GetSection(String sectionName)
at System.Web.Configuration.HttpConfigurationSystem.GetSection(String sectionName)
at System.Web.Configuration.HttpConfigurationSystem.System.Configuration.Internal.IInternalConfigSystem.GetSection(String configKey)
at System.Configuration.ConfigurationManager.GetSection(String sectionName)
at System.Configuration.ClientSettingsStore.ReadSettings(String sectionName, Boolean isUserScoped)
at System.Configuration.LocalFileSettingsProvider.GetPropertyValues(SettingsContext context, SettingsPropertyCollection properties)
at System.Configuration.SettingsBase.GetPropertiesFromProvider(SettingsProvider provider)
at System.Configuration.SettingsBase.GetPropertyValueByName(String propertyName)
at System.Configuration.SettingsBase.get_Item(String propertyName)
at System.Configuration.ApplicationSettingsBase.GetPropertyValue(String propertyName)
at System.Configuration.ApplicationSettingsBase.get_Item(String propertyName)
at WebApplication.Properties.Settings.get_WebApplication_CertificateServ1_ServiceInterface() in C:\Users\60041724\Desktop\SVN WEB\WebApplication\Properties\Settings.Designer.cs:line 33
at WebApplication.CertificateServ1.ServiceInterface..ctor() in C:\Users\60041724\Desktop\SVN WEB\WebApplication\Web References\CertificateServ1\Reference.cs:line 38
at WebApplication._Default.btnUpload0_Click(Object sender, EventArgs e) in C:\Users\60041724\Desktop\SVN WEB\WebApplication\Default.aspx.cs:line 87
Any help would be greatly appreciated as I have no idea if I am publishing correct.
Posted 17-Apr-12 5:16am

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

You need to install .Net 4, register it with your IIS and then change the app pool your application is to .Net 4.
Here is a helpful link thats very simple and to the point:[^]
The other option is, compile it in .Net 2, but I dont recommend that!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Advertise | Privacy | Mobile
Web02 | 2.8.141022.2 | Last Updated 17 Apr 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100