Hosting Silverlight Out of Browser Application in Sharepoint 2007 - silverlight

I am trying to host a Silverlight 3 Out of Browser Application in Sharepoint 2007. My application gets displayed fine; but when I install it as out of browser; and try to run it from desktop; only blank screen is displayed and nothing happens onwards.
The XAP file is kept in _layout/MyFolder/MyApp.xap (Under 12 Hive). Am I missing anything?
My Silverlight app access Sharepoint data through its web services; I need to host it within Sharepoint so that it can access underlying Sharepoint web services.

It seems likely that the ClientHTTP stack used in the OOB mode is the problem. When hosted by the browser the app will use the BrowserHTTP stack and hence would share a common set of cookies. These aren't available in OOB mode.
How for example does the initial browser access to the Sharepoint site authenticate?
Creating an OOB experience against sharepoint may be possible but its likely to require more work.
Edit: Your problem is that NTLM authentication is not supported in the ClientHTTP used in OOB mode. Silverlight-4.0 supports this mode.

Related

Lightswitch Forms Authentication issues based on windows user?

First my apologies if I failed to find an answer searching - I tried a variety of search topics but none that were directly related.
I have a Lightswitch app deployed and working fine, running on IIS 7 and Windows Server 2008. It is an internal intranet app only.
I am using only FORMS AUTHENTICATION, all others are disabled.
The app works fine for MOST windows users.
However, some windows users get nothing but a blank screen - no login, no "loading..." and no silverlight "98%" display.
In the IIS log, I don't even see where it looks like it is being accessed when they attempt to load the app?
So, my question is, since this is FORMS authentication only, what could be causing it to NOT work based on which windows user is trying to run the app?
In other words, on the same Windows 7 machine, it works for 10 users, but not for others.
by the way, the application is remote - it is not running on the local machine.
The users ARE able to access the other ASP.NET applications hosted by the same IIS server in the same root inetpub folder.
The lightswitch application is using the ASP.NET v4.0 Classic app pool in calssic managed pipeline mode.
Any help greatly appreciated!!!
Happy to post any details/config/logs - I did not do so yet as I wasn't sure what would be most useful....
On the users machine you need to use Fiddler or the F12 tools in Internet Explorer to see exactly what calls are being made to the server and which ones are failing. LightSwitch is just an ASP.net website that launches a Silverlight application.
So the only other thing I can think of is that those users do not have Silverlight installed on their machines?
The users need to install the latest version of Silverlight. Apps built with LightSwitch 2011 require v4 or above and those built with LightSwitch for Visual Studio 2012 require v5
Silverlight Installation

Start WPF application from link in browser?

We have a requirement to start a WPF application with specific parameters from a link in a browser.
We are wondering if this is possible?
As an alternative could we embed the web application in a WPF browser control, and read the values out of the html web page?
Several possibilities :
if you control the browser (i.e. if you are in an intranet scenario, and have the opportunity to deploy applications), you can :
create an activex or plugin that runs the application
register a new uri scheme to interpret the url of kind "yourapplication://yourarguments"
(complex): deploy a listening app ran under the user session, and from the webapplication, ask this listening app to run the target application
reduce the security of the browser (not recommended)
if you don't control the browser:
create a clickonce application... this involves a setup, but which does not require admin privilege
Moving to Silverlight also might be an option, depending on your needs. SilverLigth V5 (still in beta) notably adds the ability for an admin to control the rights of the application via a GPO
Note: My feelings is the later option (Silverlight) is far more preferable because it's a lot more cleaner and less security hole factor. However, it can only be done if your requirements fits into the SL features
It is not possible to call client app from a browser, previously it was possible from activex controls but for that you need to have a signed library, in wpf you can make browser based application but you cant embed your web app in it.
So partially you are correct if you used wpf app you will be able to launch application on client side but with browser it seems difficult until unless you make activex control
but still i am not 100% sure that with activex control you will be able to launch the app or not

Get webpage content from silverlight?

I want to use Silverlight to parse http://www.downforeveryoneorjustme.com/http://bing.com/ and see if "bing.com" is up. Is this possible in a Silverlight site (running in-browser with no elevated trust)?
It's possible if you can get their participation- they'd need a clientaccesspolicy.xml or crossdomain.xml that allows your hosting domain (or all domains) access. Without that, you're pretty much hosed for direct access from Silverlight without elevated trust.
That said, you could easily have the server that's hosting your Silverlight xap make the outbound connection via a service call, then proxy the result back to a Silverlight client.

Accessing SP 2010 Object Model from Silverlight 4 Application

I have a Silverlight 4 Beta application where I'd like to use the SharePoint object model to upload a document to a SharePoint site - should be simple enough, except an exception is thrown at:
using (SPSite siteCollection = new SPSite(siteCollectionUrl))
The Web application at
http://intranet.fabrikam.com could not
be found. Verify that you have typed
the URL correctly. If the URL should
be serving existing content, the
system administrator may need to add a
new request URL mapping to the
intended application.
This particular exception is actually really well documented out there, it's obviously masking a real underlying issue. Here are some of the things I've read about and tried without success:
DNS / Host Header:
This exception occurs when the particular URL isn't in the IIS metabase because it's being handled by DNS. My web application has an AAM set up and a host header on the web site in IIS. I also tried running the code without using the FQDN of the site, e.g. http: //servername:4860.
Permissions:
The identity of the the Silverlight application pool has db_owner permissions to my content database, and is also a site collection administrator. I can't have both web sites use the same application pool because the Silverlight application needs to run in a .NET app pool.
x86 vs x64:
My Silverlight application has to be compiled for x86 - I'm using some controls that only work in x86. The installed SharePoint version is x64. I've read about people seeing this exception when trying to use the SharePoint object model to hit a x64 SharePoint installation from a x86 app.
Adding then removing permissions for the account: This begins to border on some voodoo magic, but I read about people magically resolving this issue after removing the permissions they set trying to troubleshoot this problem initially. No luck here.
Would appreciate any suggestions, thank you!
Silverlight runs on the client/browser, not on the server - so the server-side SharePoint object model will not be available to you.
However, there is an object model for SharePoint 2010/Silverlight apps - see this MSDN article for details.
To fix the particular error you mentioned, use "List", instead of "SPList". The Silverlight SharePoint object model is a little different from the basic non-Silverlight SharePoint object model.

Access Sharepoint webservice from Silverlight with specfic user credentials

I am accessing Sharepoint web services from a Silverlight application, I have put the clientaccesspolicy.xml file in the root of my Sharepoint site, so I can access fine.
What I would like to do though is hard code the user credentials so the web service always connects with the same user.
Is this possible and if so how?
Thanks in advance.
After emailing Tim Heuer, I was informed that is not possible in SL3, but will be in SL4!
I've recently ran into similar case where I need to pass a specific credential to the generated web service client proxy in Silverlight 4 OOB. For whatever reason I am still getting prompted for authentication so, I'm not sure if it's there in SL4.
What I know possible in SL4 is you can force an HttpRequest to use a ClientHttp stack instead of the WebBrowser one. I've used this with SharePoint 2010 OData feed (_vti_bin/listdata.svc) before successfully, but to access SharePoint Web Services (for example: _vti_bin/lists.asmx), it's a different story.
I finally decided to create my own workaround (specific to SL OOB w/ Elevated Privilege) for this that should work on SL3 OOB and SL4 OOB with elevated privilege. Basically creating my own SharePoint Web Service proxy using the ClientHttp stack and composing and passing my own SOAP message manually using WebRequest.
I blogged about how to do this here.

Resources