Search This Blog

Loading...

Wednesday, August 25, 2010

WCF: The service cannot be activated because it does not support ASP.NET compatibility

WCF Error:
The service cannot be activated because it does not support ASP.NET compatibility. ASP.NET compatibility is enabled for this application. Turn off ASP.NET compatibility mode in the web.config or add the AspNetCompatibilityRequirements attribute to the service type with RequirementsMode setting as 'Allowed' or 'Required'.

Solutions:
within source code:

[AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]

within web config
<serviceHostingEnvironment multipleSiteBindingsEnabled="true" aspNetCompatibilityEnabled="false" />

Friday, August 20, 2010

Change SID in windows 7 and Windows Server 2008 R2

In earlier version of windows, you can using SysInternal's NewSID. But in later version of Windows, this tools is not supported again. 
You can using sysprep to change SID for windows 7 and windows server 2008 R2.
From Run menu, type sysprep. This will open sysprep folder which is located in c:\Windows\System32. Open sysprep application.
This will open System Preparation Tool 3.14 window. As a System Cleanup Action select Enter System Out-of-Box Experience (OOBE)Important: select Generalize if you want to change SID, it’s not selected by default. As Shutdown Options select Reboot.