2013-10-29 133 views
0

如何在web.config中添加處理程序,我的處理程序名稱是圖像處理程序。託管處理程序後 不起作用。處理程序在託管後無法正常工作,我正在使用asp.net

這是我的web.config

<?xml version="1.0"?> 
<configuration> 
<system.data> 
    <DbProviderFactories> 
    <remove invariant="MySql.Data.MySqlClient" /> 
    <dependentAssembly> 
    <assemblyIdentity name="MySql.Data" publicKeyToken="c5687fc88969c44d" culture="neutral" /> 
    <bindingRedirect oldVersion="0.0.0.0-6.6.5.0" newVersion="6.6.5.0" /> 
    <codeBase version="6.6.5.0" href="bin\Assembly\6.6.5\MySql.Data.dll"/> 
    <codeBase version="6.7.4.0" href="bin\MySql.Data.dll"/> 
</dependentAssembly> 
    </DbProviderFactories> 
</system.data> 

    <system.web> 
    <customErrors mode="Off" /> 
    <compilation defaultLanguage="c#" debug="true" targetFramework="4.0"/> 
    </system.web> 
</configuration> 
+0

可以請你告訴我們你的'web.config'和處理程序簽名與一提的IIS您使用 – Sachin

+0

webconfig版本顯示above.i我在HostGator的服務器託管 – user2925643

回答

1

您可以在web.config中system.web部分內註冊的處理程序。

<system.web> 
    <httpModules> 
     <add name="HandlerName" type="Namespace.HandlerClassName"/> 
    </httpModules> 

    <httpHandlers> 
     <add path="*.htm" verb="*" type="Namespace.HtmlFileHandler, Namespace"/> 
    </httpHandlers> 
    </system.web> 
+0

它顯示錯誤(沿500 - 內部服務器錯誤。)運行時 – user2925643

+0

顯示更新後的web.config部分 – Sachin

相關問題