Wrong Reference.cs

Aug 2, 2010 at 2:34 PM

Dear Sir,

I got the issue when generating service reference "Reference.cs" with WCFExtras. 

I have a service A, at the configuration file od Service A, I added:

 <extensions>
      <behaviorExtensions>
        <add name="wsdlExtensions" type="WCFExtras.Wsdl.WsdlExtensionsConfig, WCFExtras, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"/>
      </behaviorExtensions>
</extensions>

..

<endpointBehaviors>
        <behavior name="FlattenWSDLEndpointBehavior">
          <wsdlExtensions singleFile="True"/>
        </behavior>
</endpointBehaviors> 

Now I use another application to add service refernce to service A, I get wrong "Reference.cs"". I can not compile thsi file.

But when I remove using WCFExtras from web service configuration file, my application runs well, without conpeling error.

Could you mind helping me how to fix this issue?

Thanks and Regards,

Tran 

  

Sep 16, 2010 at 12:05 PM

I had the same problem and I could solve it by signing WCFExtras.dll, put that into the GAC (gacutil.exe), copying the signed DLL also into C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\PublicAssemblies and then replacing the formerly reference in my service to the one now out from GAC. Also you've got to give the PublicKeyToken in the <behaviorExtensions> according to the publicKex produced by your signing.

Regards

 

Dietmar