我是ext.net的新人。我创建一个新项目,我更改了web.config代码,但我总是采取配置错误。我应该怎么做才能解决这个问题?这是我的web.config代码。
<?xml version="1.0"?>
<configuration>
<configSections>
<section name="extnet" type="Ext.Net.GlobalConfig" requirePermission="false"/>
</configSections>
<extnet scriptMode="Release"/>
<!-- See Property Options in README.txt -->
<!--
The following system.web section is only requited for running ASP.NET AJAX under Internet
Information Services 6.0 (or earlier). This section is not necessary for IIS 7.0 or later.
-->
<system.web>
<httpHandlers>
<add path="*/ext.axd" verb="*" type="Ext.Net.ResourceHandler" validate="false"/>
</httpHandlers>
<httpModules>
<add name="DirectRequestModule" type="Ext.Net.DirectRequestModule, Ext.Net"/>
</httpModules>
<compilation debug="true">
<assemblies>
<add assembly="System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
<add assembly="System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
<add assembly="System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
<add assembly="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
<add assembly="System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="Microsoft.CSharp, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
<add assembly="System.ComponentModel.DataAnnotations, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/></assemblies></compilation></system.web>
<!--
The system.webServer section is required for running ASP.NET AJAX under Internet Information Services 7.0.
It is not necessary for previous version of IIS.
-->
<system.webServer>
<validation validateIntegratedModeConfiguration="false"/>
<modules>
<add name="DirectRequestModule" preCondition="managedHandler" type="Ext.Net.DirectRequestModule, Ext.Net"/>
</modules>
<handlers>
<add name="DirectRequestHandler" verb="*" path="*/ext.axd" preCondition="integratedMode" type="Ext.Net.ResourceHandler"/>
</handlers>
</system.webServer>
答案 0 :(得分:0)
在文件末尾添加</ configuration>
答案 1 :(得分:0)
Ext.NET的Web.config示例位于Examples Explorer。
答案 2 :(得分:0)
您可以向Visual Studio添加架构。我制作了一个可以手动添加的模式。
在tag之前将此代码添加到DotNetConfig.xsd架构中。 我基于2.4.0自述文件创建元素。 http://examples.ext.net/#/Getting_St...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>
然后你可以调试你的ext.net配置有什么问题。此外,您可以在web.config上使用并拥有Ext.net Intellisense:D