Starting an "out of browser Silverlight 4 elevated app" from another "out of browser Silverlight 4 elevated app" - silverlight

I am concurrently running several different out of browser elevated applications and sending messages between them.
Is there a way for me to check to see if a specific one of those elevated out of browser Silverlight apps are currently running and if not programmatically start that app for the user? preferably without automation. If via automation, how?
Thanks!

After continuing to search for answers on this problem I finally found this post: link
It is a bit of a hack and will not work on a Mac (for now) but it's a start.
I thought I would share it back in case others here were interested.

Check out Tim Heuer's post http://timheuer.com/blog/archive/2010/03/25/using-sllauncher-for-silent-install-silverlight-application.aspx on how you can launch OOB applications. It would be necessary to use automation to run sllauncher.exe. As for detecting if OOB aplication is allready running I'd look to local messaging api. I haven't worked with it myself, so I can only suggest to give it a try.

Related

Does Thinfinity Virtual UI work with embedded browsers (Cefsharp)?

My company wants to try out the library "Thinfinity Virtual UI", to run a Windows Forms application in a browser.
It seems to more or less work, though the application crashes everytime an embedded browser is attached to the form (Cefsharp), see attached image.
I am not able to catch the error in the try/catch.
Any ideas how to remedy/debug this issue?
I tried searching the web for a solution/alternative to CefSharp, looking at error logs, inserting the try/catch. I also wrote to the company, but so far I get no reply.
This is Luke and I work at Cybele Software where we developed Thinfinity VirtualUI to help Windows developers converting their Legacy Windows Applications into modern Web Applications by just modifying one single line of code and adding our libraries.
Unfortunately, as it is, WebView and Chromium are not supported in our propietary protocol. But do not worry, we have 2 valid workarounds.
Using our HTMLDOC demo. Link to our GitHub HERE
This demo shows how to programatically create an iframe inside your application (using HTMLDOC.CreateComponent) , and how to communicate back and forward between the application and the website running inside that iframe, using Javascript Remote Objects (JSRO)
Using our 'Third Party Applications' Feature. Link on how to enable this HERE
Be aware that to enable this feature, you'll need to have our Thinfinity Broker and your app running on a Windows Server. Basically, with this option, you'll be using a Microsoft feature called 'Desktop Duplication' where we can eventually render any Third Party application with the help of Remote Desktop Services.
I hope this does the trick for you and don't hesitate on contacting us about this or any other doubt you may have about our products :)
Thank you!

Losing control while testing in Xamarin test cloud

After entering into phonebook or gmail or playing YouTube through the testing application, I am losing all the controls to test or query. As soon as it comes into play I lose control. Then I have to manually deal with it. On writing tree on Repl mode I am not able to see anything.
This is because you are leaving the application. Xamarin UITest works by running a client-side server next to or inside the mobile application. the client-side server is what enables us to interact with controls and query for things on the screen.
If you are on iOS, you have to have the Calabash agent installed in the application to make things work. Once you leave the application (switching to YouTube or other app), the client-side server is backgrounded and won't be able to do anything because of how iOS operating system is designed.
On Android, it depends on what version of Android you are using. Older Android versions don't sand box apps the same. Android 6.0 and above have more security controls and I wouldn't expect this behavior to work.
If you are trying to test if those things work, You should be testing that the Intent you are sending is correct. You are really testing the operating system at this point because you are verifying that YouTube or whatever did what you expected. Really we should have a base assumption that when we provide the phonebook with the proper intent, the operating system should behave accordingly. If you test that the video actually opens in the YouTube app, you are now testing if YouTube can open their links/intents successfully. Some people decide to test these things, many find that it is redundant and increases their teams cycle time.
I hope this helps!
Disclosure: I work at Xamarin/Microsoft

Run WPF application in browser

I have my application wrote in WPF. Now, i want it to run in browser so I've read about it and I know that XBAP is my solution.
What is my problem? It won't run on my PC. I checked every popular browser (chrome, FF, IE, opera) and nothing. Browsers can't handle .xbap files and just downloads it.
I try and try and nothing but above happened. Can anyone guess why it don't work? Is it deprecated technology, i have too-new browsers or what? Every entries I found about it are 2-4 years old.
Firstly for Internet Explorer (IE9 onwards) you need to ensure that you have enabled XBAP/XAML support:
For Firefox and Chrome you have to do something a bit different:
How can I get my XBAP to run in my browser instead of downloading it on Windows 7?
But in addition to the above you need to be aware that when you run an XBAP application it runs in the Internet Zone....so your biggest problem is that normally you don't have full-trust...therefore your application can't call privileged code...if it tries to then you get security exceptions.
http://www.tarkia.com/blog/tag/difference-between-wpf-application-and-xbap-application/
http://www.tarkia.com/blog/2009/11/26/understanding-xbap-full-trust-partial-trust-certificates-and-more%E2%80%A6/
One way to get your XBAP to be "trusted" is to get it signed with a certificate (you should purchase a proper one from Verisign rather than use a test certificate) and deployed with ClickOnce.
http://blogs.microsoft.co.il/blogs/maxim/archive/2008/03/05/wpf-xbap-as-full-trust-application.aspx
http://blogs.microsoft.co.il/blogs/maxim/archive/2008/03/31/how-to-run-wpf-xbap-application-in-full-trust-mode-post-2-certificate-extraction.aspx
http://scorbs.com/2007/01/10/xbap-trust-levels/
Or you can keep your application as a regular WPF .EXE and use ClickOnce to deploy it from a website but run it locally with full trust.
not straight forward way, you can find you answer Microsoft MSDN Forum

A couple Silverlight 4 questions

I have a couple questions regarding Silverlight 4:
Does running a Silverlight 4 app, out of browser, in full trust, require the
user to respond to a dialog asking for permission? If so, is there a way around this?
If the answer to #1 is yes, is the user prompted with the same dialog each time
the app is updated?
Is full trust only available in an out of browser app, or is it available via the browser as well?
If an app is installed out of browser, does the user have to actually do
anything to get the app installed? Or is it all transparent?
Are there any other installation issues with Silverlight 4 apps that would
make installation problematic for a user.
The main reason I ask all this is because we're considering Silverlight 4 for our corporate internal apps and we'd like the deployment process to be seamless and transparent. And since they are internal apps, we don't need our users to confirm it's ok to install in full trust.
No way around this, the user will be asked whether they trust the application the dialog includes a warning that the application requires elevated trust.
No the application can update itself without their seeing this same elevated trust warning again.
Currently in SL4 its only available to OOB apps. SL5 will allow administrators to extend elevated trust to in browser apps via group policy.
The inbrowser version needs to give the user a some form of UI (button) to invoke installation (the ability to install is also added to the default context menu for the application). The user will then need to agree to the dialog presented. After that the user will need to close their current usage and manually start the newly installed app.
Not that I know of, a part from the presence of Silverlight runtime there are no other dependencies.
For you requirements you might be better looking at a different technology right now but SL5 may fit your needs in the future.
It's possible to install a Silverlight application as an OOB application with elevated permissions using the command prompt. If you have a system adminstrator controlling what the users get installed on their computers you can install the application without bothering the user.
When the application is installed an update will not prompt the security dialog. But in some scenarios it makes sense to restart the application.
In SL4 elevated trust requires the application to run OOB.
Have a look at this article about signing Silverlight applications it might help you with several of these issues. By signing you could overcome trust issues and the users to be bothered with dialogs.
EDIT Read this too it explains more about trusting the publisher and updating

Silverlight and Full Trust Issue

We are planning to build a new integration component that can provide us access to user's machine installed apps from our web site.
The first word that came to me was ActiveX, but our expertise with the technology was not the best in the past.
Thinkink a lit bit more, the work Silverlight also came to my head, but the full trust thing was one of the few things I remembered reading about the technology..
The question is: is there a way that Silverlight (2, 3, 4, whatever) can run as a full trusted application from within the browser?
Links are appreciated.
Filipe
Unfortunately, no. Full trust is a feature of Silverlight 4, currently in beta, and is restricted to out-of-browser applications.
Additionally, full trust SL4 applications do not have unrestricted access to the system (particularly file system), though this may change before before release (if I have anything to do with it).
Edit: If you are considering ActiveX (which is Windows/IE only), you might want to have a look at WPF, since it can run full trust from the browser (if it's in a trusted zone).
No, like Richard said, this is not at all possible inside the browser, even in SL4. There is a sandbox, and you live in it. You can talk to web services, other Silverlight applications or the browser.
By talking to the browser, I mean you can talk to the DOM and the Javascript engine. We needed to launch a Windows application and communicate to it via Silverlight. We accomplished this by putting a small ActiveX control in the web page. It is responsible for launching the WinForms application and handling inter-process communication to it.
This method has many drawbacks: It can only work in IE, and it only works in Windows. You might also run into permissions issues. The ActiveX component needs to be installed along with the desktop application, or as an additional download. The deployment story there is pretty awful, if you ask me.
In our case, the analysts were willing to deal with the restrictions for the re-usability of an existing application, and we consider it to be an optional feature.
Does it have to be a web application? sounds like you want a desktop app. It can be easiliy distributed with one Click deployment. Will work on windows only but since you were considering ActiveX sounds like that's what you need.
Well - if you're hosting the silverlight control from an ASP.NET application - Believe you have access to
Request.ServerVariables["AUTH_USER"];
...and you can pass that on to your control as a parameter.
D

Resources