Search

Atalasoft Knowledge Base

FAQ: Why do I get an AtalasoftHostingPage error in the Silverlight control?

Administrator
DotImage

WARNING Obsolete:

Atalasoft newer versions no longer support Silverlight web controls. Supports ability to assist in keeping existing Silverlight deployments working may be limited. No further fixes/updates will be issued for our Silverlight assemblies/controls

Main Article

The SilverlightImageViewer needs to send requests to the server for processing. The first time server-side processing is required it will try to run a JavaScript function named 'AtalasoftHostingPage', which simply returns the full URL of the page that will accept the request.

The Atalasoft.dotImage.Silverlight.Web assembly contains a SilverlightWebHandler web control that will automatically output this JavaScript function and handle the incoming requests from the viewer. For ASP.NET applications, simply adding the SilverlightWebHandler to the same page containing your Silverlight application (which uses the SilverlightImageViewer) will solve this issue.

The SilverlightImageViewer does not throw an exception, it instead will raise an Exception event. This will allow your Silverlight application to handle the issue as needed.

Solution:

  1. Make sure you are running the web application, not the Silverlight application. When running the Silverlight application Visual Studio will generate a generic HTML page that does not contain the required JavaScript method.
  2. If you are running an ASP.NET project, add the SilverlightWebHandler control onto the page hosting the Silverlight application.
  3. If your server-side does not use ASP.NET, you will need to manually add the following JavaScript method to the page containing the SilverlightImageViewer so it will know where to send the requests.

    function AtalasoftHostingPage
    {
        // Return the URL for the page that will handle requests.
        // This URL must have the same domain as this page.
        return "http://mysite.com/requesthandler.php";
    }
Original Article:
Q10267 - FAQ: Why do I get an AtalasoftHostingPage error in the Silverlight control?
Details
Last Modified: 6 Years Ago
Last Modified By: Administrator
Type: FAQ
Article not rated yet.
Article has been viewed 303 times.
Options
Also In This Category