I think it has to run on the same application pool context that as the site
you are trying to access. which is why you should put it in either the
_layouts directory or the _vti_bin (ISAPI)

Ishai Sagi
Solution Architect and Director
Microsoft SharePoint MVP, MCTS
Extelligent Design
SharePoint Consulting, Training and Products
Mobile: 04-88-789786
Web: www.extelligentdesign.com
Email: sa...@extelligentdesign.com
Blog: www.sharepoint-tips.com


On Thu, Sep 2, 2010 at 10:48 AM, Trevor Andrew <tand...@tassoc.com.au>wrote:

>  Hi Nigel,
>
>
>
> Is the WCF service located on the SharePoint server in question? As you can
> see from the call-stack below, the method 
> Microsoft.SharePoint.Administration.SPFarm.get_Local
> is being called, and methods from namespace, as I understand it, will only
> execute when run on the SharePoint server.
>
>
>
> The other recollection I have from writing WCF services to invoke
> SharePoint methods is the identity under which the service is called is
> crucial.
>
>
>
> Hope that helps,
>
> Trevor Andrew
>
>
>
> *From:* ozmoss-boun...@ozmoss.com [mailto:ozmoss-boun...@ozmoss.com] *On
> Behalf Of *Nigel Hertz
> *Sent:* Thursday, 2 September 2010 9:08 AM
>
> *To:* ozMOSS
> *Subject:* RE: WCF & SharePoint
>
>
>
> Sure thing:
>
>
>
>
>
>    at
> Microsoft.SharePoint.Administration.SPConfigurationDatabase.get_Farm()
>
>    at Microsoft.SharePoint.Administration.SPFarm.FindLocal(SPFarm& farm,
> Boolean& isJoined)
>
>    at Microsoft.SharePoint.Administration.SPFarm.get_Local()
>
>    at Microsoft.SharePoint.SPSite..ctor(String requestUrl)
>
>    at ITOutages_WCF.OutageService.GetOutages(String list) in
> C:\Users\U100541\Documents\Visual Studio
> 2010\Projects\ITOutages_WCF\ITOutages_WCF\OutageService.cs:line 25
>
>
>
>
>
>
>
>
>
> *Please ensure that you log all issues or requests with the IT Service
> Centre. When logging calls, please include a detailed description of the
> problem.*
>
>
>
> *From:* ozmoss-boun...@ozmoss.com [mailto:ozmoss-boun...@ozmoss.com] *On
> Behalf Of *Joseph Clark
> *Sent:* Thursday, 2 September 2010 9:05 AM
> *To:* ozMOSS
> *Subject:* Re: WCF & SharePoint
>
>
>
> Nigel, are you able to post the entire stack trace for your Exception?
>
>  On Thu, Sep 2, 2010 at 8:51 AM, Nigel Hertz <nigel.he...@stockland.com.au>
> wrote:
>
> No luck unfortunately.
>
> I've also just realized I forgot to include the actual error message: its "
> Exception of type 'System.PlatformNotSupportedException' was thrown." Dunno
> if the attached screenshot will help or not.
>
>
>
>
> *Please ensure that you log all issues or requests with the IT Service
> Centre. When logging calls, please include a detailed description of the
> problem.*
>
>
> -----Original Message-----
> From: ozmoss-boun...@ozmoss.com [mailto:ozmoss-boun...@ozmoss.com] On
> Behalf Of Shannon Carey
> Sent: Wednesday, 1 September 2010 5:10 PM
> To: ozMOSS
> Subject: RE: WCF & SharePoint
>
> Ive had this error before with powershell. Bashed my head against the wall
> for ages before I realised that the account i was using needed access to the
> database.
>
> If thats not your error then make sure the siteUrl is correct eg "
> http://sharepointsitecollection"; and that you are running this on the
> actual SharePoint server the sitecollection is hosted on.
>
> There isnt really much else
>
> Shannon Carey
> SharePoint Trainer and Consultant
> Breeze
> T  (02) 9362 5181  F (02) 9362 4898  M 0422 598 914 P.O. Box 528,
> Edgecliff, Sydney, NSW, 2027 shann...@breeze.net | http://www.breeze.net
> http://blogs.breezetraining.com.au/scarey
>
> ________________________________________
> From: ozmoss-boun...@ozmoss.com [ozmoss-boun...@ozmoss.com] on behalf of
> Nigel Hertz [nigel.he...@stockland.com.au]
> Sent: Wednesday, 1 September 2010 4:58 PM
> To: ozMOSS
> Subject: WCF & SharePoint
>
> Hi all
>
> I’m trying to get a WCF service up and running, that pulls data out of a
> SharePoint (2007) list.
>
> It falls over as soon as it reaches:
> SPSite siteCollection = new SPSite(siteUrl);
>
> I’ve looked around on the ‘net, and changed the following, as recommended:
>
>
> 1)      Changed project to target .net 3.5
>
> 2)      Changed IIS7 app pool to ‘integrated’ from ‘classic’
>
> 3)      Changed httpGetEnabled from ‘true’ to ‘false’
>
> None of this has helped unfortunately, so I’m asking the experts ☺
>
> Nigel
>
>
> ----------------------------------------------------------------
> Nigel Hertz
>
> Software Developer | Information Technology Stockland Level 25 | 133
> Castlereagh Street | Sydney NSW 2000
> T: 02 9035 2617 | F: 02 8988 2617
>
>
> ________________________________
> Stockland Notice: If this communication has been sent to you by mistake,
> please delete and notify us.  If it has been sent to you by mistake, legal
> privilege is not waived or lost and you are not entitled to use it in any
> way. Stockland and its subsidiaries reserve the right to monitor e-mail
> communication through its networks.
> _______________________________________________
> ozmoss mailing list
> ozmoss@ozmoss.com
> http://prdlxvm0001.codify.net/mailman/listinfo/ozmoss
>
>
> _____________________________________________________________________________________________________________________________________________________________
>
>
> Stockland Notice: If this communication has been sent to you by mistake,
> please delete and notify us.  If it has been sent to you by mistake, legal
> privilege is not waived or lost and you are not entitled to use it in any
> way. Stockland and its subsidiaries reserve the right to monitor e-mail
> communication through its networks.
>
>
> _______________________________________________
> ozmoss mailing list
> ozmoss@ozmoss.com
> http://prdlxvm0001.codify.net/mailman/listinfo/ozmoss
>
>
>  ------------------------------
>  Stockland Notice: If this communication has been sent to you by mistake,
> please delete and notify us.  If it has been sent to you by mistake, legal
> privilege is not waived or lost and you are not entitled to use it in any
> way. Stockland and its subsidiaries reserve the right to monitor e-mail
> communication through its networks.
>
> _______________________________________________
> ozmoss mailing list
> ozmoss@ozmoss.com
> http://prdlxvm0001.codify.net/mailman/listinfo/ozmoss
>
>
_______________________________________________
ozmoss mailing list
ozmoss@ozmoss.com
http://prdlxvm0001.codify.net/mailman/listinfo/ozmoss

Reply via email to