Reputation: 4359
I've installed a clean XP virtual machine for test purposes, only .NET 3.5 SP1 redistributable is applied.
When I try to start our WinForms app, it gives the following exception:
System.Configuration.ConfigurationErrorsException: Configuration system failed to initialize ---> System.Configuration.ConfigurationErrorsException: Unrecognized configuration section system.serviceModel. (C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Config\machine.config line 134)
The app works on other systems, I've never seen this before. What is extra interesting is that it's such clean machine with "only" XP and .NET 3.5 installed. We are not explicitly using WCF in the app either.
I've seen on some forum that they have removed a section from machine.config, but it feels wrong to have to do that on a clean install, there should be a better solution. Any ideas?
Upvotes: 7
Views: 12388
Reputation: 65534
I started to get this problem after uninstalling Oracle Client Drivers and it removed my C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\machine.config!
Copying it from another computer resolved the problem.
Upvotes: 0
Reputation: 418
I have same problem, I am using windows xp 64, my resolve is modify machine.config in:
%windir%\Microsoft.NET\Framework\v2.0.50727\Config\machine.config
%windir%\Microsoft.NET\Framework64\v2.0.50727\Config\machine.config
Content of the machine.config you may see the example here: http://weblogs.asp.net/bhouse/archive/2005/11/10/430270.aspx
Upvotes: 0
Reputation: 3273
Here is a more relevant MS connect issue. I'm amazed MS haven't fixed this yet.
Uninstall 3.5, 3.0 and 2.0 (and any updates) then re-install 3.5. That should do it.
Upvotes: 1
Reputation: 5582
Looks like an installation issue. There is a bug raise on Connect.
http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=323659
This is offical Microsoft recommendation:
In the meantime, you should be able repair your install by running:
"%windir%\Microsoft.NET\Framework\v3.0\Windows Communication Foundation\ServiceModelReg.exe" /r /x
%windir%\Microsoft.NET\Framework\v3.5\WFServicesReg.exe /c
Upvotes: 4
Reputation: 48066
Sounds like an MS config-issue: is the machine otherwise fully patched? Perhaps this got fixed after SP1.
It's certainly unfortunate that you'd need to edit machine.config (I mean, imagine asking a user to do that...)
Upvotes: 0
Reputation: 22984
I think your application is built by using dotnet framework 2, so try to install 2 not 3.5 and check.
C:\WINDOWS\Microsoft.NET\Framework\ v2.0.50727\Config\machine.config line 134
Upvotes: -2