none
An error occurred while parsing EntityName.

    Question

  • hi,

    One or more errors encountered while loading the designer. The errors are listed below. Some errors can be fixed by rebuilding your project,

    One or more errors encountered while loading the designer. The errors are listed below. Some errors can be fixed by rebuilding your project, while others may require code changes.

    An error occurred while parsing EntityName. Line 4, position 28.

    Hide    

    at System.Xml.XmlTextReaderImpl.Throw(Exception e)
    at System.Xml.XmlTextReaderImpl.Throw(String res, String arg)
    at System.Xml.XmlTextReaderImpl.ParseEntityName()
    at System.Xml.XmlTextReaderImpl.ParseAttributeValueSlow(Int32 curPos, Char quoteChar, NodeData attr)
    at System.Xml.XmlTextReaderImpl.ParseAttributes()
    at System.Xml.XmlTextReaderImpl.ParseElement()
    at System.Xml.XmlTextReaderImpl.ParseElementContent()
    at System.Xml.XmlTextReaderImpl.Read()
    at System.Xml.XmlTextReader.Read()
    at Microsoft.VisualStudio.Design.VSTypeResolutionService.GeneratedAssemblyEntry.RealizeMoniker(String moniker)
    at Microsoft.VisualStudio.Design.VSTypeResolutionService.GeneratedAssemblyEntry.get_FileName()
    at Microsoft.VisualStudio.Design.VSTypeResolutionService.AssemblyEntry.get_Assembly()
    at Microsoft.VisualStudio.Design.VSTypeResolutionService.GeneratedAssemblyEntry.get_Assembly()
    at Microsoft.VisualStudio.Design.VSTypeResolutionService.AssemblyEntry.Search(String fullName, String typeName, Boolean ignoreTypeCase, Assembly& assembly, String description)
    at Microsoft.VisualStudio.Design.VSTypeResolutionService.SearchGeneratedEntries(AssemblyName assemblyName, String typeName, Boolean ignoreTypeCase, Assembly& assembly)
    at Microsoft.VisualStudio.Design.VSTypeResolutionService.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase, ReferenceType refType)
    at Microsoft.VisualStudio.Design.Serialization.CodeDom.AggregateTypeResolutionService.GetType(String name, Boolean throwOnError, Boolean ignoreCase)
    at Microsoft.VisualStudio.Design.Serialization.CodeDom.AggregateTypeResolutionService.GetType(String name)
    at System.ComponentModel.Design.Serialization.DesignerSerializationManager.GetType(String typeName)
    at System.ComponentModel.Design.Serialization.DesignerSerializationManager.System.ComponentModel.Design.Serialization.IDesignerSerializationManager.GetType(String typeName)
    at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeExpression(IDesignerSerializationManager manager, String name, CodeExpression expression)
    at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeExpression(IDesignerSerializationManager manager, String name, CodeExpression expression)
    at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeAssignStatement(IDesignerSerializationManager manager, CodeAssignStatement statement)
    at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeStatement(IDesignerSerializationManager manager, CodeStatement statement)

    An error occurred while parsing EntityName. Line 4, position 28.

    Hide    

    at System.Xml.XmlTextReaderImpl.Throw(Exception e)
    at System.Xml.XmlTextReaderImpl.Throw(String res, String arg)
    at System.Xml.XmlTextReaderImpl.ParseEntityName()
    at System.Xml.XmlTextReaderImpl.ParseAttributeValueSlow(Int32 curPos, Char quoteChar, NodeData attr)
    at System.Xml.XmlTextReaderImpl.ParseAttributes()
    at System.Xml.XmlTextReaderImpl.ParseElement()
    at System.Xml.XmlTextReaderImpl.ParseElementContent()
    at System.Xml.XmlTextReaderImpl.Read()
    at System.Xml.XmlTextReader.Read()
    at Microsoft.VisualStudio.Design.VSTypeResolutionService.GeneratedAssemblyEntry.RealizeMoniker(String moniker)
    at Microsoft.VisualStudio.Design.VSTypeResolutionService.GeneratedAssemblyEntry.get_FileName()
    at Microsoft.VisualStudio.Design.VSTypeResolutionService.AssemblyEntry.get_Assembly()
    at Microsoft.VisualStudio.Design.VSTypeResolutionService.GeneratedAssemblyEntry.get_Assembly()
    at Microsoft.VisualStudio.Design.VSTypeResolutionService.AssemblyEntry.Search(String fullName, String typeName, Boolean ignoreTypeCase, Assembly& assembly, String description)
    at Microsoft.VisualStudio.Design.VSTypeResolutionService.SearchGeneratedEntries(AssemblyName assemblyName, String typeName, Boolean ignoreTypeCase, Assembly& assembly)
    at Microsoft.VisualStudio.Design.VSTypeResolutionService.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase, ReferenceType refType)
    at Microsoft.VisualStudio.Design.Serialization.CodeDom.AggregateTypeResolutionService.GetType(String name, Boolean throwOnError, Boolean ignoreCase)
    at Microsoft.VisualStudio.Design.Serialization.CodeDom.AggregateTypeResolutionService.GetType(String name)
    at System.ComponentModel.Design.Serialization.DesignerSerializationManager.GetType(String typeName)
    at System.ComponentModel.Design.Serialization.DesignerSerializationManager.System.ComponentModel.Design.Serialization.IDesignerSerializationManager.GetType(String typeName)
    at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeExpression(IDesignerSerializationManager manager, String name, CodeExpression expression)
    at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeExpression(IDesignerSerializationManager manager, String name, CodeExpression expression)
    at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeAssignStatement(IDesignerSerializationManager manager, CodeAssignStatement statement)
    at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeStatement(IDesignerSerializationManager manager, CodeStatement statement)

    An error occurred while parsing EntityName. Line 4, position 28.

    Details    

    at System.Xml.XmlTextReaderImpl.Throw(Exception e)
    at System.Xml.XmlTextReaderImpl.Throw(String res, String arg)
    at System.Xml.XmlTextReaderImpl.ParseEntityName()
    at System.Xml.XmlTextReaderImpl.ParseAttributeValueSlow(Int32 curPos, Char quoteChar, NodeData attr)
    at System.Xml.XmlTextReaderImpl.ParseAttributes()
    at System.Xml.XmlTextReaderImpl.ParseElement()
    at System.Xml.XmlTextReaderImpl.ParseElementContent()
    at System.Xml.XmlTextReaderImpl.Read()
    at System.Xml.XmlTextReader.Read()
    at Microsoft.VisualStudio.Design.VSTypeResolutionService.GeneratedAssemblyEntry.RealizeMoniker(String moniker)
    at Microsoft.VisualStudio.Design.VSTypeResolutionService.GeneratedAssemblyEntry.get_FileName()
    at Microsoft.VisualStudio.Design.VSTypeResolutionService.AssemblyEntry.get_Assembly()
    at Microsoft.VisualStudio.Design.VSTypeResolutionService.GeneratedAssemblyEntry.get_Assembly()
    at Microsoft.VisualStudio.Design.VSTypeResolutionService.AssemblyEntry.Search(String fullName, String typeName, Boolean ignoreTypeCase, Assembly& assembly, String description)
    at Microsoft.VisualStudio.Design.VSTypeResolutionService.SearchGeneratedEntries(AssemblyName assemblyName, String typeName, Boolean ignoreTypeCase, Assembly& assembly)
    at Microsoft.VisualStudio.Design.VSTypeResolutionService.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase, ReferenceType refType)
    at Microsoft.VisualStudio.Design.Serialization.CodeDom.AggregateTypeResolutionService.GetType(String name, Boolean throwOnError, Boolean ignoreCase)
    at Microsoft.VisualStudio.Design.Serialization.CodeDom.AggregateTypeResolutionService.GetType(String name)
    at System.ComponentModel.Design.Serialization.DesignerSerializationManager.GetType(String typeName)
    at System.ComponentModel.Design.Serialization.DesignerSerializationManager.System.ComponentModel.Design.Serialization.IDesignerSerializationManager.GetType(String typeName)
    at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeExpression(IDesignerSerializationManager manager, String name, CodeExpression expression)
    at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeExpression(IDesignerSerializationManager manager, String name, CodeExpression expression)
    at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeAssignStatement(IDesignerSerializationManager manager, CodeAssignStatement statement)
    at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeStatement(IDesignerSerializationManager manager, CodeStatement statement)

    An error occurred while parsing EntityName. Line 4, position 28.

    Hide    

    at System.Xml.XmlTextReaderImpl.Throw(Exception e)
    at System.Xml.XmlTextReaderImpl.Throw(String res, String arg)
    at System.Xml.XmlTextReaderImpl.ParseEntityName()
    at System.Xml.XmlTextReaderImpl.ParseAttributeValueSlow(Int32 curPos, Char quoteChar, NodeData attr)
    at System.Xml.XmlTextReaderImpl.ParseAttributes()
    at System.Xml.XmlTextReaderImpl.ParseElement()
    at System.Xml.XmlTextReaderImpl.ParseElementContent()
    at System.Xml.XmlTextReaderImpl.Read()
    at System.Xml.XmlTextReader.Read()
    at Microsoft.VisualStudio.Design.VSTypeResolutionService.GeneratedAssemblyEntry.RealizeMoniker(String moniker)
    at Microsoft.VisualStudio.Design.VSTypeResolutionService.GeneratedAssemblyEntry.get_FileName()
    at Microsoft.VisualStudio.Design.VSTypeResolutionService.AssemblyEntry.get_Assembly()
    at Microsoft.VisualStudio.Design.VSTypeResolutionService.GeneratedAssemblyEntry.get_Assembly()
    at Microsoft.VisualStudio.Design.VSTypeResolutionService.AssemblyEntry.Search(String fullName, String typeName, Boolean ignoreTypeCase, Assembly& assembly, String description)
    at Microsoft.VisualStudio.Design.VSTypeResolutionService.SearchGeneratedEntries(AssemblyName assemblyName, String typeName, Boolean ignoreTypeCase, Assembly& assembly)
    at Microsoft.VisualStudio.Design.VSTypeResolutionService.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase, ReferenceType refType)
    at Microsoft.VisualStudio.Design.Serialization.CodeDom.AggregateTypeResolutionService.GetType(String name, Boolean throwOnError, Boolean ignoreCase)
    at Microsoft.VisualStudio.Design.Serialization.CodeDom.AggregateTypeResolutionService.GetType(String name)
    at System.ComponentModel.Design.Serialization.DesignerSerializationManager.GetType(String typeName)
    at System.ComponentModel.Design.Serialization.DesignerSerializationManager.System.ComponentModel.Design.Serialization.IDesignerSerializationManager.GetType(String typeName)
    at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeExpression(IDesignerSerializationManager manager, String name, CodeExpression expression)
    at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeExpression(IDesignerSerializationManager manager, String name, CodeExpression expression)
    at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeAssignStatement(IDesignerSerializationManager manager, CodeAssignStatement statement)
    at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeStatement(IDesignerSerializationManager manager, CodeStatement statement)

    Thursday, February 21, 2008 5:38 AM

All replies

  • I just had the same problem. At my end the problem was caused by and ' & ' symbol in the mapname containing my solution. Removing the ' & ' solved it.

     

    I hope this was helpfull

    • Proposed as answer by John F Fairley Tuesday, November 22, 2011 2:37 PM
    Tuesday, March 11, 2008 8:50 AM
  • TDDragon ... THANK YOU !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    I was sent a crystal report in the morning and added it to my solution, been using my solution all day. Suddenly I recv'd a parsing error very much like the one you replied to.

    The report name had a '&' in the name, now again. It had been in my project for 4 hours. Anyhow, changing the & to "and" .. and rebulding ... viola ... no more parse error on my form (that is listed above the report in my solution)

    I would have -never- figured that one out, wow.....
    Wednesday, April 15, 2009 9:05 PM
  • We were seeing this error on a sharepoint site when using Sharepoint designer, had us stumped for some time becuase behaviour was odd - we could design pages, connect up web parts but when we went to view the page the page threw this error. We then could not go back and edit web-part connections

    Turns out although you can rename a column and during the rename you can put a '&' in the field name (although it being sharepoint the underlying column/field retains the original name) - for us, and our particular combination of webparts and features this casued us to see this error message - not sure if this is universal.

    Removing the '&' from the column name sorted this.

     

    Every day a school day.

    Friday, May 21, 2010 7:23 PM
  • Hi,

    I have a similar problem but on the crawl administration. One of the SP applications fails to crawl with an error "Error in the Site Data Web Service. (*** An error occurred while parsing EntityName. Line 1, position 3989.)"

    Any ideas if the "&" problem is related in this case and if so how do we go about searching for this in content.

    Thanks in advance.

    Monday, June 07, 2010 1:44 PM
  • I just had the same problem. At my end the problem was caused by and ' & ' symbol in the mapname containing my solution. Removing the ' & ' solved it.

     

    I hope this was helpfull

    Hi. I have the same problem too.
    Sorry but just asking, where is the mapname?

    Thanks

    Saturday, June 12, 2010 3:32 AM
  • string someString;
    XmlNode node;

    // node=...; create the instance here

    node.InnerXml=someString;// WRONG - an exception will be thrown when a special character is found out in someString (i.e. &)

    node.InnerXml=HttpUtility.HtmlEncode(someString);// CORRECT

    Let me know if that fixed your problem.

    Tuesday, October 12, 2010 11:29 AM
  • Thanks for the suggestion.  I had just removed the '&' from a folder name in my solution, and it solves the problem.
    Monday, January 03, 2011 6:22 PM
  • Thank you! Thank you! Thank you!  I had been working on a SharePoint Designer issue with a web page for 6 months.  The page was working and then I added a field and it wasn't.  Unfortunately, I did not have Designer SP1 loaded so I only got "an unexpected error has occurred".  I thought to see if there was an update yesterday and downloaded and installed SP1.  At least that gabe me error codes but didn't know what to do with "an error occurred while parsing EntityName. Line 1, position 451.

    I stumbled across this posting and sure enough, one of the list column headers had an & in it.  Once I removed it, the page worked fine.

    I have a SharePoint list with about 200 columns on it and different people need to update different fields.  I didn't want to give them access to the entire edit form as there were too many fields so was creating a web part connection in designer to a data view single item form with only a few items on it.  What I suspect happened is that when I wanted to add a field to the form, it went back out and loaded all fields  - hence the problem with the new field with the &.

    Wednesday, January 12, 2011 8:40 PM
  • Hi there,

    I have a similar kind of problem. Im loading xml string from database like<address> <name>Paul & Robert <3 </name><city>US</city></address> which is entering by customer. Here how to replace that Paul & Robert <3 to Paul &amp; Robert &lt;3 .

    Replacing '&' is not a problem as string.Replace("&", "&amp;") but replacing '<' is challenge for us. If we replace < same as &, all <'s will be replaced then loading string will be a problem(xml.Load(string)).

    Thankful for any suggestions.

     

    Keep SMILING....

    Friday, February 11, 2011 1:26 PM
  • Thanks for your excellent work.

    I have just spent 2 hours trying to fix this.

     

     

    Thursday, August 25, 2011 3:28 PM
  • Similar issue with a custom webservice between AD and Sharepoint.

    The webservice was to return a list of memberships for a user based on certain criteria.

    I had added a couple of new AD groups with an & in the name and it broke the webservice with the above error.

     

    Would never have though to check this.

    Cheers :)

    Tuesday, November 22, 2011 2:36 PM
  • You may use CDATA to escape special characters in XML as follows:-

    If str.IndexOfAny(New Char() {"&", "<", ">", "&", """"}) > -1 Then
                Dim sb As StringBuilder = New StringBuilder()
                sb.Append("<![CDATA[")
                sb.Append(str)
                sb.Append("]]>")
                Return sb.ToString()
            Else
                Return str
            End If
    Wednesday, September 19, 2012 3:40 PM
  • I also encountered this problem and I found that I created the error doing the following:

    I made a replaced all in my solution. I replaced "? with "& and then the problem was created.

    I had to open the Settings.settings file (it is located on my Project folder but you have to enable the show all files). Right click on the file -> open with-> Automatic Editor Selector(XML) and then change the following:

    ...bla bla bla

    <DesignTimeValue Profile="(Default)">&lt;?xml version="1.0" encoding="utf-16"&&gt;    

    ...bla bla bla

    to <DesignTimeValue Profile="(Default)">&lt;?xml version="1.0" encoding="utf-16"?&gt; 

    If you haven't noticed the difference :

    The "?&gt;  was changed to "&&gt;  and that created the problem!!!!!

    So I returned it to the original (and correct) state which is "?&gt;




    • Edited by spigrig Thursday, February 14, 2013 10:31 AM
    Thursday, February 14, 2013 10:29 AM
  • Hi ErodeVadivel,

    Sorry I am replying too late but I hope it will help some other guys. This issue is because of the encoding of special characters in XML. Please find the below link which may help you https://support.google.com/checkout/sell/answer/70649?hl=en  

    Thanks,

    Vijay Sherekar

    Thursday, October 24, 2013 12:27 PM
  • This worked for me! Thanks.

    http://www.w3schools.com/xml/xml_cdata.asp

    Friday, November 22, 2013 12:43 PM
  • Thanks a lot. I solved my problem too.
    • Proposed as answer by rajesh kumar Wednesday, March 19, 2014 6:12 PM
    Wednesday, March 19, 2014 6:12 PM