Skip to main content
Home Forums General Silverlight Getting Started HtmlPage class crashes on MAC
14 replies. Latest Post by Jonathan Shen – MSFT on November 5, 2009.
(0)
sebnet
Member
0 points
10 Posts
10-29-2009 11:28 AM |
Hi,
I'm trying to put to work a silverlight application on MAC... The problem is that any call to the HtmlPage static class crashes, for example
bool a=System.Windows.Browser.HtmlPage.IsEnabled;
This crashes with the following exception:
What could it be?
bryant
Star
9937 points
1,629 Posts
10-29-2009 11:33 AM |
Do you have enableHtmlAccess set to true in the plugin?
When the Silverlight plug-in's enableHtmlAccess property is set to false, any attempt to use the HtmlPage class fails with a NotSupportedException stating that the feature is disabled.
10-29-2009 11:42 AM |
Yes I tried that. Anyway, the default value is true for same-domain applications, which is my case.
10-29-2009 11:44 AM |
If you wrap the line of code that throws the exception in a try/catch block, what kind of exception do you get? Is there any more information?
10-29-2009 11:56 AM |
The exception it throws is the following:
[TypeInitialization_Type]
Arguments:System.Windows.Browser.HtmlPage
and the Inner Exception is the one I said in my first post.
10-29-2009 1:06 PM |
Is the Mac PowerPC or Intel?
10-29-2009 1:08 PM |
Another thing to try is to install the developer runtime for Silverlight on the Mac so that you can get more debugging information.
10-29-2009 1:21 PM |
I'm running on Intel.... I'll try the developer runtime... thanks.
Jonathan...
All-Star
24979 points
2,434 Posts
11-04-2009 5:36 AM |
Hi Sebnet,
How's your issue going now?
Best regards,
Jonathan
11-04-2009 9:14 AM |
Hi Jonathan,
I couldn't put it to work. I had to develope a MAC version with no access to the DOM. I've been working on this issue over a month trying to come with a solution with no luck.
I've been testing with a VMWare virtual machine running MAC, which was very slow and painfull. In a couple of days I will be provided with a real MAC, so I can install the runtime for developers and run remote debugging on MAC... I hope I can find a solution because over 15% of our users use MAC.
regards,
Seb.
11-04-2009 12:35 PM |
Was the issue above only showing up on the VMWare Mac or was that on a real Mac?
11-04-2009 12:39 PM |
Real MACs too... I've seen it crash the same way in 2 different macbooks.
11-04-2009 10:35 PM |
How about the pure javascript function works on your MAC? If it works, we can have a try to make your Silverlight application call the Javascript function.
11-04-2009 11:34 PM |
Hi Jonathan... You mean like invoking a javascript function from silverlight code? I never tried that... Anyway, the matter is that I need to show HTML content inside Silverlight application. I am using an html host control from ComponentOne to do this. Then I've been told about this problem on MAC and tested 2 o 3 different controls with the same capabilities and the problem remains the same... Then we developed our own control and this is when we found out that the problem was not the controls we were using... Whatever you want to do with the DOM throws this exception... Do you think we could accomplish this with the javascript way you describe? How? thanks.
11-05-2009 2:24 AM |
You can test its ContextMenu to see whether it works. I have no MAC environments. Thus, I cannot test it for you. If it works, Javascript way should work.