views:

3063

answers:

6

I installed .NET 3.5 SP1 on server which previously had .NET 3.0 SP2.

Before install site was working perfectly. After install and subsequeny server restart, site displays but anything that makes use of the WCF service has stopped working. The exception log reports exceptions like the following when any calls are made to the client proxy:

The communication object, System.ServiceModel.Channels.ServiceChannel, cannot be used for communication because it is in the Faulted state.

The server's application event log gave the following errors after the install:

  • Configuration section system.serviceModel.activation already exists in c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Config\machine.config.

  • Configuration section system.runtime.serialization already exists in c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Config\machine.config.

  • Configuration section system.serviceModel already exists in c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Config\machine.config.

which seems to be inline with the fact that anything WCF related has stopped working.

I am not experienced in server configurations or WCF so looking for any assistance with this.

Thanks!!

From machine.config:

<sectionGroup name="system.serviceModel" type="System.ServiceModel.Configuration.ServiceModelSectionGroup, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
      <section name="behaviors" type="System.ServiceModel.Configuration.BehaviorsSection, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
      <section name="bindings" type="System.ServiceModel.Configuration.BindingsSection, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
      <section name="client" type="System.ServiceModel.Configuration.ClientSection, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
      <section name="comContracts" type="System.ServiceModel.Configuration.ComContractsSection, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
      <section name="commonBehaviors" type="System.ServiceModel.Configuration.CommonBehaviorsSection, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowDefinition="MachineOnly" allowExeDefinition="MachineOnly"/>
      <section name="diagnostics" type="System.ServiceModel.Configuration.DiagnosticSection, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
      <section name="extensions" type="System.ServiceModel.Configuration.ExtensionsSection, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
      <section name="machineSettings" type="System.ServiceModel.Configuration.MachineSettingsSection, SMDiagnostics, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowDefinition="MachineOnly" allowExeDefinition="MachineOnly"/>
      <section name="serviceHostingEnvironment" type="System.ServiceModel.Configuration.ServiceHostingEnvironmentSection, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
      <section name="services" type="System.ServiceModel.Configuration.ServicesSection, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
     </sectionGroup>
     <sectionGroup name="system.serviceModel.activation" type="System.ServiceModel.Activation.Configuration.ServiceModelActivationSectionGroup, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
      <section name="diagnostics" type="System.ServiceModel.Activation.Configuration.DiagnosticSection, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
      <section name="net.pipe" type="System.ServiceModel.Activation.Configuration.NetPipeSection, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
      <section name="net.tcp" type="System.ServiceModel.Activation.Configuration.NetTcpSection, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
     </sectionGroup>

<sectionGroup name="system.runtime.serialization" type="System.Runtime.Serialization.Configuration.SerializationSectionGroup, System.Runtime.Serialization, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
  <section name="dataContractSerializer" type="System.Runtime.Serialization.Configuration.DataContractSerializerSection, System.Runtime.Serialization, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
 </sectionGroup>

from site's web.config

  <sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
  <sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
    <section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" />
    <sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
      <section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="Everywhere" />
      <section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" />
      <section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" />
      <section name="roleService" type="System.Web.Configuration.ScriptingRoleServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" />
    </sectionGroup>
  </sectionGroup>
</sectionGroup>

. . .

<system.serviceModel>
<bindings>
  <wsHttpBinding>
    <binding name="WSHttpBinding_IService" closeTimeout="00:03:00"
      openTimeout="00:03:00" receiveTimeout="00:10:00" sendTimeout="00:03:00"
      bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard"
      maxBufferPoolSize="524288" maxReceivedMessageSize="131072" messageEncoding="Text"
      textEncoding="utf-8" useDefaultWebProxy="true" allowCookies="false">
      <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
        maxBytesPerRead="4096" maxNameTableCharCount="16384" />
      <reliableSession ordered="true" inactivityTimeout="00:10:00"
        enabled="false" />
      <security mode="Message">
        <transport clientCredentialType="Windows" proxyCredentialType="None"
          realm="" />
        <message clientCredentialType="Windows" negotiateServiceCredential="true"
          algorithmSuite="Default" establishSecurityContext="true" />
      </security>
    </binding>       
  </wsHttpBinding>
</bindings>
<client>
  <endpoint address="some address"
    binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_IService"
    contract="some contact" name="WSHttpBinding_IService" />      
</client>

Pertinant Exception Section:

Exception information: Exception type: TypeLoadException Exception message: Could not load type 'System.Web.UI.ScriptReferenceBase' from assembly 'System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.

A: 

Did you rebuild the code using .NET 3.5 SP1 (Visual Studio 2008 SP1)?

Please post the full exceptions, along with stack traces. These might be available in the Application event log, as warnings from source "ASP.NET".


I vaguely remember a bug like this, having to do with the order of the assemblies in the <assemblies> section. Try to put system.core first in the order.

John Saunders
Ganesh R.
yes of course, the application was always built using .net 3.5 sp1. Also all previous dev, build, staging and old production environments had it installed.the site is being moved to new server which needed the update so i ran into the issue after applying the sp to the server. Thanks for reply but still looking for solution?
Doron
the .net runtime version the site is configured to use is 2.0.50727. Just bear in mind that before the install everthing was working fine including all .net 3.0 stuff around WCF etc so the site and server configuration was previosuly correct.
Doron
System.Core is currently listed first in the web.config
Doron
A: 

Well the duplication bits are a red herring, the key is your exception.

System.Web.UI.ScriptReferenceBase is a new assembly in 3.5 SP1. If it's complaining there then the server only has 3.5 installed and needs the service pack applied. Are you 100% you installed 3.5 SP1 on the server?

blowdart
yip i am sure i installed .net 3.5 sp1. It is also listed under Add/Remove Programs.Something went pear shaped during the install which obviously led to those 3 warnings in the app event log which i posted at the top. The warnings were generated during the ServiceModelReg tool doing its thing and i keep thinking this must have something to do with it??I have tried uninstalling and re-installing the sp but no change....
Doron
It does sound like a failed install. Is that assembly actually in the GAC? Browse to C:\Windows\assembly and check the version on System.Web.Extensions, mine shows 3.5.30729.196. I'd be tempted to try a Repair from Add/Remove programs if I were you.
blowdart
mine is 3.5.30729.1 which is SP1 according to http://dzaebel.net/NetVersions.htm so still not sure....
Doron
Bizarre. Try copying the machine.config from you staging server then run IISRESET?
blowdart
ah alas still no change :(
Doron
Does sound like the installation went awry. Run a repair perhaps?
blowdart
sadly repair never worked, tried it multiple times and has no effect....at a real loss with this one.
Doron
A: 

Type load exceptions are tricky sometimes. You might try using Fuslogvw.exe and seeing if you can identify the source of the loading error (what probing paths, etc). Fuslog Documentation

Anderson Imes
A: 

Getting problems when you upload your Ajax Control Toolkit powered website up to your server? Read on for a quick and easy solution! Scenario

If you have added some of the Ajax Control Toolkit extenders into your website you will have probably tested them out on your local dev computer and marvelled at how easy it was to add some impressive eye candy to your site. Then, just when you think your work is done for the day and its time to put your new creation online you are hit with an error:

Could not load type 'System.Web.UI.ScriptReferenceBase' from assembly 'System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.

Well you don't need to worry too much because this time it is a really simple fix. Quick Fix

If your site has just broken and you want to get it running quickly then the simplest solution is to change your tag to be just a plain tag.

The ToolkitScriptManager is a wrapper control which provides the features of ScriptManager but also has a script combining feature to reduce the number of external javascript references generated by the toolkit.

So its as simple as taking your code

and changing it to

(You might have a different prefix than cc1 but it doesn't matter). The Real Fix

The real reason that your site is throwing the error is that the latest version of Ajax Control Toolkit expects to have a .net 3.5 SP1 runtime environment. The key bit here is the SP1 which means Service Pack 1.

To fix it you simply need to install the SP1 release which can be downloaded from here:

* http://www.microsoft.com/downloads/details.aspx?familyid=ab99342f-5d1a-413d-8319-81da479ab0d7&amp;displaylang=en

This needs to be run on your server so you will need remote desktop access to do this. This kind of control over your server is typically only available with dedicated servers or VPS virtual servers.

If you have a simple shared hosting package then you need to contact your web host and find out why they haven't upgraded yet. The SP1 release was a major upgrade which not only has many bug fixes included in it but also some great new features such as ASP.NET Dynamic Data. You can read all about the new features on the download link above.

In the worst case scenario where you cant get your host to upgrade and you cant move hosts because you are locked into a contract with them then you can at least fall back on the quick fix listed in the middle of this article to get your site running again.

Uday Rane
A: 

If you're hosting the WCF service in IIS, which it sounds like you might be, try re-running the asp.net IIS registration tool.

C:\Windows\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis -i

I vaguely remember having a similar problem way back when we upgraded, and iirc, this was the fix. I know it makes little sense, but try it anyway. It won't break anything, at least.

Chris
A: 

Installing DotNet framework 3.5 SP1 fixed the issue.

-Bhaskar "It is wour wits that make us men" www.bhaskartripathi.com

bhaskar