none
ExcelMoniker (VBScript) call to WCF service in Kerberos environment . RRS feed

  • Question

  • Hi ,

    Environment :

    ExcelMoniker (VBScript) call to WCF service in Kerberos environment .

    I have some values in the Excelsheet and a Button . On clicking on this button the , the Excel will call the function/method in wcf service . This WCF service in turn will call another Wcf service for the user authentication ( 2nd Hop).

    How can i make Excel client compilant to this.

    For the C# client we can set the Impersonation level. What could be the equivalent code for Excel Cleint.

    WCFBinding : wshttpBinding

    Code Snippet below:

    mexMonikerString = "service:mexAddress=""https://xxxx.mytest. service.svc/mex"""
    
    mexMonikerString = mexMonikerString + ", address=""https://xxxx.mytest. service.svc"""
    mexMonikerString = mexMonikerString + ", contract=""Iservice"", contractNamespace=""ContractNamespace"""
    mexMonikerString = mexMonikerString + ", binding=""WsHttpBinding_Iservice"""
    mexMonikerString = mexMonikerString + ", bindingNamespace=""https://xxxx.mytest. service.svc/Service"""
    
    Set mexServiceMoniker = GetObject(mexMonikerString)
    
    mexServiceMoniker.ChannelCredentials.SetUserNameCredential sUser, "admin"
    
    mexServiceMoniker.CalltoWcfService()

    Please let us know , what are the things to be set before makeing call to the WCF service . Please note : 2 hops will be happening in our environment. Thanks in advance.
    Thursday, February 12, 2015 12:25 PM

Answers

All replies

  • Hi ,

    Environment :

    ExcelMoniker (VBScript) call to WCF service in Kerberos environment .

    I have some values in the Excelsheet and a Button . On clicking on this button the , the Excel will call the function/method in wcf service . This WCF service in turn will call another Wcf service for the user authentication ( 2nd Hop).

    How can i make Excel client compilant to this.

    For the C# client we can set the Impersonation level. What could be the equivalent code for Excel Cleint.

    WCFBinding : wshttpBinding

    Code Snippet below:

    mexMonikerString = "service:mexAddress=""https://xxxx.mytest. service.svc/mex"""
    
    mexMonikerString = mexMonikerString + ", address=""https://xxxx.mytest. service.svc"""
    mexMonikerString = mexMonikerString + ", contract=""Iservice"", contractNamespace=""ContractNamespace"""
    mexMonikerString = mexMonikerString + ", binding=""WsHttpBinding_Iservice"""
    mexMonikerString = mexMonikerString + ", bindingNamespace=""https://xxxx.mytest. service.svc/Service"""
    
    Set mexServiceMoniker = GetObject(mexMonikerString)
    
    mexServiceMoniker.ChannelCredentials.SetUserNameCredential sUser, "admin"
    
    mexServiceMoniker.CalltoWcfService()

    Please let us know , what are the things to be set before makeing call to the WCF service . Please note : 2 hops will be happening in our environment. Thanks in advance.

    Monday, February 9, 2015 11:14 AM
  • You can post to office team.

    Vote if help you

    Wednesday, February 11, 2015 11:17 AM
  • Hi Leenas ANTONY,

    According to the description, you want to call the WCF service in the Excel. As far as I know, there is no such API Excel support to call the WCF service. Excel object model for Excel 2013 support the web service, you can get more detail about it from link below:
    http://blogs.office.com/2013/03/21/use-webservice-functions-to-automatically-update-excel-2013-spreadsheets-with-online-data/

    I also found a article about useing WCF Moniker for your reference:
    Using the WCF Moniker with COM Clients

    I would like to move this thread to Windows Communication Foundation, Serialization, and Networking forum for discusing about WCF moniker.

    Also if you have any issue about using VBA, you can get more effective response from VBA fourm.

    Regards & Fei


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Friday, February 13, 2015 5:24 AM
  • Thanks Fei,

    I do not have office 2013 subscription . Is it possible from office 2010 ? i do not know how to make the call to web service in kerberos environment . 

    My application is working if my webservice is not configured in kerberos authentication , the code i attached above .

    I have seen the below Msdn page

    https://msdn.microsoft.com/en-us/library/ms729739(v=vs.110).aspx

    The possible attributes supported by Excel moniker listed there . Can you please let me know which are all the attributes i need to use so that i can consume the service in kerberos environment.  (There are some option mexSpnIdentity , spnIdentity attributes)

    Normally when the Client is written in .net code , we will configure the serviceprincipal name in the config file for the kerberos authentication. But for Excel , i cant configure it directly.

    Please advise


    Friday, June 19, 2015 10:23 AM
  • Any update please ...
    Tuesday, June 30, 2015 2:12 PM