This is a migrated thread and some comments may be shown as answers.

[Solved] Timeout trying to connect to Silverlight App

10 Answers 139 Views
Telerik Testing Framework
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Aaron Hockley
Top achievements
Rank 1
Aaron Hockley asked on 10 Sep 2009, 03:10 PM
I keep getting timeouts while WebAII tries to connect to a Silverlight app.

Here's the code that's failing:
[TestMethod] 
public void NavViewJCCCaseloadIE() 
    Manager.LaunchNewBrowser(BrowserType.InternetExplorer); 
    ActiveBrowser.ClearCache(BrowserCacheType.TempFilesCache); 
    ActiveBrowser.NavigateTo("https://internalurl/"); 
 
    var slApp = ActiveBrowser.SilverlightApps()[0]; 
    var menu = slApp.FindName<StackPanel>("LinksStackPanel"); 
    // rest of code deleted... 


The code gets as far as the var slApp line, then eventually fails with the error: "System.TimeoutException: Timeout trying to connect to Silverlight App.."

In doing some debugging, the SilverlightApps()[] array does in fact contain one element, but for some reason it's timing out when trying to get that element.

Windows 2003 Server, IE 7 (have also tried in Firefox and it fails/times out in the same fashion).

Any ideas?

10 Answers, 1 is accepted

Sort by
0
Missing User
answered on 10 Sep 2009, 04:41 PM
Hi Aaron,

If you can please check that the EnableSilverlight flag is set to true, as you would be able to see the Silverlight app in the SilverlightAppsList without the flag set, but would timeout connecting to it otherwise.

If you are using the built in unit test templates, you can set the flag in the following way:

//Initialize(false, this.TestContext.TestLogsDir, new TestContextWriteLine(this.TestContext.WriteLine));  
 
// If you need to override any other settings coming from the   
// config section you can comment the 'Initialize' line above and instead  
// use the following:  
// This will get a new Settings object. If a configuration  
// section exists, then settings from that section will be  
// loaded  
                  
Settings settings = GetSettings();   
                  
// Override the settings you want. For example:  
settings.EnableSilverlight = true;  
                  
// Now call Initialize again with your updated settings object  
Initialize(settings, new TestContextWriteLine(this.TestContext.WriteLine)); 

Also, https connections for Silverlight apps is currently not supported in Firefox and Safari, so all your https Silverlight testing would need to be in IE. Please let us know if this solves the problem or not

All the best,
Nelson Sin
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Aaron Hockley
Top achievements
Rank 1
answered on 10 Sep 2009, 08:19 PM
Yes, I initialized the settings with the EnableSilverlight option as described.  Thanks for the info on Firefox, but I'm also seeing the same problem on IE.

Any other ideas?
0
Missing User
answered on 10 Sep 2009, 09:13 PM
Hi again Aaron,

Just to make sure, if you can please confirm that IE is configured for Windows 2003 Server as in this article. And if you can manually clear the cache in Internet Explorer before the test run.

Also, if you can try adding ActiveBrowser.WaitUntilReady(); after the navigate line. And if you can also increase the time out in the settings like as in Manager.Settings.ExecuteCommandTimeout = (100000); 

I'll also double check that https is not the issue for connecting to the Silverlight app in IE7 on Win 2003.

Best wishes,
Nelson
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Aaron Hockley
Top achievements
Rank 1
answered on 10 Sep 2009, 10:02 PM
I verified that the enhanced security configuration for IE was not installed.
I added the two new lines of code as suggested and am still seeing the same results (other than the timeout now takes longer due to the increased timeout settings).

I look forward to hearing if you find out there's an issue with https and IE 7 on Windows Server 2003.  Thanks.
0
Missing User
answered on 10 Sep 2009, 10:48 PM
Hi again Aaron,

Just a quick update on this end, I tried a quick https Silverlight app deployment on my local Vista using IE8 and it connected ok. I'm going to try on Windows Server 2003 on IE7, but it will take alittle longer to setup.

Was your project deployed locally using something like IIS or on an external server? And did clearing the cache manually in IE7 before test runs not work also?

Greetings,
Nelson
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Aaron Hockley
Top achievements
Rank 1
answered on 11 Sep 2009, 02:16 PM
Manually clearing the cache seemed to have no effect.

The app is on a server inside our network, but it's not on localhost.
0
Missing User
answered on 11 Sep 2009, 10:34 PM
Hi again Aaron,

I'm in the process of setting up a repro, but it is taking a little while to set up the server deploying the Silverlight app and such. Quick question: what kind of server is the Silverlight app deployed to?

Also, would it be feasible to allow us acces to your Silverlight app? We have successfully diagnosed  and resolved problems with other customers by accessing their site directly, and it might save some time from which we could more quickly solve the problem.

If this would be possble, please let us know, and we would be happy to sign any Non Disclosure Aggreements you would require.

All the best,
Nelson
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Aaron Hockley
Top achievements
Rank 1
answered on 14 Sep 2009, 02:59 PM
The web server is Win 2008 / IIS 7.

Accessing our application directly isn't an option... it's a criminal justice system behind firewalls (and assorted regulatory access controls as well) so unfortunately we can't have you hit the app directly.

Let me know the results of your repro attempt.
0
Missing User
answered on 14 Sep 2009, 03:27 PM
Hi again Aaron,

Thanks for the update, I'll continue with setup and testing, then let you know of any results I am able to come up with. If you're able to, testing on the machine itself using WebAii, IE7 and 'https://localhost/...' should work in the mean time if you have that option.

Best wishes,
Nelson
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Missing User
answered on 14 Sep 2009, 06:35 PM
Hello again Aaron,

After experimenting with the setup and looking at your previous posts, were you still automating a bypass using WebAii for the certificate error page in IE7?

If you could try installing your server's certificate in your browser, remove the bypass code in your test, and navigate directly to the Silverlight app page and connect to the Silverlight app this way. 

You can install the certificate if you click on the 'Certificate Error' on IE7, then ' View Certificate' -> 'Install Certificate' and follow the Wizard instructions. If you install it to 'Trusted Root Certification Authorities', it will auto authenticate and bypass the error page. You can always uninstall the certificate in IE7 later if you wish.

Please let me know if this works out for you.

Thanks,
Nelson
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Telerik Testing Framework
Asked by
Aaron Hockley
Top achievements
Rank 1
Answers by
Missing User
Aaron Hockley
Top achievements
Rank 1
Share this question
or