Testing a silverlight application with statlight on Windows Server 2008 r2 - silverlight

I followed the instructions on pyxis-tech.com to test our Silverlight application on TFS2010 on a Windows 2008 r2 Server. If I run the test as part of a build they all fail. Running them on the server as the same user reveals the following:
------------------ Test Failed ------------------
Test Namespace: [StatLight]
Test Class: [CannotFigureItOut]
Test Method: [NotEnoughContext]
Other Info: A Silverlight MessageBox dialog was automatically closed.
Caption: One or more ActiveX controls could not be displayed because either:
1) Your current security settings prohibit running ActiveX controls on this page
, or
2) You have blocked a publisher of one of the controls.
As a result, the page might not display correctly.
Dialog Message:
Web Browser
-------------------------------------------------
Statlight opens it's browser which displays a dialog with the same error message before closing it after a minute or so. The the browser displays the silverlight installation ad even though the silverlight runtime is already installed on the computer.
I've granted the executing user a ridiculous amount of privileges but still had no success. If anyone has had this problem before, I'd appreciate a little help with this.

You have to make sure the service executing StatLight has desktop interactivity enabled.
On the services Log On tab you have to check the "Allow service to interact with desktop"

Related

Does Silverlight support Outlook Addin(Javascript API)?

We are trying to integrate Silverlight components in Outlook task panel which is developed by Outlook Javascript API. However when mailapp(task panel) loaded, it appears error and it prompts the Silverlight addin failed to run and please check security settings in “Internet Options”. I also tried adding website URL into IE trusted sites list, but this error remains. But I also notice that it works fine in IE browsers.
I know the mailapp (task panel) initials a web browser (IE kernel) in embedded mode. But I really want to confirm whether Silverlight is supported or NOT in MailApp? If it's supported, how should I do?
Anyone gives me the right answer will save my life. Thanks in advance.
It prompts security settings conflicted in MailApp
But it works fine in a separate IE browser

How to have a SharePoint action invoke a feature in a WinForms application launched by Click-Once?

We have a SharePoint site that our users have open all the time (type of dashboard for the business). We have a WinForms application that listens on a specific port for when the user clicks a web part on the SharePoint site, we take the JSON in the WinForms, parse the request and launch a feature in the WinForms. Essentially allowing a web site to launch a feature in a running WinForms app on the same client machine.
This worked great when we were running in XP. When we moved to Windows 7 (with elevated UAC), this feature stopped working. Since we launch the WinForms app via ClickOnce, and ClickOnce apps can't be Run As Administrator, our current code won't work.
We can't make the ClickOnce app Run As Administrator for all the reasons you see here on StackOverflow.
So my question is: how can we invoke a feature in a ClickOnce deployed WinForms app when a user clicks on something in SharePoint site? It is super easy to get the WinForms app to call a Sharepoint web service but I need to go the otherway.
You can invoke a ClickOnce application by calling the deployment manifest URL. If you want to be able to call the app and have it do something specific, call the deployment manifest URL and pass query parameters to it, then have the application handle the query parameters.
This article shows you how to handle query parameters with ClickOnce applications.

SSRS Report Viewer only works when Fiddler2 is running

I have a WPF application using a WinForms Report Viewer control.
The report control loads reports from SSRS 2008.
All was working fine until we moved to a new server.
All users can connect and authenticate to http://SERVERNAME/reports and run reports with no issues.
Certain users can run the reports from the WPF app but other users get the message:
“The request failed with HTTP status 401: Unauthorized”.
I figured I would install Fiddler2 and see what traffic was being passed around.
Unfortunately (or fortunately), the reports load correctly in the Report Viewer control when Fiddler2 is running.
Why?
Though this is a "temporary workaround"; it is definitely not ideal.
And according to Fiddler... it works. The traffic appears to be valid I have nothing to fix.
Any ideas?
The problem ended up being a bad configuration of a Barracuda Networks web filter proxy running on the network. The proxy was getting in the way of the Report Viewer control authenticating. Why it still worked in IE or why it worked when Fiddler was running is still very strange to me but at least I now know what solves the problem.

How silverlight code gets debugged

As an .xap file is added in the web project which runs at client side, then can anyone please explain how are we able to debug the silverlight client side code?
If you are running the web server built into Visual Studio then Visual Studio is both hosting the web server and running the web client. This means you are able to debug both the client and server side code.
If you are using IIS to serve the site then you are still running the web client within Visual Studio.
As long has you have the "Debuggers" option set on the web project you will be able to set break points and step through the code.
In the web project properties, under ‘web’ tab all way at the bottom, there is a group called ‘Debuggers’, make sure you have Silverlight check box is checked. By checking the Silverlight check box you will be able to debug the client side code.

Silverlight tests not working unless RDP connection open

I have a few Silverlight UI tests that I'm automating with White. These tests are subsequently run by a TFS build agent, which is running interactively so it can access the desktop.
The build passes if I have a Remote Desktop connection open to the build agent as the tests are run; I can see the mouse pointer moving around. When the test clicks on a HyperlinkButton navigation takes place, and is subsequently verified by assertions within the test.
The build fails if I do not have a Remote Desktop connection open to the build agent as the tests are run. The Internet Explorer window is created and the Silverlight app loads, but no clicks happen; the application remains on the initial page and test assertions subsequently fail.
Has anyone out there found a solution to this problem?
See Starting a Windows service in an interactive session
If you are setting up a windows service, that service can be set to run with an interactive desktop, though it will be running as a local machine user and not a domain user.
The other alternative is tweaking the registry to use the AutoAdminLogon feature. Use with caution!
HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon:
DefaultUsername
DefaultPassword
DefaultDomain
AutoAdminLogon = 1
The answer is on this CodePlex thread. Basically there is no solution; White tests must be run by a logged-in user (either physically, or via VNC or RDP).

Resources