SharePoint App Deployment fails
Visual Studio does not tell you much if an app deployment fails.
Fortunately SharePoint will log more information about the problem that occurred during the app deployment in the ULS-Log.
So if you run into the “There were deployment errors.” exception, take a look at the ULS-Log. In this particular case SharePoint didn’t like my JavaScript:
App Packaging: CreatePackage: Unexpected exception: There were errors when validating the App package: There were errors when validating the App Package. Other warnings / errors associated with this exception: Custom action urls must start with "http:", "https:", "~appWebUrl" or "~remoteAppUrl". The url "javascript:DoSomething();" is not in the right format.
The solution for warming up SharePoint
Most SharePoint Farms will have a solution for the long loading time after an Application Pool recycle or iisreset running. There are many different ways to preload websites, so your users have faster load times. So why another solution?
There are some questions, that I think have not been dealt with before:
- Most solutions require some sort of Timer to be started (e.g. a Scheduled Task)
- When should the warmup occur?
- What about multiple WebFrontend Servers?
- How about Claims support?
- Which URLs have to be called? What about extended WebApplications?
- New WebApplications require the warmup tool to be adjusted
- Manuell warmup after Deployments
- What about search?
- Did the Farm warmup correctly?
Years ago I developed a console application, which warms up SharePoint by calling each Site within a SiteCollection. It has bee updated multiple times with new features.
SharePoint 2013 SDK
How could I miss the release of the SharePoint 2013 SDK in November?
http://www.microsoft.com/en-us/download/details.aspx?id=30722
Anyway. Finally the non-preview version has been released 🙂
Building a Visual Studio project for SP2010/SP2013 (.NET 3.5/4.0)
In this post I will show you how you can use MSBuild to target your project for .NET 3.5 or .NET 4.0 and use a separate app.config file for each.
My Warmup Tool is supposed to work with SP2010 and SP2013. To achieve that compatibility, I have to change the TargetFramework of the project to be able to compile, as well as the app.config so the application uses the desired Framework. I didn’t want to change the values every time manually. An automated solution has to be possible. And it is. Some little changes to the project file and MSBuild will do all the work for you 🙂
Speed up SharePoint Update Installation
Installing Updates for SharePoint 2013 will take a long time, if you don’t disable some services prior starting the update process by executing the hotfix exe file. To simplify the installation, and speeding it up, you can use a PowerShell script to stop the necessary services, and start the update.
You need to copy the code, and save it as e.g. Install_SharePoint_Update.ps1 in the same folder as the exe file. Start the script from the “SharePoint Management Shell”. It will take care of the services for you.
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!
Idle or Running?
Dear SharePoint Crawler. Are you currently working?
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 🙂
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 |
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.
CKS – Dev for Visual Studio 2012 and 2013
The new release brings support for Visual Studio 2013 🙂
The CKS – Development Tools Edition for Visual Studio 2012 and 2013 is a collection of Visual Studio templates, Server Explorer extensions and tools providing accelerated SharePoint 2010/2013 development based on Microsoft’s SharePoint 2010/2013 development tools.
http://visualstudiogallery.msdn.microsoft.com/cf1225b4-aa83-4282-b4c6-34feec8fc5ec?SRC=VSIDE
Activating Features after Solution Deployment via VS
Visual Studio allow a F5 Deployment. I guess you all know that. The part where you have to think carefully is, when you add Features to your project.
Should you activate “Activate On Default”? Well, it depends (as always). Usually I don’t enable that setting, because features tend to be activated on scopes you won’t expect.
The problem
Take a WebApplication scoped feature for example. It might create SafeControl entries for your controls. Do you really want them to be added to an Extranet WebApplication if your solution is solely for an Intranet Application?
Slow DFS Crawling in SharePoint
If you are indexing you DFS with SharePoint 2007/2010, you should take a look at this hotfix http://support.microsoft.com/kb/967671.
It addresses this issue “When you crawl the file shares in Microsoft Office SharePoint Server 2007 or Microsoft SharePoint Server 2010, you experience poor performance”.
SPQuery for my tasks
Developing solution with multiple languages (or a language which is not English) sometimes can be a bit painful. To configure a Webpart to display only my tasks, I would filter for [Me] or [Ich].
To achieve the same via code / CAML, you can filter by UserID and not the string “Me”.
1: <Where>2: <Eq>3: <FieldRef Name="AssignedTo" />4: <Value Type="Integer">5: <UserID />6: </Value>7: </Eq>8: </Where>9: <OrderBy>10: <FieldRef Name="Status" />11: <FieldRef Name="Priority" />12: </OrderBy>This is just a reminder for me, so I can find the information more quickly. But maybe this is useful for some of you as well 🙂
Do long running operations on SPListItem creation
Events on SPListItems like ItemAdding or ItemAdded are nothing new. Many of you have already used them. Recently I had a requirement to create a new SPSite, when an item in a list has been created. So an ItemReceiver was my choice.
But the customer wants something special 🙂 During the creation process, which takes some seconds, the user should see a loading animation.
CKS – Dev for Visual Studio 2012
The Tools have been released for VS 2012. Great!
The CKS – Development Tools Edition for Visual Studio 2012 is a collection of Visual Studio templates, Server Explorer extensions and tools providing accelerated SharePoint 2010/2013 development based on Microsoft’s SharePoint 2010/2013 development tools.
The current 1.0 release includes the following features:
- Server Exploration from CKSDev 2010 v2.4 – Visual Studio 2012 version of the Visual Studio 2010 exploration. Includes all the existing server explorer features.
- Quick Deploy extensions from CKSDev 2010 v2.4 – Visual Studio 2012 version of the Visual Studio 2010 quick deploy. Includes all the existing quick deploy features.
About the Community Kit for SharePoint
Now Available: Office Developer Tools for Visual Studio 2012
Finally! Now Available: Office Developer Tools for Visual Studio 2012
There are some points to mention, where the final release of the tools differ from previous preview releases:
- validation experience that helps you to find and fix common errors prior to submitting your apps to the Office Store
- A continuous integration workflow
- Windows Azure cloud service projects for creating provider-hosted Apps
- A dramatically improved Workflow designer
The download link: http://aka.ms/OfficeDevToolsForVS2012
