.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Annoying issue with: Element 'xxxx' is not a known element.

Posted By:      Posted Date: September 28, 2010    Points: 0   Category :ASP.Net

I am getting hundreds of messages like that: "Element 'xxxx' is not a known element. This can occur if there is a compilation error in the Web site, or the web.config file is missing. "

Very simple to reproduce, just start a new web project and start adding elements to the web page. All this craps starts poping up, no intellisense.

View Complete Post

More Related Resource Links

How to fix "Validation(): Element 'xxxx' is not supported" Visual Studio 2010

Since about a month ago,I started to get validation warnings at design time on asp.net server controls (any control actually) within the html design view for VS 2010,intellisense on all controls would not work at all,the messages look like this: Validation(): Element 'Label' is not supported. Validation(): Element 'GridView' is not supported ....etc The compilation done successfully but the warnings still exist and intellisense is not working at the source tab I tried to reset the settings of VS 2010 ,disabled all extensions and few other ideas but none of them solved the issue,I got stuck. I did a search over the internet about this issue and found this article on Doug Kennard's blog: http://www.gotknowhow.com/articles/fix-validation-element-not-supported-visual-studio-2010 Splendid,that article is a life savior.

REST Starter Kit - parsing issue with ampersand in element

We built a REST web service using the REST Starter Kit.  We want to allow XML post elements that contain ampersands.   How can we modify the code to have the parsing at the element level so that when an XML post element contains an ampersand we don't generate an error?

UpdatePanel is not a known element - message when upgrading to 1.0 ajax


It worked on one of my old pages.  I change the web.config, renamed all the <asp.

On some aspx page it doesn't recognize the updatepanel.  It only does on one page.  If I create a new aspx page with a different name - then it works.

Should I just create a new web project ajax - then copy all my code into there?  Or is there a way to get those old pages to recognize the new ajax controls?

get value from xml element



i have this xml

<Field Name="Users_wff_AU" Type="FIELD_TYPE_STRING" MultiValue="True">
<Value No="1">xyz</Value>
<Value No="2">abcl</Value>
<Value No="3">xcc</Value>

i want to get the  xcc in string variable

Dim strwfUser As String = xNode.Item("Value").InnerText

Could not find default endpoint element that references contract 'CurrencyProxy.CurrencyServiceSoap



I created 2 projects in my solution:

  1. Classic asp.net web service (asmx)
  2. Class library project which references service
  3. web site project which references class library project
  4. Windows app project which references service.

Both projects were created in 3.5 framework and in Visual Studio 2008 Beta 2.

I added web service reference to Class library project. When it asked for namespace I typed "CurrencyProxy". Projects build ok, but when I run web app, Class library throws an error: Could not find default endpoint element that references contract 'CurrencyProxy.CurrencyServiceSoap' in the ServiceModel client configuration section. This might be because no configuration file was found for your application, or because no endpoint element matching this contract could be found in the client element.

I believe it has something to do with app.config in Class library project. Here is part from app.config:

<binding name="CurrencyServiceSoap" closeTimeout=

'element.className' is null or not an object



I just downloaded the project, compiled it and ran it right out of the box and when I put the mouse pointer over or remove the mouse pointer from either MenuItem in the menu demo, I generate this error:

'element.className' is null or not an object

It points to this javascript method:

updateClassName: function(operation, element, name, value) {
        this[operation + 'String'](
                function() {
                    return element.className;
                function(newValue) {
                    element.className = newValue;

Modify Menu adapter to show selected


Hey, I need some help modifying the menu adapter code to give child <ul> elements a class value indicating that the parent is selected. It should render like this:


< ul class="AspNet-Menu">
	< li class="AspNet-Menu-WithChildren  AspNet-Menu-ChildSelected">
		< a href="/rockit/admin/Default.aspx" class="AspNet-Menu-Link  AspNet-Menu-ChildSelected">
		< span>Mypage< /span>< /a>
			< ul class="AspNet-Sub AspNet-Sub-Selected">
				< li class="AspNet-Menu-Leaf  AspNet-Menu-Selected">
					< a href="/rockit/admin/Default2.aspx" class="AspNet-Menu-Link  AspNet-Menu-Selected">
					< span>Test< /span>< /a>
				< /li>
				< li class="AspNet-Menu-Leaf">
					< a href="/rockit/Default3.aspx" class="AspN

XmlSerializer - how to define class to not generate attributes in root element?

Hi! I have simple class that I serialize to xml file: <?xml version="1.0" encoding="utf-8"?> <MyRootElement xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Area="East">   <Products>     <SalesProduct Taxable="true">       <Name>Sofa</Name>     </SalesProduct>     <Product>       <Name>Television</Name>     </Product>   </Products> </MyRootElement> I don`t want have in xml file attributes xmlns:xsi and xmlns:xsd. How can I define class to not have these two attributes in xml file? I tried use XmlRoot attribute but there is no control for these two attributes. They are always generated. Regards

Schema :relatioship expected & constant/fixed element cannot have attributes

I try to bullkload data from xml file to SQL database ,but I cannot figure out the problem.Please anyone help me .I'd really appreciate. the XML file :  <?xml version="1.0" encoding="UTF-8"?> <root>        <!-- ????? -->        <common>               <!-- UploadDataCenterID???????????????? -->               <UploadDataCenterID>XXXXXX</UploadDataCenterID>               <CreateTime>YYYY-MM-DD HH:MM:SS</CreateTime>        </common>        <data>                 <BuildGroup id="XXXXXXXXXX">                        <BuildGroupBaseInfo operation="N|U">                             <F_BuildGroupName>?????</F_BuildGroupName>                             <F_GroupAliasName>???????</F_GroupAliasName>                             <F_GroupDesc><![CDATA[?????]]></F_GroupDesc>                      </BuildGroupBaseInfo>                      <BuildGroupRelaInfo operation="N|U">                             <F_BuildID>XXXXXXXXXX</F_BuildID>                      </BuildGroupRelaInfo>               </BuildGroup>        </data> </root> then the XSD :<?xml version="1.0" encoding="UTF-8"?><xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xs

'Unspecified error' doing sp_xml_preparedocument on XML element with a long attribute

In SQL Management Studio 2008 (connected to SQL 2005 database), I get this:The XML parse error 0x80004005 occurred on line number 2, near the XML text "<item value="&#xD;&#xA;libname...Msg 6602, Level 16, State 2, Procedure sp_xml_preparedocument, Line 1The error description is 'Unspecified error'.When I do this declare @doc nvarchar(max), @idoc int set @doc = '<item value="&#xD;&#xA;libname..." />' EXEC sp_xml_preparedocument @idoc OUTPUT, @doc when the value of the @value attribute is actually a string of somewhat over 830000 characters.If I truncate the string somewhat, the statements execute successfully.Anyone know how to fix this?  (and "use shorter attributes" is not an acceptable answer :-)I would use XQuery except that I can't figure out how to get the equivalent of @mp:id and @mpparentid to give me the hierarchical structure information I need.  If anyone knows how to do that, I'd appreciate a hand there too!  

XML Signature xsd and Validation Error: Wildcard '##any' allows element causes the content model t

Hello,I'm trying to generate WCF client from Customer's WCF Service which has XML Signature options enabled.When trying to generate client proxy using svcutil I get following errors: Microsoft (R) Service Model Metadata Tool [Microsoft (R) Windows (R) Communication Foundation, Version 3.0.4506.2152] Copyright (c) Microsoft Corporation. All rights reserved. Attempting to download metadata from 'http://donex:51343/WebServices /Service.svc' using WS-Metadata Exchange or DISCO. Error: There was a validation error on a schema generated during export: Source: Line: 1 Column: 13464 Validation Error: Wildcard '##any' allows element 'http://www.w3.org/2000/09/ xmldsig#:HMACOutputLength', and causes the content model to become ambiguous. A content model must be formed such that during validation of an element informati on item sequence, the particle contained directly, indirectly or implicitly ther ein with which to attempt to validate each item in the sequence in turn can be u niquely determined without examining the content or attributes of that item, and without any information about the items in the remainder of the sequence. Error: There was a validation error on a schema generated during export: Source: Line: 1 Column: 14410 Validation Error: Wildcard '##any' allows element 'http://www.w3.org/2000/09/ xmldsig#:XPath', and cau

Validation(): Attribute 'Factory' is not a valid attribute of element 'ServiceHost'

Hi, I'm using REST WCF3.5. In my .svc file, the Factory attribute is giving me Warning in the Visual Studio Team Suite saying "Validation(): Attribute 'Factory' is not a valid attribute of element 'ServiceHost'." <%@ ServiceHost Language="C#" Debug="true" Service="RestService" CodeBehind="~/App_Code/RestService.cs" Factory="AppServiceHostFactory" %> using System; using System.ServiceModel; using System.ServiceModel.Activation; using Microsoft.ServiceModel.Web; class AppServiceHostFactory : ServiceHostFactory {  protected override ServiceHost CreateServiceHost(Type serviceType, Uri[] baseAddresses)  {   WebServiceHost2 host = new WebServiceHost2(serviceType, true, baseAddresses);                 // Add the basic authenticator interceptor   host.Interceptors.Add(new BasicAuthenticationInterceptor(    System.Web.Security.Membership.Provider, "foo"));   return host;  } } I've added the reference as well & Everything works fine but I was wondering why am I getting this warning?? Thanks!  

RSACrytoService Provider decrypt each element with seperate key gives Bad Data

I have spent about two days. Here is my code: XmlDocument xmlDoc = new XmlDocument(); xmlDoc.PreserveWhitespace = true; xmlDoc.Load("C:\\test.xml"); CspParameters cspParams = new CspParameters(); cspParams.KeyContainerName = "XML_ENC_RSA_KEY"; RSACryptoServiceProvider rsaKey = new RSACryptoServiceProvider(cspParams); CspParameters cspParams2 = new CspParameters(); cspParams2.KeyContainerName = "XML_ENC_RSA_KEY2"; RSACryptoServiceProvider rsaKey2 = new RSACryptoServiceProvider(cspParams2); Encrypt(xmlDoc, "creditcard", "EncryptedElement1", rsaKey, "rsaKey"); Encrypt(xmlDoc, "personal", "EncryptedElement2", rsaKey2, "rsaKey"); This works gerat. Now I want to decrypt the 'creditcard' and 'personal' data elements seperately with 'rsakey' and 'rsakey2' . If do this I get Bad Data error public static void Decrypt(XmlDocument Doc, RSA Alg, string KeyName) { EncryptedXml exml = new EncryptedXml(Doc); exml.AddKeyNameMapping(KeyName, Alg); exml.DecryptDocument(); } This gives bad data since the file has been encrypted with two different keys. So I tried something like this. But I don't know how to decrypt each data element seperately.  Can someone please help? public static void DecryptElement(string ElementToEncrypt, RSA Alg, string KeyName) {

Accessing a datagrid element using javascript

Hi all,as I'm not a .Net developer, I'm struggling with some simple problems using the language. I'm trying to insert some javascript functionality, inside my page. What I'm trying to do below...<script language=javascript> function ControlBackupFields(hasBackup) { if (hasBackup.checked = true) { document.aspnetForm.frequencyValue.enabled = true; document.aspnetForm.frequencyUnitList.enabled = true; } else { document.aspnetForm.frequencyValue.enabled = false; document.aspnetForm.frequencyUnitList.enabled = false; } } </script> <asp:datagrid id="dgData" runat="server" AutoGenerateColumns="False" PageSize="20" Width="100%" CssClass="grid" CellPadding="1"> <ItemStyle Height="20px" CssClass="tabletext2" VerticalAlign="Top"></ItemStyle> <HeaderStyle Height="20px" CssClass="tableheading2"></HeaderStyle> <Columns> <asp:TemplateColumn> <ItemTemplate> <asp:TextBox id="volumeID" Runat="server" Visible="false" /> <asp:Label id="volumeName" Runat="server" /> </ItemTemplate> </asp:TemplateColumn> <asp:Templa

Error - "Specified element is already the logical child of another element. Disconnect it first."

What I have is a Grid with each cell containing its own canvas.  I have a UserControl (uc) that I want to be able to drag/drop to other cells within grid.  I was able to get my drag/drop of the uc working except for the error in the subject.  On a drag/drop of a uc, I determine the canvas the drag started in, get a reference to the uc, clear the original canvas's children and add the uc to the new canvas.  The wierd thing about this error is that it is not entirely consistent.  Sometimes, I can drag the uc around to three or four different cells before receiving the error.  I have read multiple posts about this error but I don't seem to be able 'disconnect' the uc from its original logical parent.  Help is appreciated.

Root Element

Hi all, I decided to post in this forum as it doesn't directly relate to others...being a user-end question. I have a network of equally configured XP computers, and one Vista computer. For some reason, accessing certain ASP.NET sites on the Vista computer has just started getting server exceptions "Root element is missing". Normally I would write this off as a plain server-side error and wait for it to be fixed. However, the exception only occurs from one machine. All other machines load just fine. Caches are clear, computer rebooted, no malware or any non-default windows services running, etc. (Pure client/office machines)Any ASP.NET gurus know why this might be? Or how to fix it? Could it stem from an SSL cert/verification issue? (The error sites are using SSL).Thanks for your insight.
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend