Export (0) Print
Expand All

Creating the Account

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.

Follow the instructions in Compiling a Sample to build and run the sample to create the account.

using System;
using System.Net;
using Microsoft.LiveMeeting;

namespace WebSample
{
  class WebSampleClass
  {
    [STAThread]
    static void Main(string[] args)
    {
      try
      {
         LMWebService lmWebService = new LMWebService();
         lmWebService.Url = "https://localhost/LMPortal/LMWebService.asmx";
         lmWebService.Credentials = CredentialCache.DefaultCredentials;

         string lmUserId;
         string name;
         string role;
         string password;
         string welcomePageUrl;
         string windowsId = @"contoso\bill";

         Status outcome = lmWebService.CreateAccount(windowsId, out lmUserId, out name, out role, out password, out welcomePageUrl);
         if (outcome == Status.Success)
         {
            Console.WriteLine("Account created for user " + windowsId);
            Console.WriteLine("lmUserId: " + lmUserId);
            Console.WriteLine("name: " + name);
            Console.WriteLine("role: " + role);
            Console.WriteLine("password: " + password);
            Console.WriteLine("welcomePageUrl: " + welcomePageUrl);
         }
         else
         {
            Console.WriteLine("Account not created for user " + windowsId +
                              " due to error " + outcome);
         }
      }
      catch (Exception ex)
      {
        Console.WriteLine("Exception=" + ex);
      }
    }
  }
}
Show:
© 2014 Microsoft