Home : Silverlight Viewing Controls : Why do I get an AtalasoftHostingPage error in the Silverlight control?
Q10267 - FAQ: Why do I get an AtalasoftHostingPage error in the Silverlight control?

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";
    }

 

Related Articles
No Related Articles Available.

Article Attachments
No Attachments Available.

Related External Links
No Related Links Available.
Help us improve this article...
What did you think of this article?

poor 
1
2
3
4
5
6
7
8
9
10

 excellent
Tell us why you rated the content this way. (optional)
 
Approved Comments...
No user comments available for this article.

Powered By InstantKB.NET v1.3
Copyright © 2002, 2017. InstantASP Ltd. All Rights Reserved