Skip to main content

Microsoft Silverlight

Answered Question HtmlPage class crashes on MACRSS Feed

(0)

sebnet
sebnet

Member

Member

0 points

10 Posts

HtmlPage class crashes on MAC

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:

MAC FIREFOX exception

 

  • I am testing on Leopard OS, on Firefox....
  • The application is developed with Silverlight 3
  •  needs the windowless property to true, because we are showing html content...
  • It is not cross domain...
  • Everything works OK on Windows IE, Firefox, etc... This exception is not thrown on Windows.

What could it be?

 

bryant
bryant

Star

Star

9937 points

1,629 Posts

Silverlight MVP

Re: HtmlPage class crashes on MAC

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.

-- bryant

Blog | Twitter
_________________
Dont forget to click "Mark as Answer" on the post that helped you.

sebnet
sebnet

Member

Member

0 points

10 Posts

Re: HtmlPage class crashes on MAC

Yes I tried that. Anyway, the default value is true for same-domain applications, which is my case.

 

bryant
bryant

Star

Star

9937 points

1,629 Posts

Silverlight MVP

Re: Re: HtmlPage class crashes on MAC

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?

-- bryant

Blog | Twitter
_________________
Dont forget to click "Mark as Answer" on the post that helped you.

sebnet
sebnet

Member

Member

0 points

10 Posts

Re: Re: HtmlPage class crashes on MAC

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.

bryant
bryant

Star

Star

9937 points

1,629 Posts

Silverlight MVP

Re: Re: Re: HtmlPage class crashes on MAC

Is the Mac PowerPC or Intel?

-- bryant

Blog | Twitter
_________________
Dont forget to click "Mark as Answer" on the post that helped you.

bryant
bryant

Star

Star

9937 points

1,629 Posts

Silverlight MVP

Re: Re: Re: HtmlPage class crashes on MAC

Another thing to try is to install the developer runtime for Silverlight on the Mac so that you can get more debugging information.

-- bryant

Blog | Twitter
_________________
Dont forget to click "Mark as Answer" on the post that helped you.

sebnet
sebnet

Member

Member

0 points

10 Posts

Re: Re: Re: HtmlPage class crashes on MAC

I'm running on Intel.... I'll try the developer runtime... thanks.

Jonathan Shen – MSFT
Jonathan...

All-Star

All-Star

24979 points

2,434 Posts

Microsoft

Re: Re: Re: HtmlPage class crashes on MAC

Hi Sebnet,

How's your issue going now?

Best regards,

Jonathan

Jonathan Shen
Microsoft Online Community Support
Please remember to mark the replies as answers if they help and unmark them if they provide no help.

sebnet
sebnet

Member

Member

0 points

10 Posts

Re: Re: Re: HtmlPage class crashes on MAC

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.

 

bryant
bryant

Star

Star

9937 points

1,629 Posts

Silverlight MVP

Re: Re: Re: Re: HtmlPage class crashes on MAC

Was the issue above only showing up on the VMWare Mac or was that on a real Mac?

-- bryant

Blog | Twitter
_________________
Dont forget to click "Mark as Answer" on the post that helped you.

sebnet
sebnet

Member

Member

0 points

10 Posts

Re: Re: Re: Re: HtmlPage class crashes on MAC

Real MACs too... I've seen it crash the same way in 2 different macbooks.

Jonathan Shen – MSFT
Jonathan...

All-Star

All-Star

24979 points

2,434 Posts

Microsoft
Answered Question

Re: Re: Re: Re: HtmlPage class crashes on MAC

Hi Sebnet,

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.

Best regards,

Jonathan

Jonathan Shen
Microsoft Online Community Support
Please remember to mark the replies as answers if they help and unmark them if they provide no help.

sebnet
sebnet

Member

Member

0 points

10 Posts

Re: Re: Re: Re: HtmlPage class crashes on MAC

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.

Jonathan Shen – MSFT
Jonathan...

All-Star

All-Star

24979 points

2,434 Posts

Microsoft

Re: Re: Re: Re: HtmlPage class crashes on MAC

Hi Sebnet,

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.

Best regards,

Jonathan

Jonathan Shen
Microsoft Online Community Support
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
  • Unanswered Question
  • Answered Question
  • Announcement
Microsoft Communities