开发者

ASP.NET Devexpress controls don't show correctly on live server

开发者 https://www.devze.com 2023-02-15 14:18 出处:网络
On Visual Studio.NET 2010/localhost, an ASP.NET page developed with Devexpress editor and textbox controls looks nice. When uploaded to IIS 7.5, the generated html source is almost identical, except f

On Visual Studio.NET 2010/localhost, an ASP.NET page developed with Devexpress editor and textbox controls looks nice. When uploaded to IIS 7.5, the generated html source is almost identical, except for the references to script WebResources (script src="/WebResource.axd?d=tpzArdJXo7erNNqm...), but the validators don't fire and the controls have a different style.

Somewhere on the DevExpress website I read that WebResources may become inaccessible for some reason and that one should stop the IIS service, clear the Temporary ASP.NET files and the GAC cache, and restart. Restarting the IIS is out of question, and I refuse to believe that this is the only solution.

Any suggestions?

I'm using DevExpress version 10.1.7.0. This is the web.config:

<?xml version="1.0"?>
    <configuration>
        <configSections>
            <sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
                <sectionGroup name="scripting" type="System.Web.Configuratio开发者_JAVA技巧n.ScriptingSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
                    <section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
                    <sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
                        <section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="Everywhere"/>
                        <section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
                        <section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
                        <section name="roleService" type="System.Web.Configuration.ScriptingRoleServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
                    </sectionGroup>
                </sectionGroup>
            </sectionGroup>
        </configSections>
        <appSettings>
            <!-- Use semi-colons to separate entries-->
            <add key="ExcludeFromErrorMails" value="Der Thread wurde abgebrochen;Datei ist nicht vorhanden;This is an invalid webresource request'"/>
            <add key="CuteWebUI.AjaxUploader.UseAspNetStream" value="True"/>
        </appSettings>
        <connectionStrings>
    ...
     </connectionStrings>
        <system.web>
            <urlMappings enabled="true">
                <add url="~/QAAwards.aspx" mappedUrl="~/FAQ/QAAwards.aspx"/>
            </urlMappings>
            <customErrors mode="Off"/>
            <httpRuntime executionTimeout="1800" maxRequestLength="50000"/>
            <compilation debug="true">
                <assemblies>
                    <add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
                    <add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
                    <add assembly="System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
                    <add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
                    <add assembly="System.Data.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
                    <add assembly="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
                    <add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
                    <add assembly="DevExpress.Web.ASPxHtmlEditor.v10.1, Version=10.1.7.0, Culture=neutral, PublicKeyToken=B88D1754D700E49A"/>
                    <add assembly="DevExpress.Web.v10.1, Version=10.1.7.0, Culture=neutral, PublicKeyToken=B88D1754D700E49A"/>
                    <add assembly="DevExpress.Web.ASPxEditors.v10.1, Version=10.1.7.0, Culture=neutral, PublicKeyToken=B88D1754D700E49A"/>
                    <add assembly="DevExpress.Web.ASPxSpellChecker.v10.1, Version=10.1.7.0, Culture=neutral, PublicKeyToken=B88D1754D700E49A"/>
                    <add assembly="DevExpress.Data.v10.1, Version=10.1.7.0, Culture=neutral, PublicKeyToken=B88D1754D700E49A"/>
                    <add assembly="DevExpress.XtraSpellChecker.v10.1.Core, Version=10.1.7.0, Culture=neutral, PublicKeyToken=B88D1754D700E49A"/></assemblies>
            </compilation>
            <authentication mode="Windows"/>
            <pages>
                <controls>
                    <add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
                    <add tagPrefix="asp" namespace="System.Web.UI.WebControls" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
                    <add namespace="CuteWebUI" assembly="CuteWebUI.AjaxUploader" tagPrefix="CuteWebUI"/>
                    <add namespace="MagicAjax.UI.Controls" assembly="MagicAjax" tagPrefix="MagicAjax"/>
                </controls>
            </pages>
            <httpHandlers>
                <remove verb="*" path="*.asmx"/>
                <add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
                <add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
                <add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false"/>
            </httpHandlers>
            <httpModules>
                <add name="MagicAjax" type="MagicAjax.MagicAjaxModule, MagicAjax"/>
                <add name="CuteWebUI.UploadModule" type="CuteWebUI.UploadModule,CuteWebUI.AjaxUploader"/>
                <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
            </httpModules>
        </system.web>
        <system.codedom>
            <compilers>
                <compiler language="c#;cs;csharp" extension=".cs" warningLevel="4" type="Microsoft.CSharp.CSharpCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
                    <providerOption name="CompilerVersion" value="v3.5"/>
                    <providerOption name="WarnAsError" value="false"/>
                </compiler>
                <compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" warningLevel="4" type="Microsoft.VisualBasic.VBCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
                    <providerOption name="CompilerVersion" value="v3.5"/>
                    <providerOption name="OptionInfer" value="true"/>
                    <providerOption name="WarnAsError" value="false"/>
                </compiler>
            </compilers>
        </system.codedom>
        <system.webServer>
            <validation validateIntegratedModeConfiguration="false"/>
            <modules>
                <remove name="ScriptModule"/>
                <add name="ScriptModule" preCondition="managedHandler" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
            </modules>
            <handlers>
                <remove name="WebServiceHandlerFactory-Integrated"/>
                <remove name="ScriptHandlerFactory"/>
                <remove name="ScriptHandlerFactoryAppServices"/>
                <remove name="ScriptResource"/>
                <add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
                <add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
                <add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
            </handlers>
        </system.webServer>
        <runtime>
            <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
                <dependentAssembly>
                    <assemblyIdentity name="System.Web.Extensions" publicKeyToken="31bf3856ad364e35"/>
                    <bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/>
                </dependentAssembly>
                <dependentAssembly>
                    <assemblyIdentity name="System.Web.Extensions.Design" publicKeyToken="31bf3856ad364e35"/>
                    <bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/>
                </dependentAssembly>
            </assemblyBinding>
        </runtime>
    </configuration>


Please open Handler Mappings property in the IIS settings of the web application's and make certain that

AssemblyResourceLoader-Integrated and AssemblyResourceLoader-Integrated 4.0 has the request path equal to WebResource.axd and Type is System.Web.Handlers.AssemblyResourceLoader.

Also, please make certain that the Pipeline mode of the application's Pool is set to the Integrated mode.

Olaf, your web.config file does not contain registration information about our http handler. To register ASPxHttpHandlerModule and enable its features, just place a DevExpress web control on the form or add specific code to the web.config file manually. For more information, see the How to manually register a HttpHandler Module topic.

0

精彩评论

暂无评论...
验证码 换一张
取 消