/// <summary> /// Creates and instance of the Atom Feed using the proxy settings. /// </summary> /// <param name="proxySettings">Proxy settings to use on each call.</param> /// <param name="requestRetryCount">Number of times to retry a request before bombing out.</param> /// <param name="requestTimeout">Length of time in milliseconds to wait for response.</param> /// <param name="logDetails">True - log detailed output, False - don't.</param> /// <param name="useLiveId">True - user Windows Live ID, False - use WinQual Ticket.</param> /// <param name="winQualIPAddress">IP address to use to connect to the WinQual service - can be null.</param> public DummyAtomFeed(StackHashProxySettings proxySettings, int requestRetryCount, int requestTimeout, bool logDetails, bool useLiveId, String winQualIPAddress) { m_LogDetails = logDetails; if (requestRetryCount == 0) { m_RequestRetryLimit = 5; } else { m_RequestRetryLimit = requestRetryCount; } if (requestTimeout == 0) { m_RequestTimeout = 300000; } else { m_RequestTimeout = requestTimeout; } m_WinQualIPAddress = winQualIPAddress; // Get the test settings. m_TestFile = TestSettings.GetAttribute("DummyAtomFeedTestFile"); m_TestDatabase = new TestDatabase(m_TestFile); }
private void UpdatateServiceProxySettings() { StackHashProxySettings proxySettings = new StackHashProxySettings(); proxySettings.UseProxy = UserSettings.Settings.UseProxyServer; proxySettings.UseProxyAuthentication = UserSettings.Settings.UseProxyServerAuthentication; proxySettings.ProxyHost = UserSettings.Settings.ProxyHost; proxySettings.ProxyPort = UserSettings.Settings.ProxyPort; proxySettings.ProxyUserName = UserSettings.Settings.ProxyUsername; proxySettings.ProxyPassword = UserSettings.Settings.ProxyPassword; proxySettings.ProxyDomain = UserSettings.Settings.ProxyDomain; this.ClientLogic.ServiceProxySettings = proxySettings; this.ClientLogic.AdminUpdateServiceProxySettingsAndClientTimeout(); }
public void LogonWithGoodCredentialsInvalidProxy() { if (!AtomTestSettings.EnableWinQualLogOnTests) { return; } // Define the certificate policy for the application. ServicePointManager.ServerCertificateValidationCallback = new RemoteCertificateValidationCallback(MyCertificateValidation.ValidateServerCertificate); StackHashProxySettings proxySettings = new StackHashProxySettings(true, false, "Buddy", 200, null, null, null); AtomFeed atomFeed = new AtomFeed(proxySettings, 1, 100000, false, true, null, 11); Assert.AreEqual(false, atomFeed.Login(TestSettings.WinQualUserName, TestSettings.WinQualPassword)); }
private void buttonOK_Click(object sender, RoutedEventArgs e) { _contextValidation.ValidationEnabled = true; if (BindingValidator.IsValid(tabItemAdvanced)) { if (proxySettingsControl.IsValid) { // update proxy settings - dialog will close when complete StackHashProxySettings proxySettings = new StackHashProxySettings(); proxySettings.UseProxy = proxySettingsControl.ProxySettings.UseProxy; proxySettings.UseProxyAuthentication = proxySettingsControl.ProxySettings.UseProxyAuthentication; proxySettings.ProxyHost = proxySettingsControl.ProxySettings.ProxyHost; proxySettings.ProxyPort = proxySettingsControl.ProxySettings.ProxyPort; proxySettings.ProxyUserName = proxySettingsControl.ProxySettings.ProxyUsername; proxySettings.ProxyPassword = proxySettingsControl.ProxySettings.ProxyPassword; proxySettings.ProxyDomain = proxySettingsControl.ProxySettings.ProxyDomain; _clientLogic.ServiceProxySettings = proxySettings; _clientLogic.ClientTimeoutInSeconds = _contextValidation.ClientTimeoutInMinutes * 60; _clientLogic.AdminUpdateServiceProxySettingsAndClientTimeout(); } else { // if necessary select the proxy tab and highlight the error if (tabControl.SelectedItem != tabItemProxyServer) { tabControl.SelectedItem = tabItemProxyServer; bool unused = proxySettingsControl.IsValid; } } } else { // advanced tab not valid if (tabControl.SelectedItem != tabItemAdvanced) { tabControl.SelectedItem = tabItemAdvanced; bool unused = BindingValidator.IsValid(tabItemAdvanced); } } }
/// <summary> /// Set the proxy settings for web requests. /// </summary> /// <param name="proxySettings">New proxy settings.</param> public void SetProxySettings(StackHashProxySettings proxySettings) { }
public ProgramArguments() { ProxySettings = new StackHashProxySettings(); Iterations = 1; IPAddress = "winqual.microsoft.com"; }