header1   header
header
header Register : : Login header
header
connector   connector
menuleft menuright
submenu   submenu
left
power shell : System.ServiceModel.OperationContextScope : cannot creat constructor
Last Post 28 Oct 2009 08:00 AM by kk. 0 Replies.
Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
kkUser is Offline
New Member
New Member
Posts:1
Avatar

--
28 Oct 2009 08:00 AM
    I am following the process of creating proxy from the following link

    http://cglessner.blogspot.com/2008/...hell.html/



    Power shell Code for Creating the $proxy:

    $wsdl = Get-WsdlImporter -wsdlUrl "http://myservice/mex"

    $proxyTypes = Get-WcfProxy -wsdlImporter $wsdl

    $address = New-Object System.ServiceModel.EndpointAddress("http://myservice")


    $binding = new-object System.ServiceModel.BasicHttpBinding
    #system.

    $proxy = New-Object $proxyTypes -ArgumentList $binding, $address

    $d = New-Object System.ServiceModel.OperationContextScope($proxy.InnerChannel)



    Error:

    Cannot convert argument "0", with value: "ISetService", for ".ctor" to type "System.ServiceModel.IContextChannel": "Cannot convert "ISetService" to "System.ServiceModel.IContextChannel"."
    At :line:45 char:17
    + $pdc = new-object <<<<  System.ServiceModel.OperationContextScope($proxyLRC.InnerChannel)


    The C# code works fine but when I try to implement it using the power Shell then it fails.

    this may help u.

    Kiran K
    You are not authorized to post a reply.


    Active Forums 4.3
    right
    footer   footer
    footer Sponsored by Quest Software • SAPIEN Technologies • Compellent • Microsoft Windows Server 2008 R2 footer
    footer   footer