Quantcast
Channel: VMware Communities : All Content - vSphere Management SDK
Viewing all articles
Browse latest Browse all 1860

Error in SSOConnect method - 'Vim25Api.VimService' does not contain a definition for 'SetPolicy'

$
0
0

Downloaded the latest build VMware-vSphere-SDK-5.5.0-1284541.zip from here

 

Made sure vCenter server version is 5.5 and local vSphere Client 5.5 is connecting to host with no issues.

 

Followed the instructions to create the following using Visual Studio 2008 command prompt

a. STSService.cs and dll

b. Vim25Service and VimService

 

The samples does not compile with the following error in the SSO Connect method in SvcConnection.cs in AppUtil project.

Error message:

'Vim25Api.VimService' does not contain a definition for 'SetPolicy' and no extension method 'SetPolicy' accepting a first argument of type 'Vim25Api.VimService' could be found (are you missing a using directive or an assembly reference?)   

File C:\Temp\VMware-vSphere-SDK-5.5.0-1284541\SDK\vsphere-ws\dotnet\cs\samples\AppUtil\SvcConnection.cs   

Line 263    Column 22    Project AppUtil

 

Here is method that

     public void SSOConnect(XmlElement token, string url)

        {

            if (_service != null)

            {

                Disconnect();

            }

 

            _service = new VimService();

            _service.Url = url;

            _service.Timeout = 600000; //The value can be set to some higher value also.

            _service.CookieContainer = new System.Net.CookieContainer();

          .

          .

          .

            //Setting up the security policy for the request

            Policy policySAML = new Policy();

            policySAML.Assertions.Add(customSecurityAssertion);

 

            // Setting policy of the service

           _service.SetPolicy(policySAML);

 

            _sic = _service.RetrieveServiceContent(_svcRef);

          .

          .

          .

     }


Appreciate any help in resolving this issue.


Viewing all articles
Browse latest Browse all 1860

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>