Disclaimer The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.
Applies to:
Microsoft Office SharePoint Portal Server 2003 (SPS 2003)Windows SharePoint Services v2 (WSS v2) probably applies as well to ASP.NET applications with similar problem (web.config xml malformed)
Microsoft Office SharePoint Portal Server 2003 (SPS 2003)Windows SharePoint Services v2 (WSS v2)
probably applies as well to ASP.NET applications with similar problem (web.config xml malformed)
Problem:When trying to access a SharePoint site settings ( /_layouts/2070/settings.aspx (if your SharePoint is in English), or /_layouts/2070/settings.aspx (if your SharePoint is in Portuguese), etc.) and get the following error:
«An error occurred while parsing EntityName. Line 6, position 50.»
Cause:This error was caused by a «&» char on a custom webapp's Web.config stored under the LAYOUTS/2070/LPUtilities folder:
<?xml version="1.0" encoding="utf-8"?><configuration> <appSettings> <add key="LearningPortalUtilities.edsps.CSDataServiceEx" value="http://www.example.com/CsWebApp/dataservice2/service.asmx"/> <add key="PDApproverUsername" value="someUser"></add> <add key="PDApproverPassword" value="some&password"></add> <add key="PDApproverDomain" value="DOMAIN"></add> <add key="LearningPortalUtilities.edu.demo.portal.Lists" value="http://www.example.com/_vti_bin/lists.asmx" /> </appSettings> </configuration>
While parsing this file, when the «&» char was hit, an exception was thrown with the error message mentioned above.
Solution:The «&» char must be substituted with a Html Entity:
<?xml version="1.0" encoding="utf-8"?><configuration> <appSettings> <add key="LearningPortalUtilities.edsps.CSDataServiceEx" value="http://www.example.com/CsWebApp/dataservice2/service.asmx" /> <add key="PDApproverUsername" value="someUser"></add> <add key="PDApproverPassword" value="some&password"></add> <add key="PDApproverDomain" value="DOMAIN"></add> <add key="LearningPortalUtilities.edu.demo.portal.Lists" value="http://www.example.com/_vti_bin/lists.asmx" /> </appSettings> </configuration>
Hope this helps someone out there.