I have not written the code I need, as I know it's the context.

I know the URL i.e.

http://sp.co.uk but need to get the SPSite object from the alternative 
SPWebApplication.

SPWebApplication.Sites provides get only on name/position not URL.

From: [email protected] [mailto:[email protected]] On Behalf Of 
Web Admin
Sent: Friday, 8 March 2013 3:06 PM
To: ozMOSS
Subject: Re: get spsite object in a different web application

Can we see the code? Still sounds like context. Is this C# or Powershell...?

On 8 March 2013 15:33, Chris Grist 
<[email protected]<mailto:[email protected]>> wrote:
Yeah the get method supports int and site name I have the URL so was trying to 
see if there was a way to get it without iterating over them all.

From: [email protected]<mailto:[email protected]> 
[mailto:[email protected]<mailto:[email protected]>] On Behalf 
Of Web Admin
Sent: Friday, 8 March 2013 2:49 PM
To: ozMOSS
Subject: Re: get spsite object in a different web application

Get the destination webapp object first, then the site.

The site you're trying to access does not exist within the current context.

On 8 March 2013 15:11, Chris Grist 
<[email protected]<mailto:[email protected]>> wrote:
Hi Guys,

I have webapp1 with several Host name site collections

I have webapp2 where some code is running.

The code seems to die when I try to open a SPSite object based on the HNSC url.

This works fine on webapp1, but on webapp2 it bombs out.

Is there a neat way to get the site collection from the other web app.

Cheers,

[cid:[email protected]]

Chris Grist | SharePoint Architect / Coordinator

GPO Box 175, Adelaide SA 5001 | 25 Conyngham Street, Glenside  SA  5065

Tel: (08) 8338 2833 | Fax: (08) 8338 2336 | Mob: +61432 898 500

Email: [email protected]<mailto:[email protected]> | 
Web: www.beachenergy.com.au<http://http/www.beachenergy.com.au>





___________________________________________________
This message is intended only for the use of the addressee.
This email and any attachments are confidential and may
contain legally privileged information or copyright material.

If you are not the intended recipient, you are hereby notified that any use or
dissemination of this communication is strictly prohibited. If you received
this e-mail in error, please notify us immediately by telephone on +61 8 8338
2833 or by return email and delete the original message. It is important to
check for viruses and defects before opening or using attachments. Beach Energy
Limited accepts no liability for any damage caused by this email or its 
attachments due to viruses, interference, interception, corruption or
unauthorised access. Thank you.

Please consider the environment before printing this email.

_______________________________________________
ozmoss mailing list
[email protected]<mailto:[email protected]>
http://prdlxvm0001.codify.net/mailman/listinfo/ozmoss



--
Regards,

Paul Noone

SharePoint Farm Admin/Developer
Infrastructure Team
CEO Sydney

p: (02) 9568 8461
f: (02) 9568 8483
e: [email protected]<mailto:[email protected]>
w: http://www.ceosyd.catholic.edu.au/

___________________________________________________
This message is intended only for the use of the addressee.
This email and any attachments are confidential and may
contain legally privileged information or copyright material.

If you are not the intended recipient, you are hereby notified that any use or
dissemination of this communication is strictly prohibited. If you received
this e-mail in error, please notify us immediately by telephone on +61 8 8338
2833 or by return email and delete the original message. It is important to
check for viruses and defects before opening or using attachments. Beach Energy
Limited accepts no liability for any damage caused by this email or its 
attachments due to viruses, interference, interception, corruption or
unauthorised access. Thank you.

Please consider the environment before printing this email.

_______________________________________________
ozmoss mailing list
[email protected]<mailto:[email protected]>
http://prdlxvm0001.codify.net/mailman/listinfo/ozmoss

___________________________________________________
This message is intended only for the use of the addressee. 
This email and any attachments are confidential and may 
contain legally privileged information or copyright material.

If you are not the intended recipient, you are hereby notified that any use or
dissemination of this communication is strictly prohibited. If you received
this e-mail in error, please notify us immediately by telephone on +61 8 8338
2833 or by return email and delete the original message. It is important to 
check for viruses and defects before opening or using attachments. Beach Energy
Limited accepts no liability for any damage caused by this email or its 
attachments due to viruses, interference, interception, corruption or
 unauthorised access. Thank you. 

Please consider the environment before printing this email.

<<inline: image001.png>>

_______________________________________________
ozmoss mailing list
[email protected]
http://prdlxvm0001.codify.net/mailman/listinfo/ozmoss

Reply via email to