Problem with Excel Add in WebService Connection in Office 2010 [2] RRS feed

  • Question

  • Same question of but now I guess is in the correct forum...

    Whats up folks ?

    I have a Add in for excel that I made for Excel 2007. Watching out by internet I see that this add in will normally work with Excel 2010.

    This add in use a WebService method for get data from database. 

    Here is the thing, when I start running in Excel 2010 I have this error:

    "Could not find default endpoint element that references contract 'wsDMR.DMRSoap' in the ServiceModel client configuration section. This might be because no configuration file was found for your application, or because no endpoint element matching this contract could be found in the client element."

    I know that this error is related to the endpoint configuration, so theres my code:

            <binding name="DMRSoap" closeTimeout="00:10:00" openTimeout="00:10:00"
              receiveTimeout="00:10:00" sendTimeout="00:10:00" allowCookies="false"
              bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
              maxBufferSize="2147483647" maxBufferPoolSize="9223372036854775807"
              maxReceivedMessageSize="2147483647" messageEncoding="Text" textEncoding="utf-8"
              transferMode="Buffered" useDefaultWebProxy="true">
              <readerQuotas maxDepth="32" maxStringContentLength="2147483647"
                maxArrayLength="2147483647" maxBytesPerRead="4096" maxNameTableCharCount="2147483647" />
              <security mode="None">
                <transport clientCredentialType="None" proxyCredentialType="None"
                  realm="" />
                <message clientCredentialType="UserName" algorithmSuite="Default" />
          <endpoint address="http://vmsqasmo08.DOMAIN*.com/DMRWebService/DMR.asmx" binding="basicHttpBinding"
            bindingConfiguration="DMRSoap" contract="wsDMR.DMRSoap" name="DMRSoap" />

    *please ignore DOMAIN*, my company info is... restricted. And I know this ir right.

    I forget to say that in Excel 2007 the same code works great, but in Excel 2010 (using messagebox to show the error) I see that has a problem with:

    "if (wsDmr == null)

                        wsDmr = new DMRSoapClient();"

    And raise the exception


    at System.ServiceModel.Description.ConfigLoader.LoadChannelBehaviors(ServiceEndpoint serviceEndpoint, String configurationName)

       at System.ServiceModel.ChannelFactory.ApplyConfiguration(String configurationName, Configuration configuration)

       at System.ServiceModel.ChannelFactory.ApplyConfiguration(String configurationName)

       at System.ServiceModel.ChannelFactory.InitializeEndpoint(String configurationName, EndpointAddress address)

       at System.ServiceModel.ChannelFactory`1..ctor(String endpointConfigurationName, EndpointAddress remoteAddress)

       at System.ServiceModel.EndpointTrait`1.CreateSimplexFactory()

       at System.ServiceModel.EndpointTrait`1.CreateChannelFactory()

       at System.ServiceModel.ClientBase`1.CreateChannelFactoryRef(EndpointTrait`1 endpointTrait)

       at System.ServiceModel.ClientBase`1.InitializeChannelFactoryRef()

       at System.ServiceModel.ClientBase`1..ctor()

       at BLOCKEDINFO.ExcelAddIn.DMRRibbon.backgroundWorker1_DoWork(Object sender, DoWorkEventArgs e)


    So, theres anyone have a clue about why its not working in Excel 2010 but in 2007 works well?

    What if has a update, service pack, that make it run...


    Tuesday, June 19, 2012 12:40 PM


All replies