Unable to compile SharePoint 2010 StarterSite after applying hotfix KB975603
-
Wednesday, October 27, 2010 10:11 PM
I have just installed SharePoint Foundation 2010, Commerce Server 2009 and a recompiled version of the SP2010 Starter Site from the extensibility kit. The recompiled version of the starter site is a complete replica of the original but with a new keyfile. All references to the old public keytoken has been replaced.
When I browse the default zone (Claims Based Authentication with NTLM) I get this error:
Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'.Today I learned that there is a hotfix that fixes this issue (KB975603) so I requested and downloaded the hotfix. The hotfix contains an updated version of the file 'SiteContext.cs'. My problem is that the updated version is missing a public static property called CommerceMembershipProvider and a public static method called RetrieveValueFromClaims. Both are used from other classes. This is most unfortunate because my project no longer can compile.
Somehow the code from the extensibility kit is out of sync with the SiteContext.cs from the hotfix but I can't find a more recent version of the extensibility kit than the one published 6/16-2010. Can anyone enlighten me on how to get a compiling (and working :-) version of the Extensibility Kit with this hotfix applied?
Answers
-
Monday, November 01, 2010 2:26 PM
There might be some issues I can see:
- KB975603 is dealing with the issue if SQL Server and Commerce Server are installed on the machine different machines. Is this your configuration?
- Besides, as you are using SharePoint 2010, have you installed Commerce Server Template pack for SP2010? If so, the KB975603 is already included so you don't need (should not) re-install it. If not, you should have it installed in order to support SP2010 from Commerce Server 2009. It can be free downloaded from: http://www.microsoft.com/downloads/en/details.aspx?FamilyID=CFD0C459-5A11-4DE6-9085-52D59E8D38E6&%3Bdisplaylang=en
- There is another known issue on CS default zone with SP2010 if an IIS Hotfix (KB979917) is installed (which is recommended by SP2010). So you problem might be related to that instead. The workaround is to change the AllowAnonymousImpersonation value from default value “true” to “false”:
web.config <appSettings> section.
<add key="aspnet:AllowAnonymousImpersonation" value="false" />
Hope it helps
- Marked As Answer by johoffma Tuesday, November 02, 2010 7:34 AM
All Replies
-
Monday, November 01, 2010 2:26 PM
There might be some issues I can see:
- KB975603 is dealing with the issue if SQL Server and Commerce Server are installed on the machine different machines. Is this your configuration?
- Besides, as you are using SharePoint 2010, have you installed Commerce Server Template pack for SP2010? If so, the KB975603 is already included so you don't need (should not) re-install it. If not, you should have it installed in order to support SP2010 from Commerce Server 2009. It can be free downloaded from: http://www.microsoft.com/downloads/en/details.aspx?FamilyID=CFD0C459-5A11-4DE6-9085-52D59E8D38E6&%3Bdisplaylang=en
- There is another known issue on CS default zone with SP2010 if an IIS Hotfix (KB979917) is installed (which is recommended by SP2010). So you problem might be related to that instead. The workaround is to change the AllowAnonymousImpersonation value from default value “true” to “false”:
web.config <appSettings> section.
<add key="aspnet:AllowAnonymousImpersonation" value="false" />
Hope it helps
- Marked As Answer by johoffma Tuesday, November 02, 2010 7:34 AM
-
Monday, November 01, 2010 3:04 PM
Thanks for your reply. It helped me solve the problem with "Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'".
Here's my answers to your questions:
1. SQL Server is installed on one machine and Commerce Server is installed on another machine
2. I wasn't aware of KB975603 being included in the Commerce Server Template Pack for SP2010. It is however stated in the installtion manuel (CS2009_TempPackSP2010_Install.docx) so I must have missed it.
3. I have changed the default value of aspnet:AllowAnonymousImpersonation to false and that did the trick. I can now log into the default zone with NTLM authentication.
I'm still puzzled about the change of public interface in SiteContext.cs. Can you perhaps elaborate on this? Why does the hotfix include a changed version of SiteContext.cs when the hotfix is already included in the Template Pack for SP2010?
-
Monday, November 01, 2010 3:40 PM
The KB975603 is against CS2009 RTM and the source code it contains is for the extensibility kit comes with CS09 RTM.
In SP2010 Template pack, we have done some changes in order to support SP2010, mainly the claim based authentication, and probably that is the reason you are seeing "change of public interface" which is not actually from hotfix change and maybe instead due to the difference of two versions (one for CS09 RTM and the other for TP for SP2010).
In your case, you should use the NEW extensibility kit comes from SP2010 TP if you want to do any customization on web parts. As the fix for KB975603 is already included in the source code, you don't have to change SiteContext.cs for TP version.
-
Tuesday, November 02, 2010 7:37 AMThanks for clearing that up. It all makes sense to me now