SharePoint 2010 can't find or use ListData.svc - sharepoint

Can anyone lead me in the direction on how to access/enabled/use the ListData.svc in SharePoint 2010? When we try to access it via our web browser, we get a 404 error. Is there a service we need to enabled, or install a component, please help?

One way for this to happen is if a list doesn't actually work (in the browser it errors when you try to open it). Another symptom would be that Sharepoint designer doesn't show anything for lists and libraries.
I got this by following along a learning book. If there is a list that relies on a feature or something that is no longer installed this might happen.
One answer is to delete the offending list(s) using powershell;
$w = Get-SPWeb "http://localhost"<br />
$w.Lists.Delete([System.Guid]$w.Lists["MyListName"].ID)

Related

Sharepoint 2010 - feature not appearing in UI

Does anyone here know what could cause a new feature to not show up in the SharePoint UI?
The solution it is part of has been correctly deployed to the GAC and shows up in the central administration list of deployed farm solutions, the feature appears in the FEATURES folder of the 14 hive, yet the feature itself does not appear in the features list for the site collection, either in the UI or in PowerShell using Get-SPFeature.
Yes, the feature is correctly scoped, and no, it is not hidden. :)
Any thoughts or pointers would be very welcome!
Answer supplied on sharepoint.stackexchange.com, with thanks to Simon Doy. https://sharepoint.stackexchange.com/questions/73871/sharepoint-2010-feature-not-appearing-in-ui
Somehow, something had gone wrong with the installation of the feature, and neither the UI nor commands like Get-SPFeature revealed its existence, although the Install-SPFeature -ScanForFeatures command emboldened below displayed the missing feature.
"Check that the feature has been installed. For example, if you are
performing Update-SPSolution and a new feature has been added between
solution deployments then the feature is not installed by default.
To check do the following:-
Run SharePoint 2010 Management Shell from one of the SharePoint
servers Type Install-SPFeature -ScanForFeatures This will show you any
features that are available in the SharePoint Root but have not been
installed. You can install any missing features using the command :-
Install-SPFeature -AllExistingFeatures
See the following TechNet
Article for more information.
http://technet.microsoft.com/en-us/library/ff607825(v=office.14).aspx"
Look in central admin to see what site collection the feature is deployed to. Make sure in that site collection the feature is turned on.
Also, check the deploy job status to see if it actually finished.
Is there a on install event receiver? If it errors out, the feature will not finish installing even after the DLL is copied.

SandBox Webpart embedded inside Masterpage in SharePoint 2013 giving error

Well, SharePoint 2013 is not very Sandbox friendly. Having lots of issues.
In SharePoint 2010, I was able to successfully embed Sandbox webparts inside the masterpage using this:
<WebPartPages:SPUserCodeWebPart runat="server" Description="Description" Title="TITLE"
AssemblyFullName="$SharePoint.Project.AssemblyFullName$" SolutionId="00000000-0000-0000-0000-00000000000"
ID="ID" TypeFullName="Namespace.WP">
</WebPartPages:SPUserCodeWebPart>
However, when I add this inside a masterpage in SharePoint 2013, I get the following error:
ExecuteRequestInSandBox call failed. System.NullReferenceException: Object reference not set to an instance of an object. at Microsoft.SharePoint.WebPartPages.BinaryWebPartSerializer.Serialize(PersonalizationScope scope, BinaryWebPartSerializerFlag binaryWebPartSerializerFlags, BinaryWebPartSerializerWriter writer) at Microsoft.SharePoint.WebPartPages.BinaryWebPartSerializer.Serialize(SerializationMode mode, BinaryWebPartSerializerFlag binaryWebPartSerializerFlags, BinaryWebPartSerializerWriter writer) at Microsoft.SharePoint.WebPartPages.SPUserCodeWebPart.EnsurePersistedBlobsMatchPropertiesCollection() at Microsoft.SharePoint.WebPartPages.SPUserCodeWebPart.GetWebPartDataForRemoteCall(Object& viewState, Object& controlState) at Microsoft.SharePoint.UserCode.SPUserCodeWebPartRemoteExecutionHelper.ExecuteRequestInSandBox(HttpContext context, SPWeb web, SPWebPartManager manager, SPUserCodeWebPart userCodeWebPart)
I've tried a bunch of things, and it seems that you cannot embed a sandbox webpart onto a masterpage. However, a farm level webpart solution can be successfully embedded into a masterpage.
I have no idea why this is the behavior. You can, however, deploy an application page with SandBox WP embedded on it, and the application page will work fine. This is very interesting behaviour.
For now, I'm keeping this question open. Maybe someone will figure out this craziness.
The only bad thing is that you cannot deploy your masterpage to SharePoint Online (Hosted) because it does not allow farm-level solutions. Maybe AppParts, or iFrames, or embedded javascript/jQuery with a back-end fake service might do the trick, but for my purpose, I was looking at a bit more complexity.
I resolved this (hurrah!) by changing the version of referenced assemblies to 16.0.0.0 from 15.0.0.0 (or rather, removing the version and key parts of the assembly names altogether) in the Register tags.
Basically I think there's a bug in wave 15, fixed in wave 16.
Only problem is, my dev environment is wave 15 (as is everyone else's I presume). But removing the version number from the reference tags, it at least won't crash-out completely, just give an error message where the web part would appear.
Ran into a similar issue today on on SP farm. After installing SharePoint 2013 SP1, this is fixed. If you are experiencing this, check your patch version. If it is less than 15.0.4569, upgrade to at least 15.0.4569.

Sharepoint Designer 2010 won't display lists of libraries

Not quite sure what I've done to screw up SPD2010 (was working), but it displayed
Sharepoint Designer cannot display the item
What you can try:
Click refresh ... blah
Most likely causes
The file has been deleted from the site
The site is encountering problems
I can't see anything related in event viewer. I think is web service related as I think the queries are made via a WS?
In my case it wasn’t a solution. So, I made a backup of the site collection before to try anything. After a lot of time and different problems I figured out that some lists were causing the missreading. I tried one more time to get the lists in SharePoint Designer 2010 just to cause some entries in the log. After that I opened the log file and looked for something like: “Failed to determine the setup path of the list schema for feature {GUID}, list template XXX.”. With the GUID I looked for a match here. http://sharepoint-geek.com/2010/10/08/sharepoint-2007-moss-features/
With the feature name I used this blog: http://aurramu.blogspot.com/2011/03/failed-determine-setup-path-of-list.html.
With the feature re-installed I went to SPD and it worked like a charm.
I hope it helps someone else.
It appears this was caused by a "phantom" list definition. I experienced a number of other problems (some in SP some in SPD), all generating variations of this error;
<nativehr>0x8107058a</nativehr><nativestack></nativestack>
The problem list definition was deployed and undeployed from VS2010, so I have no idea why it was still around! The Sharepoint UI wont allow you to remove it (errors as above), so the trick is to use the stsadm powershell command with forcedeletelist as detailed here
http://technet.microsoft.com/en-us/library/cc262609(office.12).aspx
Hope this helps someone else !

How to find missing web part?

Does anybody know how to find offending web part which causes this error ?
“A Web Part or Web Form Control on this Web Part Page cannot be displayed or imported because it is not registered on this site as safe.”
I have inherited an old SharePoint 2003 portal site which uses custom web parts.
I know what this error means. I also know that each web part must be installed and registred as safe in web.config. The problem is that I don't know which one is missing.
I get same error when I'm trying to open the page in FrontPage as well.
Use contents=1 in QueryString to disable/remove WebParts from page that causes errors.
stsadm.exe -o enumallwebs -includewebparts
http://sharepointreporter.wordpress.com/
Requires updating to Sp2 I believe, for this command to be available. Problematic web parts will appear as 'Missing' in the resultant list.
Go to Event Viewer of the machine and you shall be able to see Error entries. Out of tons of entries you have to find out the entries related to you and you shall be able to see the names of the webparts that the sharepoint site is trying to load but fails. If you shall read the complete description of the error entry in the Event Viewer, it will give you version and even PublicKey Token of the webpart as well.
I hope this helps!!!
Try reading this:
http://www.bluedoglimited.com/SharePointThoughts/ViewPost.aspx?ID=189
It should give you some clues to solving the problem. Essentially you have a control that is not marked as safe and it is failing. You can most likely config it to work, but the link above has other possible solutions.
in your url just append content=1. This will give you the all the webparts that are deployed. Now, you can keep deleting each of the webpart to find which one is causing issue ( ensure that you know to add the web parts back).
For example: if Url is http://localhost:9000/default.aspx, try with http://localhost:9000?contents=1
Alternatively, try to create a new webpart page,add web parts that are there on your actual page and check which one is causing issue. This will avoid changes to the actual page.
Hope this helps.
I've just suggested this same answer on MSDN:
This stsadm helped me in finding where the webpart was referenced in any way:
stsadm -o enumallwebs -includewebparts > C:\temp\somelog.txt
Then you can see the web part is listed under some <Web Id=... Url=...> XML node, i.e. you know the "culprit" web site.
At that point, some reasons I've found for those forgotten references:
the webpart is used in some sub-site of the culprit website, and the sub site is hidden from the quick list or top bar
the webpart has been deleted from the culprit website, but it still is in the "site collection recycle bin". You can reach that by going to the normal website recycle bin, then look for its link on the top bar description ("Use this page to restore items that..."). By the way, this site collection recycle bin has two views itself: be sure to check them both.
In both cases, I got some help by browsing the culprit website with SharePoint Manager. With that I could easily spot the existence of a forgotten subsite, as well as the existence of this "second level recycle bin".
HTH

Delete a Web that doesn't exist

While setting up a test environment I was attempting to set up many different types of sites for testing various things when I ran into a strange bug in SharePoint.
I was creating a subsite under a blank site template and saw the option for "News Site" so I selected it and got an error saying that the Publishing Feature was not enabled at the site collection level.
Fine. So, I went and activated it and then attempted to create the site again and I got the error:
The Web site address "/mpsite/news" is already in use
Ok, so the site must have been created anyway so I try to visit the URL and get:
The webpage cannot be found
Fine. So, obviously it errored in the middle of the site creation so I'll just delete it via STSADM. Wrong:
There is no top-level Web site named "http://server/mpsite/news/".
So, the site is listed in the sites and workspaces list, but doesn't really exist and can't actually be deleted.
How do I get rid of it from the Sites and Workspaces listing?
You've run into one of the lovely undocumented "features" of SharePoint - site templates get applied after the site gets created in a seperate, descrete step. This means that potentially, a site can "exist" (as far as the content database is concerned) without template, which leaves you with a site you can't browse to, but still sorta "exists" in SharePoint purgatory (I've actually written a couple of hacks that involve relying on this "feature").
It looks to me like you may have run into one such situation - when you went to go create your site, I'm guessing that you got the error before the template was applied to your news site.
The way I've fixed similar problems in the past has been to use SharePoint Designer to delete the sites - since it looks straight into the content database for what does and doesn't exist, it might do the trick for deleting your rouge news site.
Hope this helps!
Have you tried http://server/mpsite/news/_layouts/deleteweb.aspx ?
Or maybe the "Content and structure" (http://server/mpsite/_layouts/sitemanager.aspx) link from site actions?
I know this is old, but it may help somebody. In SP2013 running the Remove-SPWeb Powershell command with the url of the corrupted web worked perfectly for me.

Resources