2

I have a problem... nobody else can help so I wonder if anybody here can?

I have a web service project (originally in .NET 2.0 but upgraded to .NET 4.5) which was working perfectly this morning. I also have a Winforms project which connects to the web services.

When building the Winforms app, the build is successful, when running it, I get the error:

An error occurred creating the configuration section handler for applicationSettings/Windows.Main.Properties.Settings: Could not load file or assembly 'Application, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The system cannot find the file specified.

I have looked through SO and other sites but cannot find anything specific that shows the cause of this error. I've tried downgrading the .NET Frameworks and upgrading them again - everything is running on 4.5 - but this fails on:

[global::System.Configuration.ApplicationScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.SpecialSettingAttribute(global::System.Configuration.SpecialSetting.WebServiceUrl)]
[global::System.Configuration.DefaultSettingValueAttribute("http://localhost:53442/ConfigurationService.asmx")]
public string Windows_Main_BnConfigurationService_ConfigurationService {
        get {
            return ((string)(this["Windows_Main_BnConfigurationService_ConfigurationService"]));
        }

I've checked through a load of code but cannot seem to find the cause of the problem.

This will likely be an easy fix for somebody in the know, I'm just not in the know on this error however! HELP?!

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Jonny Wilson
  • 177
  • 4
  • 14
  • have you updated the reference of the web service in win form ? – Mohammad Arshad Alam May 14 '13 at 13:18
  • Sorry - I missed this. Yes I did. I've even removed it and re-added it. In addition, I created a NEW web service in the WS solution, copied across the WebMethod's and references that - still no joy :( – Jonny Wilson May 14 '13 at 13:22
  • you can just delete the old references and add new one – Mohammad Arshad Alam May 14 '13 at 13:24
  • I did that. I originally called it InitialisationService, I deleted this and added a new one called ConfigurationService - which does the same things. The same error occurs. – Jonny Wilson May 14 '13 at 13:27
  • Use Fuslogvw.exe to troubleshoot assembly resolution problems. – Hans Passant May 14 '13 at 13:39
  • I've executed Fuslogvw.exe and got the following: The operation failed. Bind result: hr = 0x80070002. The system cannot find the file specified. Assembly manager loaded from: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clr.dll Running under executable C:\All\Dev\Bn\Client\RealtimeEditor\Desktop\Windows.Main\Windows.Main\bin\Debug\Windows.Main.vshost.exe Later, the log shows a GAC failure: LOG: GAC Lookup was unsuccessful. Is this a .NET framework installation problem? – Jonny Wilson May 15 '13 at 07:20

1 Answers1

0

Fixed! The WebService solution was originally set up on .NET 2.0. This was referenced OK in the Windows.Main app. The WebService framework was subsequently updated to 4.5 but the references in the Windows app didn't update - even after deleting and re-adding them. I've upgraded the web services to WCF and it looks good! Thanks for your input guys!!! It steered me in the right direction! :)

Jonny Wilson
  • 177
  • 4
  • 14