// This will give you the location of the page hosting the .xap file:
var pageUri = System.Windows.Browser.HtmlPage.Document.DocumentUri.ToString();
// This will give you the location of your .xap file:
var applicationUri = System.Windows.Application.Current.Host.Source.AbsoluteUri;
You may have more luck to search about using SignalR in Silverlight. I believe you just need to install the SignalR client library into the LS Silverlight client project to get the client side set up and then follow the code for the client aspect in the
above link.
Although this article is in C#, it may give you some clues:
// This will give you the location of the page hosting the .xap file:
var pageUri = System.Windows.Browser.HtmlPage.Document.DocumentUri.ToString();
// This will give you the location of your .xap file:
var applicationUri = System.Windows.Application.Current.Host.Source.AbsoluteUri;