Solved

Sharepoint and SPWeb

Posted on 2012-04-01
6
321 Views
Last Modified: 2012-05-13
I write a lot of sharepoint code to do administration functions.  Almost all of this is done in Visual Studio and then I compile the app.  The apps then run locally on one of the web front ends.

Recently we are engaged with a vendor who is providing hosted sharepoint and I no longer have access to a web front end to run my apps.  I normally use a call like new spsite("http://mysite/") to create an spsite object.  However, I don't think this works unless the program is running on one of the web front ends.  Is there a way to still use my existing code but have it interact with a hosted farm?  Is there a way to create an spsite object when you don't have local access to a web front end?

Thanks!
0
Comment
Question by:TedgCl
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 29

Expert Comment

by:QPR
ID: 37792510
Assuming I'm understanding your question correctly....
There is no way to create/use code on a box that does not have SP running locally (without some tweaks and workarounds) as the sharepoint DLLs need to be referenced.
It seems your only option is to install SP locally, write.debug/test your code locally and then upload your features.solutions/DLLs to the hosted environment once done.
You would need to change URLs to web services etc once completed and ready to "ship"
0
 
LVL 32

Accepted Solution

by:
Jamie McAllister MVP earned 500 total points
ID: 37792511
You need to convert your code to use the client object model

http://www.zimmergren.net/technical/sp-2010-getting-started-with-the-client-object-model-in-sharepoint-2010

This is run from the client and gets around the issue of access to the servers.

You should also see if the web services meet your needs

http://msdn.microsoft.com/en-us/library/ee705814.aspx
0
 
LVL 29

Expert Comment

by:QPR
ID: 37792524
Surely this would still require Sp to be installed on the development "client"?
But as I said I could be missing something, it's late here :)
0
Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

 
LVL 32

Expert Comment

by:Jamie McAllister MVP
ID: 37792543
Hi QPR - A SharePoint install isn't needed on the client to use Client Object Model or web services. You do reference Microsoft.SharePoint.Client.dll
and Microsoft.SharePoint.Client.Runtime.dll in your dev environment however.
0
 
LVL 29

Expert Comment

by:QPR
ID: 37792556
Apologies, I assumed the poster was talking about new/future development for the new hosted environment rather than consuming existing functionality from the client
0
 
LVL 7

Expert Comment

by:dhawalseth
ID: 37795285
Your code will look like something similar to CAML query builder available for free. Nowadays(Sharepoint 2010) you can write code which you can run locally on environment where sharepoint is installed(using client object model) or use sharepoint webservices to run it from a non sharepoint environment. You just need to have the credentials of account which has administrative priviledges.

Enjoy!!
0

Featured Post

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
SharePoint Foundation 2013 Search 11 100
Use SP.SOD.executeFunc in SharePoint Online Add-In 2 135
SharePoint 2013 Page Too Large For Screen 1 53
SharePoint and CAML query help 4 26
The vision: A MegaMenu for a SharePoint portal home page The mission: Make it easy to maintain. Allow rich content and sub headers as well as standard links. Factor in frequent changes without involving developers or a lengthy Dev/Test/Prod rel…
These days socially coordinated efforts have turned into a critical requirement for enterprises.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
This video shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question