Posts mit dem Label SharePoint 2010 werden angezeigt. Alle Posts anzeigen
Posts mit dem Label SharePoint 2010 werden angezeigt. Alle Posts anzeigen

Freitag, 9. Oktober 2015

Can not perform this operation. The file is no longer checked out or has been deleted.

Problem:
While working with files in SharePoint Designer 2010 or Word 2010 and you attempt to check in a document you receive the following error message:
Can not perform this operation. The file is no longer checked out or has been deleted.
The cause of this issue is you have connected SharePoint Designer 2010 to an Alias for the site (DNS CName) which has not been configured as an Alternate Access Mapping for the site (AAM).


Solution:
Connect SharePoint Designer 2010 to the host name while performing these file operations. Not ideal but will work.
Or better:
Add the DNS alias to the Alternate Access Mappings in Central Administration. This will require access to central administration.

Dienstag, 14. Juli 2015

SharePoint Sudden Site Lock

Problem:
You experience a sudden site lock "read-only", what appeared to be a total lock down on the SharePoint sites.  It results in ALL users, even site administrators and users with full administrative rights are unable to do anything!  Nobody could add new documents or edit documents; nearly every single Document or Library option is greyed out!
A possible cause could be that you started a SharePoint backup (during backup the site is locked) via Powershell and canceled the process while running. So the command is not able to unlock the sites afterwards.




Solution:
Fix via the central administration website:
  1. Central Administration -> Site Collection Quotas and Locks.
  2. Select your site collection
  3. Change the Site Lock Information radio button from “Read-only” to “Not locked”
  4. OK

Mittwoch, 10. Juni 2015

WCF WebService Factory for SharePoint 2010

Problem:
When you create your own SharePoint WCF Service in the ISAPI folder you might encounter the following error when sending to large Xml.

The maximum array length quota (16384) has been exceeded while reading XML data. This quota may be increased by changing the MaxArrayLength property on the XmlDictionaryReaderQuotas object used when creating the XML reader.

Solution:
You need to create your own Service Host Factory.
<% @ServiceHost Debug="true"
    Service="ExampleHostFactory.TestService, ExampleHostFactory, Version=1.0.0.0, Culture=neutral, PublicKeyToken=11e99323d9a22b04"
    Factory="ExampleHostFactory.ServiceHostFactory, ExampleHostFactory, Version=1.0.0.0, Culture=neutral, PublicKeyToken=11e99323d9a22b04" %>



using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.SharePoint.Client.Services;
using System.ServiceModel;
using System.ServiceModel.Description;

namespace ExampleHostFactory
{
    public class ServiceHostFactory : MultipleBaseAddressBasicHttpBindingServiceHostFactory
    {
        protected override ServiceHost CreateServiceHost(Type serviceType, Uri[] baseAddresses)
        {
            ServiceHost serviceHost = new MultipleBaseAddressBasicHttpBindingServiceHost(serviceType, baseAddresses);

            if (serviceHost != null)
            {
                serviceHost.Opening += new EventHandler(HostOpening);
            }

            return serviceHost;
        }

        void HostOpening(object sender, EventArgs e)
        {
            ServiceHost serviceHost = sender as ServiceHost;

            if (serviceHost != null && serviceHost.Description != null && serviceHost.Description.Endpoints != null)
            {
                foreach (ServiceEndpoint endpoint in serviceHost.Description.Endpoints)
                {
                    if (endpoint != null && endpoint.Binding != null)
                    {
                        BasicHttpBinding basicBinding = endpoint.Binding as BasicHttpBinding;
                        if (basicBinding != null)
                        {
                            // configure binding settings
                            basicBinding.MaxReceivedMessageSize = Int32.MaxValue;
                            basicBinding.ReaderQuotas.MaxArrayLength = Int32.MaxValue;
                            basicBinding.ReaderQuotas.MaxBytesPerRead = Int32.MaxValue;
                            basicBinding.ReaderQuotas.MaxStringContentLength = Int32.MaxValue;
                        }
                    }
                }
            }
        }
    }
}

Donnerstag, 3. Juli 2014

SharePoint ThreadAbortException

Problem: If you are doing a SPSite.OpenWeb() (or maybe its done for you, when you request the profile service) and you do not have the permissions to the site there is an UnauthorizedAccessException being thrown. But if you are trying to catch it, immediately after the catch an ThreadAboardException is thrown and you code does not continue. That is because of access denied exceptions inside page requests are explicitly handled by the platform. For example, when Forms-based authentication is used, anonymous users are redirected to the login page. If the user is already authenticated, he may be redirected to an error message page such as _layouts/AccessDenied.aspx.
When you are developing web parts that behavior is okay but running such code in a timer job or WCF webservice is problematic.

Solution: You should turn off that behaviour by setting the following flag:

bool originalCatchValue = SPSecurity.CatchAccessDeniedException;
SPSecurity.CatchAccessDeniedException = false;

try
{
   // your code

}
finally
{
   SPSecurity.CatchAccessDeniedException = originalCatchValue;
}


Within the try statement you are able to catch the UnauthorizedAccessException as usual.


2nd Problem: Another reason you get a ThreadAbortException could be that your request could not be validated by SharePoint. This could be the case if you are developing a WCF webservice within SharePoint context. In the exception stacktrace you should see  Microsoft.SharePoint.SPWeb.ValidateFormDigest()

Solution:
In this case SPContext.Current is not null, Sharepoint tries to verify requests using security validation digest provided by FormDigest Class. According to msdn:
"To make posts from a Web application that modify the contents of the database, you must include the FormDigest control in the form making the post. The FormDigest control generates a security validation, or message digest, to help prevent the type of attack whereby a user is tricked into posting data to the server without knowing it. The security validation is specific to a user, site, and time period and expires after a configurable amount of time. When the user requests a page, the server returns the page with security validation inserted. When the user then submits the form, the server verifies that the security validation has not changed".
In WCF service you don't have security digest. To avoid this check try to set HttpContext.Current to null temporary when you call siteCollection.Add() method:

var ctx = HttpContext.Current;
try
{
    HttpContext.Current = null;
    // your code
}
finally
{
    HttpContext.Current = ctx;
}

Donnerstag, 19. Juni 2014

UserProfile Sync problem:Could not connect to http://(server):5725/ResourceManagementService/MEX

Problem: You are trying to sync user profiles from active Directory and get an error:

Could not connect to :5725/ResourceManagementService/MEX. TCP error code 10061: No connection could be made because the target machine actively refused it


Solution: Verify that windows service "Forefront Identity Manager Service" and "Forefront Identity Manager Synchronization Service" are started. If not, please start them and then check the effect.

Mittwoch, 23. Mai 2012

Data is Null

The SharePoint item being crawled returned an error when requesting data from the web service. ( Error from SharePoint site: Data is Null. This method or property cannot be called on Null values. )

I found the code:
web.SiteGroups.Add(groupName, owner, null, null);

Solution:

It seems that the "default user" parameter is not the culprit here after all, but the fourth parameter is the one that actually causes this error. This is a description parameter, and even an empty string is OK. See this Microsoft Support article http://support.microsoft.com/kb/2323206

Dienstag, 13. März 2012

Form Template's status remains forever in 'installing' or 'deleting' state

Form template’s status never leaves “Installing…”, “Deleting…”, “Upgrading…”  or “Removing…” states
These states seem to indicate that you're running a multiple-machine server farm, and on your server farm, you're running into some issues in propagating changes to all of the machines.  If you have not done so already, I highly recommend turning on the following services on each machine: SPAdmin, and SPTimerV3 You can do this by running:

                net start SPTimerV3
                net start SPAdmin


On each machine (If you are doing this on a SharePoint Farm , you want to make sure the Timer Service is running on all the Servers on the Farm).  Net start is a ensure semantic, so this will not inadvertently toggle or cause any damage if run on a machine where the service is already started.  Now that that's done, you can go on to correcting the problems that you have.

From Central Administration, go to the Operations page, under the Global configuration group, click on Timer Job Status.  On that page, look for timer jobs that have the name in the following formatting.  If you filename is FOO.xsn, it will look like:
Windows SharePoint Services Solution Deployment for "form-FOO.wsp"

See if there was a failure.  If so, go back a page, and go to Timer Job Definitions.  Drill down in the timer job definition that you care about and you can perform the following:


Generally:
  1. Try to restart the job if that is available.
  2. If restart is not available, delete the job, then attempt your initial action again .

Donnerstag, 4. August 2011

SharePoint shows no help

Problem: Click on the help icon in SharePoint, it opens a window but shows no help text.
Instead you see messages like:

-No Help Collection was found.
-Help content cannot be displayed. (Or similar in your language)

Solution:
Then you have to follow this resolution: http://support.microsoft.com/kb/939313/en-us

When you run the commandline (execution may take 10-15 min.)
hcinstal.exe /act InstallAllHCs
and you experience the error
Outcome code is: 256
you have run this code probably with not sufficient privileges to the database. Run this code with your farm admin account.

Donnerstag, 28. Juli 2011

Unable to deactivate and delete sandbox solution?

1. I have made a template from a given SharePoint site
2. Uploaded it to another site collection to create new sites. (So the web site template is actually a sandboxed solution.)
3. Now, I created a subsite from that template, deleted that site and then wanted to remove the solution. Therefore I had to deactivate it before.
4. Tried to deactivate the solution - Boooom...

The error message I received was:

"Unable to access web scoped feature (Id: 10ef0abc-dbd4-484a-b9a9-4cc425e7dc0b) because it references a non-existent or broken web (Id: 56ab1e1e-a09a-4783-9947-3d79bc6473aa) on site 'http://wfe2'. Exception: System.ArgumentException: Value does not fall within the expected range. at Microsoft.SharePoint.SPWebCollection.get_Item(Guid id) at Microsoft.SharePoint.SPFeatureEnumeratorBase.GetCachedWeb(SPSite site, Guid webId, Guid featureId)"

The solution is, there is still the deleted site in the SharePoint database and the features from within the template are activated. Sandboxed solutions containing site templates cannot be deactivated and deleted when there are still sites available based on this template. So the features are a reference to that template (and its solution) and you are not able to deactivate it as long as this reference exists.


You have to don't just delete the site, you have to remove it from the recycle bin as well. So you have to be a site collection admin and delete the site from "site collection recycle bin".

Montag, 26. Juli 2010

Data Source Conflict

If you are developing BCS solutions in Visual Studio, you might have experienced the following error when you attempt to create or update a new item in an external list:

DataFormWebPartException: Data Source Conflict: Your changes conflict with those made concurrently by another user. Refresh the form and submit your changes again.

Solution: In your Visual Studio 2010 BCS project, find the Create or Update method that's failing. Verify that each of the fields in your input type descriptor have the Creator property (for the Create method) or Updater property (for the Update method) set to True.
Note, this property should not be set to true for the identifier field if the LOB auto generates the value. You also need to delete and re-add the external list before the changes take effect. (Because the object definition of the external content type is saved in the existing list and does not change when you update the BCS model.)

Montag, 19. Juli 2010

There are no addresses available for this application

After creating a Business Data Connectivity Service Application in SharePoint 2010 I wasn’t able to access the service application with the BDC models, external systems and external content types.
I tried to deploy a Visual Studio Solution by hitting F5. The error message I received was: "Error occurred in deployment step 'Add Solution': There are no addresses available for this application.” Clicking the BCS under "Manage service applications" got the same error.
Solution:
Check that the service under "Manage services on server" is running. If the error occures despite the service is running, restart the IIS with "iisreset".

Debugging SharePoint Solutions

You are using Visual Studio 2010 on a SharePoint 2010 site and get an error when hitting F5 to begin debugging....
The debugger may fail to start and complain that the web.config could not be loaded with the error message: “Could not load the Web.config configuration file. Check the file for any malformed XML elements, and try again. The following error occurred: The given key was not present in the dictionary.”
Make sure the URL assigned to the Default zone for the Web Application’s Alternate Access Mappings matches the Site URL of the SharePoint project in Visual Studio. Using one of the other zones (like Intranet) for the URL will not work. The Default Zone and the project’s Site URL need to match.