7
votes

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?

6
Here's a link to another forum with the same problem, but could this soultion really be the right one. It's not a attractive solution to tell customers... community.sharpdevelop.net/forums/p/8662/24166.aspxkaze
Probably better on serverfault mate. Sure seems like a nasty issue though, machine config on a greenfield XP + .net 3.5 SP1 should be perfeectSpence
I solved it by manually editing the machine.config, in this particular case, it does not matter, but this might be a much bigger issue if customer installations also experience this problem. Further investigations will follow then, if that will be the case.kaze

6 Answers

4
votes

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

1
votes

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.

0
votes

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...)

0
votes

I have same problem, I am using windows xp 64, my resolve is modify machine.config in:

  1. %windir%\Microsoft.NET\Framework\v2.0.50727\Config\machine.config

  2. %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

0
votes

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.

-2
votes

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