title: WF 4 service on IIS 7 with Platform Update 1 throwing an exception when targetFramework is set to 4.0.1
body: <p>I installed a workflow service in IIS 7 on a windows server 2008 R2 version with the new Platform Update 1 and I get this error below in the event log.  </p>
  
  <p>I found someone had a similar problem <a href="http://connect.microsoft.com/VisualStudio/feedback/details/663837/net-4-platform-update-1-cant-deploy-wcf-service-iis-with-installed-platform-update-on-server#details" rel="nofollow">here</a>.  But, I was forced to change this: targetFramework="4.0.0" and then everything seems to be working.  </p>
  
  <p>But the question is now: is this set up correctly, now or should I have done something else?  </p>
  
  <p>Any help would be greatly appreciated.</p>
  
  <pre><code>There was an error during processing of the managed application service auto-start for configuration path: 
  'MACHINE/WEBROOT/APPHOST/SiteName/Service'. The error message returned is: 'An initialization error occurred while trying to preload an application.
  
  Exception: System.Configuration.ConfigurationErrorsException
  
  Message: The 'targetFramework' attribute in the &lt;compilation&gt; element of the Web.config file is used only to target version 4.0 and later of the .NET Framework (for example, '&lt;compilation targetFramework="4.0"&gt;'). The 'targetFramework' attribute currently references a version that is later than the installed version of the .NET Framework. Specify a valid target version of the .NET Framework, or install the required version of the .NET Framework. (C:\MySite\MyService\web.config line 68)
  
  StackTrace:    at System.Web.Compilation.MultiTargetingUtil.ValidateTargetFrameworkMoniker(String targetFrameworkMoniker)
     at System.Web.Compilation.MultiTargetingUtil.InitializeTargetFrameworkName()
     at System.Web.Compilation.MultiTargetingUtil.EnsureFrameworkNamesInitialized()
     at System.Web.Compilation.BuildManager.Initialize()
     at System.Web.Compilation.BuildManager.InitializeBuildManager()
     at System.Web.HttpRuntime.HostingInit(HostingEnvironmentFlags hostingFlags, PolicyLevel policyLevel, Exception appDomainCreationException)'.  The worker process will be marked unhealthy and be shutdown.  The data field contains the error code.
  </code></pre>