bool CheckServiceExists(string serviceFile)
 {
     try
     {
         return((ServiceHostingEnvironment.IsConfigurationBasedService(serviceFile) ||
                 HostingEnvironmentWrapper.ServiceFileExists(serviceFile)) &&
                AspNetEnvironment.Current.IsWithinApp(VirtualPathUtility.ToAbsolute(serviceFile)));
     }
     catch (ArgumentException ex)
     {
         MsmqDiagnostics.ExpectedException(ex);
         return(false);
     }
 }
 private bool CheckServiceExists(string serviceFile)
 {
     try
     {
         return(ServiceHostingEnvironment.IsConfigurationBasedService(serviceFile) || HostingEnvironmentWrapper.ServiceFileExists(serviceFile));
     }
     catch (ArgumentException exception)
     {
         MsmqDiagnostics.ExpectedException(exception);
         return(false);
     }
 }