WCF/WF - evn though by keeping usn nn password NULL >>>errors

Asked By praveen pubby on 09-Jan-11 11:27 PM
can any one plzz check it out ..!!! it ws asking set service login ..!!! username and password
namespace Transports
{
    partial class ProjectInstaller
    {

      /// <summary>
      /// Required designer variable.
      /// </summary>
      private System.ComponentModel.IContainer components = null;

      /// <summary>
      /// Clean up any resources being used.
      /// </summary>
      /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
      protected override void Dispose(bool disposing)
      {
        if (disposing && (components != null))
        {
          components.Dispose();
        }
        base.Dispose(disposing);
      }

      #region Component Designer generated code

      /// <summary>
      /// Required method for Designer support - do not modify
      /// the contents of this method with the code editor.
      /// </summary>
      private void InitializeComponent()
      {
        this.serviceProcessInstaller1 = new System.ServiceProcess.ServiceProcessInstaller();
        this.serviceInstaller1 = new System.ServiceProcess.ServiceInstaller();
        //
        // serviceProcessInstaller1
        //
        this.serviceProcessInstaller1.Password = null;
        this.serviceProcessInstaller1.Username = null;
        //
        // serviceInstaller1
        //
        this.serviceInstaller1.Description = "importing files";
        this.serviceInstaller1.DisplayName = "pubbyservice";
        this.serviceInstaller1.ServiceName = "Service1";
        //
        // ProjectInstaller
        //
        this.Installers.AddRange(new System.Configuration.Install.Installer[] {
        this.serviceProcessInstaller1,
        this.serviceInstaller1});

      }
    

     


      #endregion

      private System.ServiceProcess.ServiceProcessInstaller serviceProcessInstaller1;
      private System.ServiceProcess.ServiceInstaller serviceInstaller1;
    }
}
Indranil Chatterjee replied to praveen pubby on 11-Jan-11 06:24 AM
Even if you set UserName and Password to null, it will prompt for user during installation because the ServiceProcessInstaller.Account property is set to User by default which says that it should run under some user account. To avoid user name prompts, set ServiceProcessInstaller.Account property to any one of LocalService, NetworkService  or LocalSystem.

To understand about the security previledges and access rights for each of these account options, check this link:
http://msdn.microsoft.com/en-us/library/system.serviceprocess.serviceaccount.aspx