Office 365 – Public Website

Mmm, my last blogposts are indicating than I’m currently working on an Office 365 project ūüôā

One of the requirements is¬†the have a¬†public website¬†in Office 365 where anonymous users can download free folders, brochures etc… so no rocket science or rare questions…

When you create a public site you will see that you get an out-of-the-box website with basic CMS tools. I think that my grandma can change the design (So it’s user-friendly!!)¬†but a customer who pays for an”enterprise” SharePoint plan will not have a big “whauw” effect…

The following issues / problems¬†didn’t make me happy but can be easly solved!

  • You will see that the Site Actions menu is trimmed down: No link available to the Site Settings page to activate some features and tweak you site
    • No problem: just add “/_layouts/settings.aspx” in your url and you are there.
    • on the Settings page,¬†go to the QuickLaunch and add a link to this¬†Settings.aspx page (easy for the future!)
  • There is no link¬†on a library or list to change some settings
    • Go to your general “Site Settings” page and use the link “Site Libraries and Lists”
  • Activating¬†the Publishing Infrastructure feature¬†gives you some “unexpected” errors, and since you are on Office 365, you cannot look in the logfiles!
    • ¬†I had this problem a long time ago on an on-premise SharePoint installation. The “unexpected” error means that the feature can’t create a couple of libraries (nice FeatureReceiver… but anyway :-)) because those libraries are allready there!
    • Solution:
      • Open you’re SP Designer 2010, and¬†rename all the default libraries (also the URL path) to something like “rename_documents” … (except the Style Library because this library¬†does not depend on this feature)
      • When this is complete, your public website looks like a standard SharePoint Foundation intranet (much nicer and you can work with the default masterpage to change the design!)
      • (optional), now you have the possibility to activate the Publishing Infrastructure features on Site Collection -and Site level.
      • (optional) at this moment you can have “normal” SharePoint pages, so you can use your own custom Sandbox solutions on Office 365!

Simple solution and no coding required! if you are familiar with SharePoint and SharePoint Designer, you can create some nice stuff on the platform!

Posted in Geen categorie | Tagged , | Leave a comment

Office 365 – Developing WebParts: , no javascript calls?

I’m developing a WebPart to visualise the complete navigation of a SharePoint site.

I thought, using the out-of-the-box ASP:TreeView component will do the job…NOT! ūüôā

The visualisation is nice (depends on what you expect :-)), but the expanding and collapsing of nodes doesn’t work. Perhaps some missing links towards some javascript stuff…

I started using a JQuery TreeView implementation and all went very¬†smoothly ūüôā

Happy Trooper again ūüôā

Posted in Geen categorie | Tagged , | Leave a comment

Office 365 – Developing WebParts: async delegates not working?

Creating a delegate, ¬†execute it asynchronous: it doesn’t work :-s

you will receive this exception:

System.InvalidOperationException was unhandled by user code

Message=The sharepoint subset OM has been disabled for the current thread.

Posted in Geen categorie | Tagged , | Leave a comment

Task applicationcontent has stopped and failed

I ran into the error of “Task applicationcontent has stopped and failed”¬†when running the Configuration Wizard after the installing of Service Pack 1.

At that moment, you need to check your log files (C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\LOGS)

Detailed exception:

– Task applicationcontent has failed
debugMessage for task applicationcontent is An exception of type System.NullReferenceException was thrown.  Additional exception information: Object reference not set to an instance of an object. System.NullReferenceException: Object reference not set to an instance of an object.    at Microsoft.SharePoint.Administration.SPAspConfigurationFile.ApplyActionToXmlDocument(XmlDocument xdAction, XmlDocument xd, String sourceFileName, SupportedXmlDocutmentActions supportedActions)    at Microsoft.SharePoint.Administration.SPAspConfigurationFile.MergeWebConfig(XmlDocument xdWebConfig, String fileMask)    at Microsoft.SharePoint.Administration.SPWebService.ApplyApplicationContentToLocalServer()    at Microsoft.SharePoint.PostSetupConfiguration.ApplicationContentTask.Run()    at Microsoft.SharePoint.PostSetupConfiguration.TaskThread.ExecuteTask()

Solution: The answer is hidden in the exception message (not always!)

One of the custom web.config files was out-dated and not removed on that server (extra WFE server in the farm) .(location of the config files: C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\CONFIG)

After removing the custom config file, the configuration wizard didn’t complain.

Keep in de mind that the configuration wizard will merge all those separated config files. So those files needs to be correctly and also well-formed!

Posted in Geen categorie | Tagged , | 2 Comments

Office 365 – WebCreationInformation: Overview of available Templates

Creating sharepoint sites programmatically in Office 365 (SharePoint online) is very easy! The table below gives an overview of all available web templates from which you can choose and use in the small code snippet.

I didn’t test every template ūüôā

rootWeb = rootWeb.Webs.Add(new WebCreationInformation
Description = siteDescription,
Title = siteTitle,
Url = siteUrl,
UseSamePermissionsAsParentSite = false,
WebTemplate = “STS#1

Web Template Overview:

TemplateID Template Name Template Title
0 GLOBAL#0 Global template
1 STS#0 Team Site
1 STS#1 Blank Site
1 STS#2 Document Workspace
2 MPS#0 Basic Meeting Workspace
2 MPS#1 Blank Meeting Workspace
2 MPS#2 Decision Meeting Workspace
2 MPS#3 Social Meeting Workspace
2 MPS#4 Multipage Meeting Workspace
3 CENTRALADMIN#0 Central Admin Site
4 WIKI#0 Wiki Site
9 BLOG#0 Blog
15 SGS#0 Group Work Site
16 TENANTADMIN#0 Tenant Admin Site
2764 ACCSRV#0 Access Services Site
2764 ACCSRV#1 Assets Web Database
2764 ACCSRV#3 Charitable Contributions Web Database
2764 ACCSRV#4 Contacts Web Database
2764 ACCSRV#6 Issues Web Database
2764 ACCSRV#5 Projects Web Database
7 BDR#0 Document Center
1611 EXPRESS#0 Express Team Site
14483 OFFILE#0 (obsolete) Records Center
14483 OFFILE#1 Records Center
2009 EHS#0 Express Hosted Site
2009 EHS#1 Express Hosted Site
40 OSRV#0 Shared Services Administration Site
3001 PowerPointBroadcast#0 PowerPoint Broadcast Site
3100 PPSMASite#0 PerformancePoint
3200 BICenterSite#0 Business Intelligence Center
20 SPS#0 SharePoint Portal Server Site
21 SPSPERS#0 SharePoint Portal Server Personal Space
22 SPSMSITE#0 Personalization Site
30 SPSTOC#0 Contents area Template
31 SPSTOPIC#0 Topic area template
32 SPSNEWS#0 News Site
39 CMSPUBLISHING#0 Publishing Site
53 BLANKINTERNET#0 Publishing Site
53 BLANKINTERNET#1 Press Releases Site
53 BLANKINTERNET#2 Publishing Site with Workflow
33 SPSNHOME#0 News Site
34 SPSSITES#0 Site Directory
36 SPSCOMMU#0 Community area template
38 SPSREPORTCENTER#0 Report Center
47 SPSPORTAL#0 Collaboration Portal
50 SRCHCEN#0 Enterprise Search Center
51 PROFILES#0 Profiles
54 SPSMSITEHOST#0 My Site Host
56 ENTERWIKI#0 Enterprise Wiki
90 SRCHCENTERLITE#0 Basic Search Center
90 SRCHCENTERLITE#1 Basic Search Center
2000 SRCHCENTERFAST#0 FAST Search Center
10100 TenantAdminSpo#0 SharePoint Online TenantAdmin
61 visprus#0 Visio Process Repository
Posted in Geen categorie | Tagged , | Leave a comment

How to read a “tCompressedString(varbinary(max))” fieldvalue from a SharePoint content database

this blog helped me to find the solution:

a snippet from my code:

using System.IO.Compression;

SqlBytes bytes = sqlDataReader.GetSqlBytes(sqlDataReader.GetOrdinal(“xmlFields”));
Stream stream = bytes.Stream;
for (int i = 0; i < 14; i++)
DeflateStream deflateStream = new DeflateStream(stream, CompressionMode.Decompress, true);
StreamReader reader = new StreamReader(deflateStream);
string fields = reader.ReadToEnd();

Posted in Geen categorie | Tagged | Leave a comment

Generated Sql views based on SharePoint Content

I think that every SharePoint developer¬†looked into the SharePoint content database to see how all data is stored in sql tables. In case you didn’t, look at it and be surprised ūüôā All SharePoint content is placed in one big table.

All List Fields are translated in sql columns with no-meaning-names like “varchar1, varchar2, varchar3, float1, float2…). So if you want to write an sql to query to query all items from a list, you need to first do some field-translation which can be very time consuming and can causes some serious headaches ūüėČ

In all my years as SharePoint developer / consultant, customers asked me: can we do some reporting based on SharePoint data?? answer: not easy because of the unstructured way that SharePoint saves data in sql …

Within the last couple of days I started to write a console application which generates a lot of Sql Views, depending on your site topology, based on Content Types and Lists.

Listname: “Orders”
ContentTypes enabled?: “Yes”
Extra Fields: “Status”,”Price”

The view thats been generated for this will look like this:

  tp_ID as [ID],
  tp_ListID as [ListID],
  tp_Version as [Version],
  tp_Modified as [Modified],
  tp_Created as [Created],
  nvarchar1 as [Title],
  float1 as [Price],
  nvarchar21 as [Status]
 FROM [SPDBServer].[WSS_Content].dbo.AllUserData
¬†WHERE tp_ContentType = ‘Order’

Reporting Purposes
This is very usefull for reporting, because now you can query this content easier:

SELECT Title, Status, Price
FROM vwCtp_Order
WHERE Status = ‘Final’

Last but not least:
I’m gonna probably put this tool on codeplex. More info will follow.

Posted in Geen categorie | Tagged | 2 Comments