locked
Connecting to WSP API using VB.net RRS feed

  • Question

  • I am trying to connect to the API using VB.net.  Here is the code I am working with.  I have already turned off windows authentication and enabled basic authentication for WebsitePanelEnterpriseSever.  I get an error stating that "you are unable to access this account".  If I change my password to a value that is invalid, I receive a different error stating that the credentials are incorrect.  Please help or tell me where I can find more detailed docuemntation of the API, the document that I downloaded from the site does not provide any detailed information.

    Thanks in advance.

    Here is the VB.net code followed by the error.

    Imports System.Web.Services
    Imports Microsoft.Web.Services3
    Imports WebsitePanel.EnterpriseServer
    Partial Class FindingTheXFactor
      Inherits BasePage
      Private _esUsers As New esUsers()
      Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Test()
      End Sub
      Public Sub Test()
        ' Set up connection to the WebsitePanel server
    
        'Try
        Dim configurator As New EnterpriseServerProxyConfigurator() With {
            .EnterpriseServerUrl = "http://98.196.105.111:9002",
            .Username = "serveradmin",
            .Password = "password"
            }
        configurator.Configure(_esUsers)
    
        _esUsers.GetUsersSummary(3)
    
    
      End Sub
    End Class

    Server Error in '/' Application.

     

    Server was unable to process request. ---> You are not allowed to access this account

     

    Line 19:     configurator.Configure(_esUsers)
    Line 20: 
    Line 21:     _esUsers.GetUsersSummary(3)
    Line 22: 
    Line 23: 


    Source File: C:\Inetpub\wwwroot\FTX\websitepaneltest.aspx.vb Line: 21

    Stack Trace:

    [SoapException: Server was unable to process request. ---> You are not allowed to access this account]
      System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall) +1513512
      System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) +221
      WebsitePanel.EnterpriseServer.esUsers.GetUsersSummary(Int32 userId) +68
      FindingTheXFactor.Test() in C:\Inetpub\wwwroot\FTX\websitepaneltest.aspx.vb:21
      FindingTheXFactor.Page_Load(Object sender, EventArgs e) in C:\Inetpub\wwwroot\FTX\websitepaneltest.aspx.vb:8
      System.Web.UI.Control.OnLoad(EventArgs e) +91
      System.Web.UI.Control.LoadRecursive() +74
      System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2207
    

     


    Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1

    Saturday, August 20, 2011 8:36 PM