Accessing browser history in Silverlight - silverlight

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.

Related

Access Custom Admin Page on AppEngine Development Server

I'm using Appengine and I want to write a custom admin page for myself. How can I view the custom admin page on the development server (on my localhost)?
The localhost console does not seem to have a link to it (even though it's defined in the .yaml and the page is working properly).
Thanks
Enter the URL in your browser, i.e.
http://localhost:8080/MyAdminPage.html

"Calls to the web service will fail..." Once Again

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

Silverlight blank page but only from one machine

A silverlight application is deployed to IIS. I can access it from two different machines. However, a user from another machine only sees blank page.
I do not suspect mime types and other IIS/server issues because it works fine except for this user.
The user can access other Silverlight apps, on same server.
What can be the problem on the client's machine?
UPD: user can't access .xap file directly, restricted access.
UPD: looks to be a proxy in the middle.
Hm, can't delete my own post? Well, this looks to be network problem with proxy.
It seems a cross-domain issue, and normally an unhandled exception causes the Silverlight content to go blank, even-though if you right-click you would get Silverlight menu action.

Silverlight: Bing Map Control in OOB possible?

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.

jbossws webservice endpoint

I have developed a simple webservice implementation using top-down approach, created a war and deployed in jboss4.2.2GA, in windows environment.
I am able to see my webservice having registered end point, in http://localhost:8080/jbossws/services. But when i click on the endpoint hyperlink, I am not able to view the wsdl page.
Is it expected behaviour? Is there anyway, i can see the wsdl page on navigating through registered webservice endpoint hyperlink?
Thanks in advance
Are you seeing a blank page when you click the link? You might need to view the page source to see the actual WSDL content. I think IE will display the WSDL by default, but Firefox and Chrome will not.

Resources