コード例 #1
0
 /// <summary>The deploy.</summary>
 /// <param name="enableWin32Mode">The enable Win 32 Mode.</param>
 internal void Deploy(bool enableWin32Mode = false)
 {
     try
     {
         this.Pool         = new IisApplicationPool(this.PoolName, enable32BitAppOnWin64: enableWin32Mode);
         this.WebSite      = new IisWebSite(this.WebSiteName, this.AppFolder, this.Port, this.Pool);
         this.ExternalCall = string.Format("http://localhost:{0}/ExternalCalls.aspx", this.Port);
         this.IsFirstTest  = true;
         if (Directory.Exists(this.AppFolder))
         {
             ACLTools.GetEveryoneAccessToPath(this.AppFolder);
         }
     }
     catch (Exception ex)
     {
         Trace.TraceError("Exception occured while attempting to deploy application {0}: {1}.", this.AppName, ex);
     }
 }
        /// <summary>The deploy.</summary>
        /// <param name="enableWin32Mode">The enable Win 32 Mode.</param>
        internal override void Deploy()
        {
            try
            {
                this.pool = new IisApplicationPool(this.AppName + "TestPool", enable32BitAppOnWin64: this.EnableWin32Mode);

                this.website = new IisWebSite(this.AppName + "TestSite", this.AppFolder, this.Port, this.pool);

                if (Directory.Exists(this.AppFolder))
                {
                    ACLTools.GetEveryoneAccessToPath(this.AppFolder);
                }
                else
                {
                    Trace.TraceWarning("AppFolder {0} do not exist.", this.AppFolder);
                }
            }
            catch (Exception ex)
            {
                Trace.TraceError("Exception occured while attempting to deploy application {0}: {1}. Tests will not continue as they are guaranteed to fail.", this.AppName, ex);
                throw;
            }
        }