views:

33

answers:

2

I have a web service app - that I need to connect to a MOSS server.

for example:

 using (SPSite site = new SPSite(this.SiteAddress ))
            {
                using (SPWeb web = site.OpenWeb())

MOSS is not running on the same server as this web service app. Should this be a problem trying to use the object model. Or do I really have to go the web service route?

A: 

At the very minimum you will need to deploy Microsoft.SharePoint.dll to the machine hosting the web service. If it does require MOSS classes (the one's you've listed only require WSS) then you will also need to deploy the MOSS assembly (I believe it's Microsoft.Office.Server.dll). After that, it's going to become a deploy and pray situation in my experience :)

Matt Hidinger
I won't downvote your answer, but this is a warning for everyone else, don't use the MOSS API except for on the MOSS box with web parts, etc. If you need to remote use webservices because the api simply will not work.
JL
+1  A: 

As far as I know you need SharePoint installed to use the object model (you may be able to fudge it, but I wouldn't fancy your chances :-)). You options are to either use the built in SharePoint webservices, expose your own "friendly" service and consume it from your other server or move your webservice to the Sharepoint box.

Steven Robbins
+1 Fudging simply won't cut it, I'm trying to deliver a real solution... had to move all my code to web services as you suggested
JL

related questions