When I configure a test environment, that are using https, I need a certificate. To create a self-signed certificates, you must do a few things to get it to work on a host header. This problem and solution, Rob Bagby written about here http://www.robbagby.com/iis/self-signed-certificates-on-iis-7-the-easy-way-and-the-most-effective-way/
Sunday, February 16, 2014
Monday, February 10, 2014
What are the plans during the year for the Danish SharePoint Community?
After a Merry Christmas and a wonderful New Year's is there already, although winter cold, many events scheduled in the Danish SharePoint community. There has already announced two events. One knowledge sharing event and the second is a SharePoint dinner. You can find information about the events at http://spbg.dk.
What are the plans during the year? There is planned a knowledge sharing event about "round table discussion about app development vs. Solution farm development. For and against.". The events is not published yet but we are holding it at Bane Denmark on May 8th. The work around the annual celebration have already begun, which this year planned to take place in late summer. If all works out, there will also be an event around TFS online. End between all the wonderful knowledge share and social events, in between all the events that will hopefully be time a SharePoint Pint or two.
Sunday, February 9, 2014
A little REST
This REST query shows how to retrieve user information from a given version of a file:
https://dissingconsulting.sharepoint.com/_api/Web/GetFileByServerRelativeUrl('/Shared%20Documents/test.docx')/Versions(1)/?$expand=CreatedBy
The query will include both the version information and the user information.
First: Query the file
https://dissingconsulting.sharepoint.com/_api/Web/GetFileByServerRelativeUrl('/Shared%20Documents/test.docx')
Second: Query the first version of the file
/Versions(1)
Third: Use the expand function to retrieve the user information. Remember to add the $ in to the query string, to tell the rest service, the “expand” argument is a function
?$expand=CreatedBy
Sunday, January 19, 2014
Load .net 4 assembly in PowerShell
One thing I often do when I'm working with SharePoint is to reuse code that I have put in a assembly, e.g. a manager class that perform a task during deployment. In SharePoint 2010, I picked up assembly in PowerShell via the static method System.Reflection.Assembly.Load. This method loads a given assembly from the GAC. But in .Net 4 is the location of GAC moved to another location “%windir%\Microsoft.NET\assembly\”. This done that System.Reflection.Assembly.Load does not work anymore. Forward I will use System.Reflection.Assembly.LoadWithPartialName or PowerShell cmdlet add-type.
More information about the new CLR Binder can be found here http://msdn.microsoft.com/en-us/magazine/dd727509.aspx
Thursday, November 28, 2013
How to load config file in PowerShell?
I had a problem with a customer where we would like to reuse one WCF endpoint from our web.config file. What Microsoft describes and a lot of blogs on the net, all you have to do is call [AppDomain]::CurrentDomain.SetData ("APP_CONFIG_FILE", $pathToConfig) http://msdn.microsoft.com/en-us/library/37z40s1c(v=vs.110).aspx. But it does not work because PowerShell already has loaded a config file loaded. Therefore, you should reset the config file “context” through reflection. To do so:
1 $pathToConfig = "C:\inetpub\wwwroot\wss\VirtualDirectories\80\web.config"
2 #Set the path to the new config file
3 [AppDomain]::CurrentDomain.SetData("APP_CONFIG_FILE", $pathToConfig)
4 [System.Configuration.ConfigurationManager].GetField("s_initState", [Reflection.BindingFlags] "NonPublic,Static").SetValue($null, 0)