Connecting WebsitePanel Server API from third party application RRS feed

  • Question

  • Hi!


    I have a WebsitePanel Server (v 1.1) installed in a server with IIS and i want to connect to this service from a local application in c#.


    First of all i added in my Visual Studio project the web service reference pointing to http://X.X.X.X:9003/webserver.asmx and i can load the library without problems.


    Then, when i try to get all the sites in this server (using the method GetSites()), i get the following error:

    "Message did not meet security requirements."


    I know i have to specify the password of the server but i dont know how.


    NOTE: I'm interested to connect directly to Website Server no through Website Enterprise Server.



    Friday, January 21, 2011 5:39 PM

All replies

  • Hi there,
    So, the message you are getting means you have not provided the password to connect to the server but this is not the only thing for you to consider. WebsitePanel Server (and the rest of components) uses Web Services Enhancements 3.0 (WSE 3) library to secure and leverage communication reliability between the parties, it means all incoming messages are encrypted with the password, either a user’s (Enterprise Server node) or server’s (Server node) one.
    You have a couple options here to choose from (depending on your development/deployment needs):
    • Call WSP Server’s SOAP API securely with WSE 3 enabled (via pre-configured WSE-aware client proxy);
    • Call WSP Server’s SOAP API unsecurely without WSE 3 enabled (via SOAP API endpoint generated by VS.NET/wsdl.exe);
    To call WSP Server’s SOAP API endpoint securely (WebServer.asmx in your case), you should configure the endpoint first prior using it via WebsitePanel.Server.Client.ServerProxyConfigurator :: Configure method (see a sample code snippet below):
    using WebsitePanel.Server.Client;
    WebServer proxy = new WebServer();
    // This is the place where WSE-aware client proxy pre-configuration actions happen (but not the only one)
    ServerProxyConfigurator cnfg = new ServerProxyConfigurator();
    // set URL & password
    cnfg.ServerUrl = “”;
    cnfg.ServerPassword = “password”;
    // configure proxy!
    // now you can call any method you like securely
    string[] sites = proxy.GetSites();
    To call WSP Server’s SOAP API endpoint unsecurely (WebServer.asmx in your case), you should just disable password security check in Web.config file:
    <!-- WebsitePanel Configuration -->
            <!-- Security settings -->
                <!-- Perform security check -->
                <enabled value="false"/>
                <!-- Server password –>
                .... skipped ...
    Hope this helps.
    P.S. Please do not expect other methods of the web service to work properly in either case when communicate to it directly as you might have noticed, either IIS v6 or v7 service providers require a lot of settings to be set before to call any methods. See Enterprise Server’s ServiceProviderProxy class for further details. Thanks.

    Please vote, if you find a post helpful! Appreciate.
    Friday, January 21, 2011 8:53 PM
  • Hi Pavel,


    thanks for your reply, it's working fine for me :-)


    I only had to add the following code to specify the provider:

    // get provider
          cnfg.ProviderSettings.ProviderGroupID = 1;
          cnfg.ProviderSettings.ProviderCode = "IIS60";
          cnfg.ProviderSettings.ProviderName = "Internet Information Services 6.0";
          cnfg.ProviderSettings.ProviderType = "WebsitePanel.Providers.Web.IIs60, WebsitePanel.Providers.Web.IIs60";

    We want create a reduced version of EnterpriseServer to manage our servers directly without use websitepanel portal.


    Do you think we find many problems to develop this project?


    Thanks for all! :)

    Monday, January 24, 2011 11:50 AM
  • Hi Victor,
    My pleasure, you are always very welcome! Naturally, you should not expect any issues with developing a reduced version of Enterprise Server because the component project has a very solid code base that can be used as a complete guidance how to achieve almost any kind of functionality. However, in case if you encounter any issues, please do not hesitate to ask your questions on forums.

    Please vote, if you find a post helpful! Appreciate.
    Monday, January 24, 2011 7:20 PM