Select to view content in your preferred language

Cannot access ServiceReferences.ClientConfig

921
1
03-01-2012 11:32 AM
Swani_Jesus_Captonsiluvairajan
Occasional Contributor
I am building an Add-in for my silverlight viewer.  My addin references a regular WCF service.  The service works file if I access it in code by using

System.ServiceModel.BasicHttpBinding binding = new System.ServiceModel.BasicHttpBinding();
CIMSServiceClient cimsSvcClient = new CIMSServiceClient(binding, new System.ServiceModel.EndpointAddress("http://localhost:64128/Services/CIMSService.svc"));

but if I use the end point name as in

CIMSServiceClient cimsSvcClient= new CIMSServiceClient("BasicHttpBinding_ICIMSService");

Here is my ServiceReferences.ClientConfig file contents tha tis in the root of the AddIns project "CIMSViewer.AddIns"

<configuration>
    <system.serviceModel>
        <bindings>
            <basicHttpBinding>
                <binding name="BasicHttpBinding_ICIMSService" maxBufferSize="2147483647"
                    maxReceivedMessageSize="2147483647">
                    <security mode="None" />
                </binding>
            </basicHttpBinding>
        </bindings>
        <client>
            <endpoint address="http://localhost:64128/Services/CIMSService.svc"
                binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_ICIMSService"
                contract="CIMSServiceReference.ICIMSService" name="BasicHttpBinding_ICIMSService" />
        </client>
    </system.serviceModel>
</configuration>

It completely fails!  No idea why and there is no error message. [Can't step through code - no breaks point won't be hit - no symbols are loaded ofr this document issue - another nightmare!]

My question is, in the ESRI Silverlight Viewer framework, do we have to place the ServiceReferences.ClientConfig in a particular location?   or do I have to do anything special to read the end point information/

*******EDIT********
Got the break points to work - use IE instead of default chrome !
The error is basiclaly cannot find ServiceReferences.ClientConfig in the Viewer.xap file.  How does this Viewer.xap get generated from the layout.xap and addins.xap files?  How do I add my ServiceReferences.ClientConfig to this xap file?

Thanks for your help,
capton.
0 Kudos
1 Reply
DerekLaw
Esri Esteemed Contributor
Hi Capton,

... How does this Viewer.xap get generated from the layout.xap and addins.xap files?  How do I add my ServiceReferences.ClientConfig to this xap file?


FYI,

Just to close the loop on this thread, Katy - a PE on the Silverlight Viewer Dev team, responded to your similar question in another thread:

How does Viewer.xap File get generated?

Hope this helps,
0 Kudos