I'm playing with the Bing Map control for Silverlight and an out-of-browser (OOB) app. I get the "map loaded in unsupported uri scheme" error because the control does not like to be hosted on the file system and wants a WebApplication instead (http://). Here's a more detailed explanation I found to this:
http://conceptdev.blogspot.com/2009/03/silverlight-virtualearth-map-control.html
Is there a workaround to this when running a OOB app?
Thanks
The Bing Maps Silverlight control requires the application it's used within to be hosted on a web site or application. You are running it within an HTML page that is opened locally (not hosted within IIS or other web server.) That is why the specified error message is being shown.
This is a requirement of how the Bing Maps Silverlight control works.
http://pietschsoft.com/post/2011/01/26/Bing-Maps-Silverlight-and-an-Out-Of-Browser-(OOB)-Application.aspx
It's messy but it could work:
Write a WinForms program that contains a WebBrowser control
Embed a lightweight web server running on localhost into the program
Serve your Silverlight application via a web page to the browser
That's a lot of work to make it look like you don't have a browswer and it's still not OOB.
Related
If I am at site abc.com and I go to my site def.com which hosts a silverlight app. How can I find out which domain I just came from within my silverlight app?
Assuming you got to your site via a link (this does not work if you simply typed in your website address), your hosting ASPX page on def.com will receive a referring URL.
You then just need to pass it into the Silverlight application via the InitParams setting of the Silverlight control.
See the HttpRequest.UrlReferrer Property and this example on how to pass the property to Silverlight.
You can't. You will have to use Javascript for that and even then you won't be able to see from which site the user came, you can just go back to the previous page.
You can do it on the server side by checking the web server logs.
Last year someone reported encountering this problem ("The Silverlight project you are about to debug uses web services. Calls to the web service will fail unless the silverlight project is hosted in and launched from the same web project that contains the web services.") and accepted the answer to "set the web project which hosts the Silverlight application to be your startup project."
I'm seeing the same message, but think the solution might have to be different. I am building in VS 2010 a Silverlight application to access the Google Weather API, with VB as the code-behind. The API will return a XML file with data for the specified city (ex., "http://www.google.com/ig/api?weather=london,england"). The Solution Explorer only shows my VB/Silverlight project ("GetWeather"), and the Project Properties dialog box shows the Startup Object as "GetWeather.App" -- the only choice. I'm trying to use a WebClient object to make the call and an XDocument object to parse the return. But I repeatedly get the above error message, with no other result. What am I doing wrong?
Thank you in advance!
I would add a simple Web project and configure it to host the Silverlight app. You'll need to host the app somewhere anyways, so why not create a stub ASP.NET application in your solution? The easiest way is to create a new Silverlight app solution selecting an ASP.NET web project as the host, and then copying your existing code to that solution. Then you should set the web project as the startup one. This should make debugging a lot easier.
Besides, do remember to configure the client access policy to enable cross-domain calls. Check out this article
We have a requirement to start a WPF application with specific parameters from a link in a browser.
We are wondering if this is possible?
As an alternative could we embed the web application in a WPF browser control, and read the values out of the html web page?
Several possibilities :
if you control the browser (i.e. if you are in an intranet scenario, and have the opportunity to deploy applications), you can :
create an activex or plugin that runs the application
register a new uri scheme to interpret the url of kind "yourapplication://yourarguments"
(complex): deploy a listening app ran under the user session, and from the webapplication, ask this listening app to run the target application
reduce the security of the browser (not recommended)
if you don't control the browser:
create a clickonce application... this involves a setup, but which does not require admin privilege
Moving to Silverlight also might be an option, depending on your needs. SilverLigth V5 (still in beta) notably adds the ability for an admin to control the rights of the application via a GPO
Note: My feelings is the later option (Silverlight) is far more preferable because it's a lot more cleaner and less security hole factor. However, it can only be done if your requirements fits into the SL features
It is not possible to call client app from a browser, previously it was possible from activex controls but for that you need to have a signed library, in wpf you can make browser based application but you cant embed your web app in it.
So partially you are correct if you used wpf app you will be able to launch application on client side but with browser it seems difficult until unless you make activex control
but still i am not 100% sure that with activex control you will be able to launch the app or not
I have a WPF application. On the same machine I have a console application.From this console application i want to see if user has successfully logged in and a particular page is open in WPF application. If this is the case then i want to show a popup in WPF application.
To implement this I Thought of using WCF services. I have got 2 options. Create a seperate WCF service and run it as soon as WPF application runs and then ask the client application to communicate.
Second option is to host the WCF service inside the WPF application and run it when WPF application starts.
I am not able to decide on which way to choose. If anyone of u has implemented this kind of setup before,please share your ideas.
Because you want to see if a page is open in the WPF application, I'd suggest hosting the WCF service in the WPF application (i.e., using the ServicHost class). Then have the console application consume the service to determine the page status as per your requirement.
Also, use the NetNamedPipeBinding (http://msdn.microsoft.com/en-us/library/system.servicemodel.netnamedpipebinding.aspx).
I am trying to host a Silverlight 3 Out of Browser Application in Sharepoint 2007. My application gets displayed fine; but when I install it as out of browser; and try to run it from desktop; only blank screen is displayed and nothing happens onwards.
The XAP file is kept in _layout/MyFolder/MyApp.xap (Under 12 Hive). Am I missing anything?
My Silverlight app access Sharepoint data through its web services; I need to host it within Sharepoint so that it can access underlying Sharepoint web services.
It seems likely that the ClientHTTP stack used in the OOB mode is the problem. When hosted by the browser the app will use the BrowserHTTP stack and hence would share a common set of cookies. These aren't available in OOB mode.
How for example does the initial browser access to the Sharepoint site authenticate?
Creating an OOB experience against sharepoint may be possible but its likely to require more work.
Edit: Your problem is that NTLM authentication is not supported in the ClientHTTP used in OOB mode. Silverlight-4.0 supports this mode.