XML Extnet Schema to avoid Information Error in web.config

  1. #1

    XML Extnet Schema to avoid Information Error in web.config

    I'm not expert on this area, but maybe this can help others.
    I receive a request to remove all error in one my applications (yes, even info errors :S ).

    <extnet> tag in web.config show info error because there aren't scheme for this.

    Click image for larger version. 

Name:	extnet-webconfig.jpg 
Views:	19 
Size:	95.5 KB 
ID:	7424

    Then I add this code before </xs:schema> tag into DotNetConfig.xsd schema.
    (I create the element based on 2.4.0 README File. https://examples2.ext.net/#/Getting_...uments/README/ )

    <?xml version="1.0" encoding="us-ascii"?>
    <xs:element name="extnet" vs:help="configuration/extnet">
        <xs:complexType>
          <xs:attribute name="ajaxViewStateMode" use="optional">
            <xs:simpleType>
              <xs:restriction base="xs:string">
                <xs:enumeration value="Default" />
                <xs:enumeration value="Exclude" />
                <xs:enumeration value="Include" />
              </xs:restriction>
            </xs:simpleType>
          </xs:attribute>
          <xs:attribute name="cleanResourceUrl" type="small_boolean_Type" use="optional" />
          <xs:attribute name="dateTimeZoneHandling" type="xs:string" use="optional" />
          <xs:attribute name="disableViewState" type="small_boolean_Type" use="optional" />
          <xs:attribute name="directEventUrl" type="xs:string" use="optional" />
          <xs:attribute name="directMethodProxy" use="optional">
            <xs:simpleType>
              <xs:restriction base="xs:string">
                <xs:enumeration value="Default" />
                <xs:enumeration value="Include" />
                <xs:enumeration value="Ignore" />
              </xs:restriction>
            </xs:simpleType>
          </xs:attribute>
          <xs:attribute name="directMethodNamespace" type="xs:string" use="optional" />
          <xs:attribute name="glyphFontFamily" type="xs:string" use="optional" />
          <xs:attribute name="gzip" type="small_boolean_Type" use="optional" />
          <xs:attribute name="idMode" use="optional">
            <xs:simpleType>
              <xs:restriction base="xs:string">
                <xs:enumeration value="Client" />
                <xs:enumeration value="Explicit" />
                <xs:enumeration value="Ignore" />
                <xs:enumeration value="Inherit" />
                <xs:enumeration value="Legacy" />
                <xs:enumeration value="Parent" />
                <xs:enumeration value="Predictable" />
                <xs:enumeration value="Static" />
              </xs:restriction>
            </xs:simpleType>
          </xs:attribute>
          <xs:attribute name="initScriptMode" use="optional">
            <xs:simpleType>
              <xs:restriction base="xs:string">
                <xs:enumeration value="Inline" />
                <xs:enumeration value="Linked" />
              </xs:restriction>
            </xs:simpleType>
          </xs:attribute>
          <xs:attribute name="licenseKey" type="xs:string" use="optional" />
          <xs:attribute name="locale" type="xs:string" use="optional" />
          <xs:attribute name="namespace" type="xs:string" use="optional" />
          <xs:attribute name="renderScripts" use="optional">
            <xs:simpleType>
              <xs:restriction base="xs:string">
                <xs:enumeration value="Embedded" />
                <xs:enumeration value="File" />
                <xs:enumeration value="CDN" />
                <xs:enumeration value="None" />
              </xs:restriction>
            </xs:simpleType>
          </xs:attribute>
          <xs:attribute name="renderStyles" use="optional">
            <xs:simpleType>
              <xs:restriction base="xs:string">
                <xs:enumeration value="Embedded" />
                <xs:enumeration value="File" />
                <xs:enumeration value="CDN" />
                <xs:enumeration value="None" />
              </xs:restriction>
            </xs:simpleType>
          </xs:attribute>
          <xs:attribute name="resourcePath" type="xs:string" use="optional" />
          <xs:attribute name="resourcesStrategyType" type="xs:string" use="optional" />
          <xs:attribute name="resetStyles" type="small_boolean_Type" use="optional" />
          <xs:attribute name="rethrowAjaxExceptions" type="small_boolean_Type" use="optional" />
          <xs:attribute name="rtl" type="small_boolean_Type" use="optional" />
          <xs:attribute name="scriptMode" use="optional">
            <xs:simpleType>
              <xs:restriction base="xs:string">
                <xs:enumeration value="Release" />
                <xs:enumeration value="Debug" />
                <xs:enumeration value="Development" />
              </xs:restriction>
            </xs:simpleType>
          </xs:attribute>
          <xs:attribute name="showWarningOnAjaxFailure" type="small_boolean_Type" use="optional" />
          <xs:attribute name="sourceFormatting" type="small_boolean_Type" use="optional" />
          <xs:attribute name="stateProvider" use="optional">
            <xs:simpleType>
              <xs:restriction base="xs:string">
                <xs:enumeration value="PostBack" />
                <xs:enumeration value="Cookie" />
                <xs:enumeration value="None" />
              </xs:restriction>
            </xs:simpleType>
          </xs:attribute>
          <xs:attribute name="submitDisabled" type="small_boolean_Type" use="optional" />
          <xs:attribute name="theme" use="optional">
            <xs:simpleType>
              <xs:restriction base="xs:string">
                <xs:enumeration value="Default" />
                <xs:enumeration value="Access" />
                <xs:enumeration value="Gray" />
                <xs:enumeration value="Neptune" />
              </xs:restriction>
            </xs:simpleType>
          </xs:attribute>
          <xs:attribute name="themePath" type="xs:string" use="optional" />
          <xs:attribute name="quickTips" type="small_boolean_Type" use="optional" />
          <xs:anyAttribute namespace="http://schemas.microsoft.com/XML-Document-Transform" processContents="strict"/>
        </xs:complexType>
      </xs:element>
    Now ... I have no error in my projects :D

    Click image for larger version. 

Name:	extnet-webconfig-noerror.jpg 
Views:	16 
Size:	95.4 KB 
ID:	7425

    and have extnet Intellisense on web.config :D

    Click image for larger version. 

Name:	extnet-webconfig-intellisense.png 
Views:	16 
Size:	20.3 KB 
ID:	7426

    Comments and corrections are welcome. Hope it helps other.

    I'm try to create my own extnet.xsd schema but I don't found the way to import DotNetConfig.xsd schema, because need include extnet tag into configuration. If any body knows please let me know... in future I like see an extnet.xsd file on instalation files :D
    Last edited by equiman; Dec 27, 2013 at 8:33 PM.
  2. #2
    Thank you. We will investigate.
  3. #3
    This is my own ExtNet schema file... but I can make it work, because they don't import correctlly the DotNetConfig.xsd shema.

    <?xml version="1.0" encoding="us-ascii"?>
    <xs:schema xmlns:tns="urn:schemas-microsoft-com:asm.v1" attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="urn:schemas-microsoft-com:asm.v1" xmlns:xs="http://www.w3.org/2001/XMLSchema">
      <xs:include schemaLocation="C:\Program Files (x86)\Microsoft Visual Studio 10.0\Xml\Schemas\DotNetConfig.xsd"/>
      <xs:element name="extnet" vs:help="configuration/extnet">
        <xs:complexType>
          <xs:attribute name="ajaxViewStateMode" use="optional">
            <xs:simpleType>
              <xs:restriction base="xs:string">
                <xs:enumeration value="Default" />
                <xs:enumeration value="Exclude" />
                <xs:enumeration value="Include" />
              </xs:restriction>
            </xs:simpleType>
          </xs:attribute>
          <xs:attribute name="cleanResourceUrl" type="small_boolean_Type" use="optional" />
          <xs:attribute name="dateTimeZoneHandling" type="xs:string" use="optional" />
          <xs:attribute name="disableViewState" type="small_boolean_Type" use="optional" />
          <xs:attribute name="directEventUrl" type="xs:string" use="optional" />
          <xs:attribute name="directMethodProxy" use="optional">
            <xs:simpleType>
              <xs:restriction base="xs:string">
                <xs:enumeration value="Default" />
                <xs:enumeration value="Include" />
                <xs:enumeration value="Ignore" />
              </xs:restriction>
            </xs:simpleType>
          </xs:attribute>
          <xs:attribute name="directMethodNamespace" type="xs:string" use="optional" />
          <xs:attribute name="glyphFontFamily" type="xs:string" use="optional" />
          <xs:attribute name="gzip" type="small_boolean_Type" use="optional" />
          <xs:attribute name="idMode" use="optional">
            <xs:simpleType>
              <xs:restriction base="xs:string">
                <xs:enumeration value="Client" />
                <xs:enumeration value="Explicit" />
                <xs:enumeration value="Ignore" />
                <xs:enumeration value="Inherit" />
                <xs:enumeration value="Legacy" />
                <xs:enumeration value="Parent" />
                <xs:enumeration value="Predictable" />
                <xs:enumeration value="Static" />
              </xs:restriction>
            </xs:simpleType>
          </xs:attribute>
          <xs:attribute name="initScriptMode" use="optional">
            <xs:simpleType>
              <xs:restriction base="xs:string">
                <xs:enumeration value="Inline" />
                <xs:enumeration value="Linked" />
              </xs:restriction>
            </xs:simpleType>
          </xs:attribute>
          <xs:attribute name="licenseKey" type="xs:string" use="optional" />
          <xs:attribute name="locale" type="xs:string" use="optional" />
          <xs:attribute name="namespace" type="xs:string" use="optional" />
          <xs:attribute name="renderScripts" use="optional">
            <xs:simpleType>
              <xs:restriction base="xs:string">
                <xs:enumeration value="Embedded" />
                <xs:enumeration value="File" />
                <xs:enumeration value="CDN" />
                <xs:enumeration value="None" />
              </xs:restriction>
            </xs:simpleType>
          </xs:attribute>
          <xs:attribute name="renderStyles" use="optional">
            <xs:simpleType>
              <xs:restriction base="xs:string">
                <xs:enumeration value="Embedded" />
                <xs:enumeration value="File" />
                <xs:enumeration value="CDN" />
                <xs:enumeration value="None" />
              </xs:restriction>
            </xs:simpleType>
          </xs:attribute>
          <xs:attribute name="resourcePath" type="xs:string" use="optional" />
          <xs:attribute name="resourcesStrategyType" type="xs:string" use="optional" />
          <xs:attribute name="resetStyles" type="small_boolean_Type" use="optional" />
          <xs:attribute name="rethrowAjaxExceptions" type="small_boolean_Type" use="optional" />
          <xs:attribute name="rtl" type="small_boolean_Type" use="optional" />
          <xs:attribute name="scriptMode" use="optional">
            <xs:simpleType>
              <xs:restriction base="xs:string">
                <xs:enumeration value="Release" />
                <xs:enumeration value="Debug" />
                <xs:enumeration value="Development" />
              </xs:restriction>
            </xs:simpleType>
          </xs:attribute>
          <xs:attribute name="showWarningOnAjaxFailure" type="small_boolean_Type" use="optional" />
          <xs:attribute name="sourceFormatting" type="small_boolean_Type" use="optional" />
          <xs:attribute name="stateProvider" use="optional">
            <xs:simpleType>
              <xs:restriction base="xs:string">
                <xs:enumeration value="PostBack" />
                <xs:enumeration value="Cookie" />
                <xs:enumeration value="None" />
              </xs:restriction>
            </xs:simpleType>
          </xs:attribute>
          <xs:attribute name="submitDisabled" type="small_boolean_Type" use="optional" />
          <xs:attribute name="theme" use="optional">
            <xs:simpleType>
              <xs:restriction base="xs:string">
                <xs:enumeration value="Default" />
                <xs:enumeration value="Access" />
                <xs:enumeration value="Gray" />
                <xs:enumeration value="Neptune" />
              </xs:restriction>
            </xs:simpleType>
          </xs:attribute>
          <xs:attribute name="themePath" type="xs:string" use="optional" />
          <xs:attribute name="quickTips" type="small_boolean_Type" use="optional" />
          <xs:anyAttribute namespace="http://schemas.microsoft.com/XML-Document-Transform" processContents="strict"/>
        </xs:complexType>
      </xs:element>
    </xs:schema>
    Last edited by equiman; Jan 09, 2014 at 4:30 PM.
  4. #4
    An update to VS 2013. Using Ext.Net 2:

    <?xml version="1.0" encoding="utf-8"?>
    
    <xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
      <xs:element name="entityFramework">
        <xs:complexType>
          <xs:all>
            <xs:element name="defaultConnectionFactory" type="ElementWithTypeAndParameters_Type" minOccurs="0" maxOccurs="1" />
            <xs:element name="providers" type="ProviderList_Type" minOccurs="0" maxOccurs="1" />
            <xs:element name="contexts" type="ContextList_Type" minOccurs="0" maxOccurs="1" />
            <xs:element name="interceptors" type="InterceptorList_Type" minOccurs="0" maxOccurs="1" />
          </xs:all>
          <xs:attribute name="codeConfigurationType" type="NonEmptyString_Type" use="optional" />
          <xs:anyAttribute namespace="http://schemas.microsoft.com/XML-Document-Transform" processContents="strict"/>
        </xs:complexType>
      </xs:element>
    
      <xs:complexType name="ProviderList_Type">
        <xs:sequence>
          <xs:element name="provider" type="Provider_Type" minOccurs="0" maxOccurs="unbounded" />
        </xs:sequence>
        <xs:anyAttribute namespace="http://schemas.microsoft.com/XML-Document-Transform" processContents="strict"/>
      </xs:complexType>
      
      <xs:complexType name="Provider_Type">
        <xs:attribute name="invariantName" type="NonEmptyString_Type" use="required" />
        <xs:attribute name="type" type="NonEmptyString_Type" use="required" />
        <xs:anyAttribute namespace="http://schemas.microsoft.com/XML-Document-Transform" processContents="strict"/>
      </xs:complexType>
      
      <xs:complexType name="ContextList_Type">
        <xs:sequence>
          <xs:element name="context" type="Context_Type" minOccurs="0" maxOccurs="unbounded" />
        </xs:sequence>
        <xs:anyAttribute namespace="http://schemas.microsoft.com/XML-Document-Transform" processContents="strict"/>
      </xs:complexType>
    
      <xs:complexType name="Context_Type">
        <xs:choice>
          <xs:element name="databaseInitializer" type="ElementWithTypeAndParameters_Type" minOccurs="0" maxOccurs="1" />
        </xs:choice>
        <xs:attribute name="type" type="NonEmptyString_Type" use="required" />
        <xs:attribute name="disableDatabaseInitialization" type="SmallBoolean_Type" use="optional" />
        <xs:anyAttribute namespace="http://schemas.microsoft.com/XML-Document-Transform" processContents="strict"/>
      </xs:complexType>
    
      <xs:complexType name="InterceptorList_Type">
        <xs:sequence>
          <xs:element name="interceptor" type="ElementWithTypeAndParameters_Type" minOccurs="0" maxOccurs="unbounded" />
        </xs:sequence>
        <xs:anyAttribute namespace="http://schemas.microsoft.com/XML-Document-Transform" processContents="strict"/>
      </xs:complexType>
    
      <xs:complexType name="ElementWithTypeAndParameters_Type">
        <xs:choice>
          <xs:element name="parameters" type="ParameterList_Type" minOccurs="0" maxOccurs="1" />
        </xs:choice>
        <xs:attribute name="type" type="NonEmptyString_Type" use="required" />
        <xs:anyAttribute namespace="http://schemas.microsoft.com/XML-Document-Transform" processContents="strict"/>
      </xs:complexType>
      
      <xs:complexType name="ParameterList_Type">
        <xs:sequence>
          <xs:element name="parameter" type="Parameter_Type" minOccurs="0" maxOccurs="unbounded" />
        </xs:sequence>
        <xs:anyAttribute namespace="http://schemas.microsoft.com/XML-Document-Transform" processContents="strict"/>
      </xs:complexType>
    
      <xs:complexType name="Parameter_Type">
        <xs:attribute name="value" type="NonEmptyString_Type" use="required" />
        <xs:attribute name="type" type="NonEmptyString_Type" use="optional" />
        <xs:anyAttribute namespace="http://schemas.microsoft.com/XML-Document-Transform" processContents="strict"/>
      </xs:complexType>
    
      <xs:simpleType name="SmallBoolean_Type">
        <xs:restriction base="xs:NMTOKEN">
          <xs:enumeration value="false" />
          <xs:enumeration value="true" />
        </xs:restriction>
      </xs:simpleType>
    
      <xs:simpleType name="NonEmptyString_Type">
        <xs:restriction base="xs:string">
          <xs:minLength value="1" />
        </xs:restriction>
      </xs:simpleType>
    
      <xs:element name="extnet">
        <xs:complexType>
          <xs:attribute name="ajaxViewStateMode" use="optional">
            <xs:simpleType>
              <xs:restriction base="xs:string">
                <xs:enumeration value="Default" />
                <xs:enumeration value="Exclude" />
                <xs:enumeration value="Include" />
              </xs:restriction>
            </xs:simpleType>
          </xs:attribute>
          <xs:attribute name="cleanResourceUrl" type="SmallBoolean_Type" use="optional" />
          <xs:attribute name="dateTimeZoneHandling" type="xs:string" use="optional" />
          <xs:attribute name="disableViewState" type="SmallBoolean_Type" use="optional" />
          <xs:attribute name="directEventUrl" type="xs:string" use="optional" />
          <xs:attribute name="directMethodProxy" use="optional">
            <xs:simpleType>
              <xs:restriction base="xs:string">
                <xs:enumeration value="Default" />
                <xs:enumeration value="Include" />
                <xs:enumeration value="Ignore" />
              </xs:restriction>
            </xs:simpleType>
          </xs:attribute>
          <xs:attribute name="directMethodNamespace" type="xs:string" use="optional" />
          <xs:attribute name="glyphFontFamily" type="xs:string" use="optional" />
          <xs:attribute name="gzip" type="SmallBoolean_Type" use="optional" />
          <xs:attribute name="idMode" use="optional">
            <xs:simpleType>
              <xs:restriction base="xs:string">
                <xs:enumeration value="Client" />
                <xs:enumeration value="Explicit" />
                <xs:enumeration value="Ignore" />
                <xs:enumeration value="Inherit" />
                <xs:enumeration value="Legacy" />
                <xs:enumeration value="Parent" />
                <xs:enumeration value="Predictable" />
                <xs:enumeration value="Static" />
              </xs:restriction>
            </xs:simpleType>
          </xs:attribute>
          <xs:attribute name="initScriptMode" use="optional">
            <xs:simpleType>
              <xs:restriction base="xs:string">
                <xs:enumeration value="Inline" />
                <xs:enumeration value="Linked" />
              </xs:restriction>
            </xs:simpleType>
          </xs:attribute>
          <xs:attribute name="licenseKey" type="xs:string" use="optional" />
          <xs:attribute name="locale" type="xs:string" use="optional" />
          <xs:attribute name="namespace" type="xs:string" use="optional" />
          <xs:attribute name="renderScripts" use="optional">
            <xs:simpleType>
              <xs:restriction base="xs:string">
                <xs:enumeration value="Embedded" />
                <xs:enumeration value="File" />
                <xs:enumeration value="CDN" />
                <xs:enumeration value="None" />
              </xs:restriction>
            </xs:simpleType>
          </xs:attribute>
          <xs:attribute name="renderStyles" use="optional">
            <xs:simpleType>
              <xs:restriction base="xs:string">
                <xs:enumeration value="Embedded" />
                <xs:enumeration value="File" />
                <xs:enumeration value="CDN" />
                <xs:enumeration value="None" />
              </xs:restriction>
            </xs:simpleType>
          </xs:attribute>
          <xs:attribute name="resourcePath" type="xs:string" use="optional" />
          <xs:attribute name="resourcesStrategyType" type="xs:string" use="optional" />
          <xs:attribute name="resetStyles" type="SmallBoolean_Type" use="optional" />
          <xs:attribute name="rethrowAjaxExceptions" type="SmallBoolean_Type" use="optional" />
          <xs:attribute name="rtl" type="SmallBoolean_Type" use="optional" />
          <xs:attribute name="scriptMode" use="optional">
            <xs:simpleType>
              <xs:restriction base="xs:string">
                <xs:enumeration value="Release" />
                <xs:enumeration value="Debug" />
                <xs:enumeration value="Development" />
              </xs:restriction>
            </xs:simpleType>
          </xs:attribute>
          <xs:attribute name="showWarningOnAjaxFailure" type="SmallBoolean_Type" use="optional" />
          <xs:attribute name="sourceFormatting" type="SmallBoolean_Type" use="optional" />
          <xs:attribute name="stateProvider" use="optional">
            <xs:simpleType>
              <xs:restriction base="xs:string">
                <xs:enumeration value="PostBack" />
                <xs:enumeration value="Cookie" />
                <xs:enumeration value="None" />
              </xs:restriction>
            </xs:simpleType>
          </xs:attribute>
          <xs:attribute name="submitDisabled" type="SmallBoolean_Type" use="optional" />
          <xs:attribute name="theme" use="optional">
            <xs:simpleType>
              <xs:restriction base="xs:string">
                <xs:enumeration value="Default" />
                <xs:enumeration value="Access" />
                <xs:enumeration value="Gray" />
                <xs:enumeration value="Neptune" />
              </xs:restriction>
            </xs:simpleType>
          </xs:attribute>
          <xs:attribute name="themePath" type="xs:string" use="optional" />
          <xs:attribute name="quickTips" type="SmallBoolean_Type" use="optional" />
          <xs:anyAttribute namespace="http://schemas.microsoft.com/XML-Document-Transform" processContents="strict"/>
        </xs:complexType>
      </xs:element>
    
    </xs:schema>
    If you want to edit this schema file with visual studio or see all the properties.

    In web.config file, context menu over the code and choose properties.
    The copy path (for me: "C:\Program Files (x86)\Microsoft Visual Studio 12.0\Xml\Schemas\DotNetConfig40.xsd") in Schemas attribute and open it with VS.
  5. #5
    @equiman, we much appreciate your contribution. Thank you!

Similar Threads

  1. Replies: 1
    Last Post: Sep 13, 2012, 6:38 PM
  2. [CLOSED] Runtime client error in /extnet/extnet-core-js/ext.axd?v=0
    By vadym.f in forum 1.x Legacy Premium Help
    Replies: 7
    Last Post: Aug 26, 2012, 7:13 AM
  3. [CLOSED] web.config error
    By x1000 in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Feb 25, 2010, 12:54 AM
  4. [CLOSED] avoid communcation error message box
    By speedstepmem3 in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Feb 04, 2009, 12:10 AM
  5. [CLOSED] GridPanel / Store schema
    By methode in forum 1.x Legacy Premium Help
    Replies: 8
    Last Post: Jan 13, 2009, 3:43 PM

Tags for this Thread

Posting Permissions