April 15, 2013

Multiple GAC .net Framework 4.0

After installing the .net framework you will see multiple GAC folders. or sometime you try to fine the assembly in GAC its not there. because 4.0 Gac is installed at different location.

Why there are multiple GAC.

Because till 2.0, microsoft was uniquenly identifying assembly by 4 dimensions

1) Name
2) Version
3) Public key
4) Culture

in 4.0 they facing some issues keeping 4.0 assemblies in the same 2.0 GAC.

Path for Gacutil.exe
for Framework 2.0 assembly
C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin

For Framewokr 3.5 assembly
C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin

For Framework 4.0 assembly
C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\NETFX 4.0 Tools

GAC (Global assembly Cache) Path:

for .NET framework  2.0 & 3.5 :
c:\windows\assembly (32bit, 64bit, MSIL)

.NET 4.0 GAC
in 4.0 assembly go into its different folder depending on its compilation
c:\windows\Microsoft.NET\assembly\GAC_32 (32bit only)
c:\windows\Microsoft.NET\assembly\GAC_64 (64bit only)
c:\windows\Microsoft.NET\assembly\GAC_MSIL (any CPU)
also 4.0 does not have GAC Viewer. 

April 08, 2013

Tridion permission to access protected database section MMC, RSA Container

Tridion User do not have permission to access  protected database section in MMC console,  Contact your system administrator. or change General setting values.
or
Account has no permission to access the protected configuration section 'tridion.security.

Even though i am local administrator on the Windows 2008 R2 server.

Solution: this is actually problem of  KeyContainer on Windows 2008 R2 server. Whoever create it first became the supreme owner, he needs to give the access to other users to make any change

Step1: login using person's credentials. who actually created that container. eg. in Tridion who installed the Tridion.

step2: aspnet_regiis -pa "TridionRsaKeyContainer" "<domain>\<account>" -full

in case of tridion "TridionRsaKeyContainer" is the container name, but it will work for any container issue. just replace the container name.

Other solution:


1) Login using persons credentilas who actully installed application that created that RSA Container.

2) go to C:\Documents and Settings\All Users\Application Data\Microsoft\Crypto\RSA\MachineKeys\ 
find the Particular machine key in above folder.
How to search

1) Date on which particular application was installed/ container were created
2) You will see the name of the person in permission list who created it.

give administrator permission to that system file.

it will surely work.

April 05, 2013

Content Porter 2009 SP2 Unable to get list of child items


Error: Unable to get list of child items in Content Porter 2009 Sp2

Communicator returned an error: Could not create or initialize XmlResponder object

Impersonation by this user requires the IIS APPPOOL\DefaultAppPool account to be configured as impersonation user


Solution: In IIS ImportExportService under SDL Tridion website was configured using deafult app pool and my default pool was having different User rather than Network Service, when i changed the user, problem got resolved.

Detailed Error message for reference


<?xml version="1.0" standalone="yes"?>
<tcm:Error ErrorCode="80040302" Category="16" Source="Kernel" Severity="2" xmlns:tcm="http://www.tridion.com/ContentManager/5.0"><tcm:Line ErrorCode="80040302" Cause="false" MessageID="4394"><![CDATA[Unable to Initialize TDSE object.]]><tcm:Token>RESID_4537</tcm:Token><tcm:Token>TDSE</tcm:Token></tcm:Line><tcm:Line ErrorCode="80040302" Cause="true"><![CDATA[Impersonation by this user requires the IIS APPPOOL\DefaultAppPool account to be configured as impersonation user.]]><tcm:Token>IIS APPPOOL\DefaultAppPool</tcm:Token></tcm:Line><tcm:Details><tcm:CallStack><tcm:Location>Tridion.ContentManager.Security.AuthorizationManager.GetImpersonationUserSettings(String)</tcm:Location><tcm:Location>Tridion.ContentManager.Security.AuthorizationManager.LoadAccessToken(String,String)</tcm:Location><tcm:Location>Tridion.ContentManager.Session..ctor(String,String,UserContext)</tcm:Location><tcm:Location>Tridion.ContentManager.BLFacade.SystemFacade.InitializeUserContext(UserContext,String,String)</tcm:Location><tcm:Location>UtilitiesTDS.GetUserContext</tcm:Location><tcm:Location>TDSE.Initialize</tcm:Location><tcm:Location>XMLResponder.Initialize</tcm:Location></tcm:CallStack></tcm:Details></tcm:Error>

IIS overrides Response.StatusCode and showing default error page instead of custom message in ajax

in asp.net/mvc whenResponse.StatusCode is set, IIS 7.5 by default capture the response and inject default page according to the status code.

My following code was working fine on IIS 6, but as soon as i port this code on 7.5 i started getting following issue.

Response.StatusCode = 404; return new ContentResult { Content = "Not Found"}; 

ajax({type: "POST",url: d,data: f,success: function(h, j) {
g.redirectUrl();
},error: function(j, h) {
b._displayError(j.responseText);
}});

404 - FILE OR DIRECTORY NOT FOUND.

The resource you are looking for might have been removed, had its name changed, or is temporarily unavailable.



It should have shown error message "Not Found" message.

Solution: To avoid IIS to inject default page. Add following into the Web.config of your app.

<system.webServer>
    <httpErrors existingResponse="PassThrough" />
  </system.webServer>