Archive

Kategorien

Links

Andere Blogs




ITaCS GmbH

Oct 232013

SQL Access to Configuration DB required

In many cases you pass an URL string to connect to SharePoint. In my case I wanted to verify the URL by using this code:

  1: Uri requestUri;
  2: if (!Uri.TryCreate(absoluteUrl, UriKind.Absolute, out requestUri))
  3:   throw new ArgumentException(absoluteUrl + " is no a valid URL.");
  4: 
  5: SPWebApplication webApplication = SPWebApplication.Lookup(requestUri);

And here comes the “but”. I did not know that the account, which is executing the code, needs permissions to the Configuration Database!

So either grant permissions, or use something like this:

  1: using (var site = new SPSite(requestUri.AbsoluteUri))
  2: {
  3:   SPWebApplication webApplication = site.WebApplication;
  4: }

Happy SharePointing…


Published: 10/23/2013  5:26 PM | 0  Comments | 0  Links to this post
Tagged as: Development, SharePoint

Oct 142013

Cleanup your VMs from old Updates

Windows Update leaves lots of files, which you don’t need anymore. The Disk Cleanup utility lets you remove those files.

Unfortunately the tool needs to be “installed” on Windows Server 2008 and 2008 R2. There is a Guide over here –> http://technet.microsoft.com/en-us/library/ff630161%28WS.10%29.aspx

Instructions for Windows Server 2012 are within the comments of the linked article.


Published: 10/14/2013  9:09 AM | 0  Comments | 0  Links to this post
Tagged as: Windows, VMWare

Sep 262013

Idle or Running?

Dear SharePoint Crawler. Are you currently working?

image


Published: 9/26/2013  11:40 AM | 0  Comments | 0  Links to this post
Tagged as: SharePoint

Sep 182013

When a Feature gets installed

Have you ever thought about the Features folder and when a folder will be created for one of you features? Well, I did Smile

Why is this relevant, anyway? To be able to activate a feature on a given scope, it has to be installed first. That’s why.

Action Result
stsadm -o addsolution The solution is added to the farm. Features are not available
stsadm -o deploysolution Feature folders are created and the Features are available for activation
stsadm -o installfeature A feature with ID xyz has already been installed in this farm.  Use the force attribute to explicitly re-install the feature.

Great. After deploying the solution, the feature is automatically installed and can be used. I did expect this, because installing a feature is a rather uncommon task.

Here comes another one. What if you add a feature to an existing – and deployed solution – and perform an upgrade?

Action Result
stsadm -o upgradesolution Adds the new feature folder
stsadm -o activatefeature Feature with Id '4520d607-699b-4025-b605-5f988c97b368' is not installed in this farm, and cannot be added to this scope.

Ups. Did you expect the result? The feature has to be installed first!

Conclusion

If you add a feature to a solution, make sure the features gets installed prior usage! There are two ways

  1. Install the new feature
  2. Retract and Redeploy the solution

Published: 9/18/2013  8:33 AM | 0  Comments | 0  Links to this post
Tagged as: Solution, SharePoint, Development