Tuesday, January 26, 2010

SSO enabled Sitecore interfere with uploading of media into library

Recently, I faced with an issue whereby when SSO (single sign on) is enabled on Sitecore website and try to upload media onto library, it will prompt for username and password and when valid username and password is entered, it will hang. strangely, it happens for IE7 only. I have tested on IE8 it works fine!

I have logged a support to Sitecore, and the solution that they provided, which was

setting "Upload.Classic" = true in web.config is the solution

Monday, January 18, 2010

WCF - Error 404.3 when trying to access the SVC file

It turns out that WCF is not active by default. Followings are the steps to active WCF

1. Click Start
2. Click Run
3. Type "Optional Features"
4. Tick "Microsoft .NET Framework 3.0 the Windows Communication Foundation HTTP Activate" & "the Windows Communication Foundation non-HTTP Activate"

Wednesday, January 13, 2010

CryptographicException file not found in Sitecore

Today I came across issue with CryptographicException file not found in Sitecore. See below

Server Error in '/' Application.

The system cannot find the file specified.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Security.Cryptography.CryptographicException: The system cannot find the file specified.


Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.



Stack Trace:

[CryptographicException: The system cannot find the file specified. ]    
System.Security.Cryptography.Utils.CreateProvHandle
 (CspParameters parameters, Boolean randomKeyContainer) +7715070    
System.Security.Cryptography.DSACryptoServiceProvider.ImportParameters
 (DSAParameters parameters) +258    
System.Security.Cryptography.DSA.FromXmlString(String xmlString) +501    
Sitecore.Nexus.Licensing.NexusLicenseApi. (String xml, Guid instance) +138    
Sitecore.Nexus.Licensing.NexusLicenseApi.GetSnapShot(Guid instance) +764    
Sitecore.SecurityModel.License.LicenseManager.GetSnapshotData(Guid instance) +59    
Sitecore.SecurityModel.License.LicenseManager.UpdateSnapshot() +103    
Sitecore.SecurityModel.License.LicenseManager.Initialize() +8    
Sitecore.Nexus.Web.HttpModule.Application_Start() +76    
Sitecore.Nexus.Web.HttpModule.Init(HttpApplication app) +435    
System.Web.HttpApplication.InitModulesCommon() +65    
System.Web.HttpApplication.InitModules() +43    
System.Web.HttpApplication.InitInternal
 (HttpContext context, HttpApplicationState state, MethodInfo[] handlers) +729   
System.Web.HttpApplicationFactory.GetNormalApplicationInstance
 (HttpContext context) +298    
System.Web.HttpApplicationFactory.GetApplicationInstance(HttpContext context) +107    
System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) +289 


Version Information: Microsoft .NET Framework Version:2.0.50727.4927; ASP.NET Version:2.0.50727.4927
After consulting with my colleague, the solution is to do with IIS settings.

To resolve this,

1. go to IIS Manager
2. go to the application pool instance
3. click advanced settings
4. Under Process model, set Load User Profile to true

Tuesday, January 12, 2010

JQuery JSON disable asynchrounous call

jQuery.ajax({
url: hostBlogUrl + getDaysInMonthWithEntryService,
type: "POST",
contentType: "application/json; charset=utf-8",
data: "{'blogID':'" + pBlogID + "', 'month':" + pMonth + ", 'year':" + pYear + "}",
dataType: "json",
success: function(response) {
var daysArray = response.d;
days = daysArray;
return daysArray;
},
error: function(req, status, er) {
alert("An error occurred whilst submitting your request.\r\n" + status + " " + er);
},
async: false
});