Windows Gadget For Sharepoint 2007 List Using Soap, Javascript, C#, Webservices, Jquery
Solution 1:
You're installing this on a users PC so you can't use the standard SharePoint API (Microsoft.SharePoint.dll)
You're using 2007 so you can't use the "Client Object Model" (managed/silverlight or EMCA Script)
That leaves
a) The SharePoint Web Services (either JavaScript or JQuery which IS still JavaScript).
This means that your gadget will be authenticating to SharePoint via the same mechanism that someone browsing to your site would - normally Integrated Windows auth.
The first place to start this is the excellent http://spservices.codeplex.com/ library which allows you to easily call the web services from JQuery). See the documentation for tips on how to use it.
For a half done project how about http://sharepointsidebar.codeplex.com/
b) Create your own custom web services by deploying a dll on the SharePoint server then call those via JavaScript (perhaps usign JSON or similar rather
Solution 2:
If you can afford deplying a COM component with your Gadget the first approach would work. You wrap your logic in a facade of a CCW .NET class (using the .NET SP Client OM) and register it for COM by regasm. All pure .NET, your class would be declared (and written) COM-compatible.
You may find the second approach too limiting later; SP ClOM supports more functionality that SP WSs. Throwing the jQuery in doesn't change it much. (Unfortunately, SP JS ClOM can be used only on SP pages; not in a Gadget.)
If you go the way of pain (JS ;-) IWA should give you the (Windows) SSO authentication. If you call the SP ClOM from the DLL you can either reuse the Windows session token of the current user (SSO) or authenticate explicitly by a form of yours if the user wished it. (You can login to SP UI as a different user than you are in Windows too.) Both is supported.
I'd first try the DLL approach.
Update: Oops, you're on SP 2007, not on 2010 - no SP ClOM. I should've noticed earlier, sorry... Still, you could create a .NET DLL that would talk to SP via a WS. You can still set DefaultNetworkCredentials
to HttpWebRequest.Credentials
(REST) or to .Credentials
of your WS client class (SOAP) to get SSO authentication. Or create your own NetworkCredential
with name and password.
--- Ferda
Post a Comment for "Windows Gadget For Sharepoint 2007 List Using Soap, Javascript, C#, Webservices, Jquery"