Posts

Showing posts from December, 2013

SharePoint 2013 Apps - SPLanguage URL Token is based on Locale

When developing SharePoint Apps for multilingual sites, you usually need to know what language to use on your site based on the SharePoint UI language.  By default, SharePoint passing in a SPLanguage URL query string to indicate the language (i.e. en-US). http://localhost:2782/Pages/Default.aspx?SPHostUrl=http%3A%2F%2Fdev%2Eironman%2E%2Ecom%2Fsites%2Ftest4& SPLanguage =fr%2DCA&SPClientTag=4&SPProductNumber=15%2E0%2E4481%2E1005 However, the SPLanguage value is not based on the language setting of the host web or user profile language preference (in case of MUI).  After a bit of testing, it turns out that the SPLanguage is based on the locale of the host web or user profile locale settings.  It is very weird ... I think.  And it's not really reflecting the UI language that an user seeing on the SharePoint site. To make it all working, it's better to write code to determine the actual language to display in your app.  The logic that I use (for MUI...

SharePoint 2013 Domain Certificate for Provider-Host App Development Environment

Creating Self-Signed (domain) Certificate for Provider-Hosted App This is the certificate that will be used on the IIS site to make it SSL enabled site.  It’s different from the one to create the STS Security token.  If the certificate is not created with proper domain associated, you’ll have issues with calling the App Event Receivers.  To create the certificate and set it up on IIS, following the instruction below: Open Visual Studio Developer Command Prompt and type the following command makecert -r -pe -n "CN= spapps.rchen.com " -b 01/01/2013 -e 01/11/2015 -eku 1.3.6.1.5.5.7.3.1 -ss my -sr localMachine -sky exchange -sy 12 -sp "Microsoft RSA SChannel Cryptographic Provider" " D:\ Certs\SPAppCert.cer " certmgr /add " D:\ Certs\SPAppCert.cer " /s /r localMachine root *** You need to replace the domain ( spapps.rchen.com ) with your domain and the file path for the new certificate. Open MMC.exe and add C...