public override bool Execute()
        {
            try
            {
                ITestHost myHost = new IISExpressTestHost(HostLocation[0].ToString(), "js");

                myHost.Initialize();
            }
            catch (WebException ex)
            {
                var response = ex.Response;
                if (response == null)
                {
                    Log.LogError(ex.ToString());
                    throw;
                }

                using (response)
                {
                    using (var sr = new StreamReader(response.GetResponseStream()))
                    {
                        Log.LogError(sr.ReadToEnd());
                        throw;
                    }
                }
            }
            catch (Exception ex)
            {
                Log.LogError(ex.ToString());
                throw;
            }

            return(true);
        }
Example #2
0
        public override bool Execute()
        {
            try
            {
                var myHost = new IISExpressTestHost(HostLocation[0].ToString(), "js");

                myHost.Initialize(keepAlive: -1, // default
                                  connectionTimeout: 110,
                                  disconnectTimeout: 30,
                                  transportConnectTimeout: 5,
                                  enableAutoRejoiningGroups: false);
            }
            catch (WebException ex)
            {
                var response = ex.Response;
                if (response == null)
                {
                    Log.LogError(ex.ToString());
                    throw;
                }

                using (response)
                {
                    using (var sr = new StreamReader(response.GetResponseStream()))
                    {
                        Log.LogError(sr.ReadToEnd());
                        throw;
                    }
                }
            }
            catch (Exception ex)
            {
                Log.LogError(ex.ToString());
                throw;
            }

            return(true);
        }