Recently, we came across a bug with the Silverlight Business Application with respect to an Out of Browser application. In the RTM bits for Silverlight 4 Tools a new feature was added to enable a better debugging experience with Out of Browser application. The feature basically launched the app in OOB window when run with the debugger attached. If you have tried that with the business application template, you will notice that the app does not run. It crashes with an exception, that the URI path is not valid.
We realize this is an issue most folks are running into and we have fixed this template and we are looking ways to get you access to it. However, there is a relatively easy workaround to fix this issue.
The steps involved are :-
Doesn't work since checking enable OOB causes the app to have the Silverlight app as the Startup project as thus, the WCF part doesn't work. In addition, was getting an error: "The provided URI scheme 'file' is invalid; expected 'http'. Parameter name: via"
Any ideas to work around that?
Thanks this did the trick. Nice thing is I can now switch back forth between BusinessApplication1 and BusinessApplication1.Web project as my startup project to go back and for the between out-of-browser and in-browser debugging respectively. I created a b4 and after copy of my default sl biz application project to capture what what following the process in this blog actually changes and found it results in the following changes.
/Project/ProjectExtensions/VisualStudio/FlavorProperties/SilverlightProjectProperties/StartAction = OfflineApplication -> DynamicPage
/Project/ProjectExtensions/VisualStudio/FlavorProperties/SilverlightProjectProperties/OutOfBrowserProjectToDebug = <empty> -> BusinessApplication1.Web