Does Silverlight use a separate application domain for each browser tab? - silverlight

If the same Silverlight application is running in two web browser tabs, does each tab use a separate application domain?
If you know where Microsoft explicitly provides this information, please include a reference.

Not direct from Microsoft, but one AppDomain per Silverlight instance:
http://community.irritatedvowel.com/blogs/pete_browns_blog/archive/2007/11/07/How-Silverlight-is-Loaded-and-Instantiated.aspx
http://wilcob.com/Wilco/Silverlight/asp-net-silverlight-component-development.aspx
blogs.msdn.com/apardoe/attachment/6644139.ashx (Powerpoint - Slide 15)

To clarify Corbin's answer:
Its one AppDomain per instance of the Silverlight control, so that two Silverlight apps on the same page are segmented into AppDomains. Depending on the browser, there may be separations between tabs (e.g. IE8 and Chrome uses separate processes, whereas Firefox and IE7 do not). The only way to get two Silverlight instances to talk with each other is on the same page and to communicate through the HTML Bridge.

The browser is completely in control of the tabs, and should keep them separate for obvious security reasons.

Related

Browser automation in .Net

Can I automate actions like filling and submitting a form, clicking links et.c. in a real browser (i.e. IE11 or Firefox) using only a Silverlight or an XBAP application?
I would be grateful if you could let me know any other solution (other than the two above) that can do the automations without the need to manually install third party software (like Selenium or Telerik Testing Framework).
No one answered, so I'll tell you what worked and what not.
Silverlight solutions didn't work due to the Same-origin browser policy.
The XBAP solution actually worked. I created a new XBAP application and loaded it in my other application inside an iframe.
The user must accept the pop-up and the XBAP application opens a new WebBrowser control doing its stuff.
The whole thing only supports IE.

open one out of browser from another for silverlight

I have two fully trusted out of browser applications.
What i want is to be in one and a user clicks a button and that opens the second silverlight oob application.
Is this possible?
pinvoke and sllauncher contain the answer that you seek.

What if we don't host our silverlight Application when we first Create it?

As we all know very well..
whenever we create application inside silverlight it is asking us for hosting it
by dialogue box at given below.
My question is what if i unchecked the check box[Host the silverlight application in a new web site].
Means what kind of problem we have to face later if I don't host our Silverlight Application in any of the option given by dialogue box.
Basically it is not a problem at all. You can add a website at any time later.
In the project settings of a website there is a Silverlight tab. Under that you will find the option to add Silverlight projects to the website. This will setup the links to generate the XAP in ClientBin as well as giving you the option to create test pages for each Silverlight app added. The test pages will give you the sample JS you need to host your Xap later.
You will have to eventually host your application somewhere otherwise it will stay on your local harddrive and hardly reach any clients. So if you have an existing web site you could simply copy-paste the necessary javascript to this site later in order to embed your Silverlight application. In this case you can uncheck this checkbox.

Any way to tell the WebBrowser control to start in 'nomerge' mode if user has IE8

Our application uses a webbrowser control on a form to navigate to our website when a certain action is performed on our 'text-based' legacy application.
All was fine in IE5, 6 and 7 but now it appears IE8 shares session cookies not only between tabs in the same intance but also between all instances. This is a major bother if a user wants to have two separate instances looking at different client details at the same time.
One can disable the latter behaviour by starting IE with the command line switch -nomerge.
Does anybody know how we can achieve the same effect programatically with the WebBrowser control?
Thanks in advance chaps.

Silverlight multi-page with browser back/forwards

I can present multiple pages in Silverlight using
Content = new DetailsPage();
However is this can be confusing to a user who may not even know the page is in Silverlight and would be expecting to hit the back button on the browser.
Obviously I can add my own buttons but this doesn't seem right.
How can I allow "normal" browser navigation using the back/forwards button?
In Silverlight 2, you can still handle navigation. It's just a more manual process.
Call
HtmlPage.Window.NavigateToBookmark("blah");
to add the "#blah" to the end of the URL.
Call
string bookmark = HtmlPage.Window.CurrentBookmark;
to find out where you currently are. People are also tying into jquery/Asp.net AJAX libraries to use their navigation support.
In Silverlight 3, you can use the Navigation Framework to do some of this automatically. File->New Project->Silverlight Navigation Project.
You should really formulate a question.
I'll assume that you want to know how to achieve multi-page navigation with browser back-button support.
There one simple answer, which is to use Silverlight 3 where it is supported out of the box, as well as in-app navigation using the address bar.
Release date is set for july 10, so there's not much longer to wait.
Be careful, you cannot at the moment install both Silverlight 2 and 3 on one machine, and there is no end-user plugin available (only developper runtimes, to install manually).

Resources