久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

Elmah 不使用 asp.net 網(wǎng)站

Elmah not working with asp.net site(Elmah 不使用 asp.net 網(wǎng)站)
本文介紹了Elmah 不使用 asp.net 網(wǎng)站的處理方法,對大家解決問題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

問題描述

我嘗試在我的 asp.net 站點(diǎn)中使用 elmah,但每當(dāng)我嘗試訪問 http://localhost:port/elmah.axd 我得到資源未找到異常.我的 web.config 如下所示.

I've tried to use elmah with my asp.net site but whenever I try to go to http://localhost:port/elmah.axd I get resource not found exception. My web.config is given below.

    <?xml version="1.0"?>
    <configuration>
      <configSections>
        <sectionGroup name="elmah">
          <section name="security" requirePermission="false" 
                  type="Elmah.SecuritySectionHandler, Elmah"/>
          <section name="errorLog" requirePermission="false" 
                  type="Elmah.ErrorLogSectionHandler, Elmah" />
          <section name="errorMail" requirePermission="false" 
                  type="Elmah.ErrorMailSectionHandler, Elmah" />
          <section name="errorFilter" requirePermission="false" 
                  type="Elmah.ErrorFilterSectionHandler, Elmah"/>
        </sectionGroup>
      </configSections>
      <elmah>
        <security allowRemoteAccess="0" />
        <errorLog type="Elmah.SqlErrorLog, Elmah" 
                 connectionStringName="elmah-sql" />
        <errorMail
                from="my@account"
                to="myself"
                subject="ERROR From Elmah:"
                async="true"
                smtpPort="587"
                smtpServer="smtp.gmail.com"
                userName="my@account"
                password="mypassword" />
      </elmah>

      <connectionStrings>
        <add name="elmah-sql" connectionString="data source=(sqlserver); 
               database=elmahdb;
             integrated security=false;User ID=user;Password=password"/>
      </connectionStrings>
      <system.web>
        <compilation debug="true">
          <assemblies>
            <add assembly="Elmah, Version=1.0.10617.0, Culture=neutral, 
               PublicKeyToken=null"/>
          </assemblies>
        </compilation>
        <authentication mode="Windows"/>

        <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="ScriptModule" type="System.Web.Handlers.ScriptModule, 
                System.Web.Extensions, Version=3.5.0.0, Culture=neutral, 
                PublicKeyToken=31BF3856AD364E35"/>
        </httpModules>
      </system.web>

      <system.webServer>
        <validation validateIntegratedModeConfiguration="false"/>
        <modules runAllManagedModulesForAllRequests="true">
          <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"/>
          <add name="ErrorMail" type="Elmah.ErrorMailModule, Elmah"/>
          <add name="ErrorLog" type="Elmah.ErrorLogModule, Elmah"/>
          <add name="ErrorFilter" type="Elmah.ErrorFilterModule, Elmah"/>
        </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"/>
          <add name="Elmah" verb="POST,GET,HEAD" path="elmah.axd" 
                       preCondition="integratedMode" 
               type="Elmah.ErrorLogPageFactory, Elmah"/>
        </handlers>
      </system.webServer>
    </configuration>

Elmah =(錯誤記錄模塊和處理程序)
http://code.google.com/p/elmah/

Elmah = (Error Logging Modules and Handlers)
http://code.google.com/p/elmah/

推薦答案

嘗試在 <system.web> 部分的 "httphandlers" 和 "httpmodules" 部分注冊模塊和處理程序:

Try registering the Modules and Handlers in the sections "httphandlers" and "httpmodules" in the <system.web> section:

    <httpHandlers>
      ......
    <add verb="POST,GET,HEAD" path="elmah.axd" type="Elmah.ErrorLogPageFactory, Elmah"/>
      .....

    </httpHandlers>
    <httpModules>
        .......
        <add name="ErrorMail" type="Elmah.ErrorMailModule, Elmah"/>
        <add name="ErrorLog" type="Elmah.ErrorLogModule, Elmah"/>
        <add name="ErrorFilter" type="Elmah.ErrorFilterModule, Elmah"/>
       .......
    </httpModules>

這篇關(guān)于Elmah 不使用 asp.net 網(wǎng)站的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請聯(lián)系我們刪除處理,感謝您的支持!

相關(guān)文檔推薦

Is there a way to know if someone has bookmarked your website?(有沒有辦法知道是否有人為您的網(wǎng)站添加了書簽?)
Determining an #39;active#39; user count of an ASP.NET site(確定 ASP.NET 站點(diǎn)的“活動用戶數(shù))
Best way to keep track of current online users(跟蹤當(dāng)前在線用戶的最佳方式)
Build ASP.NET 4.5 without Visual Studio on Build Server(在構(gòu)建服務(wù)器上構(gòu)建沒有 Visual Studio 的 ASP.NET 4.5)
How to Publish Web with msbuild?(如何使用 msbuild 發(fā)布網(wǎng)頁?)
quot;Out of Bandquot; Processing Techiniques for asp.net applications(“帶外asp.net 應(yīng)用程序的處理技術(shù))
主站蜘蛛池模板: 超碰在线国产 | 日韩中文字幕在线观看视频 | 天天爽天天操 | 国产精品精品视频一区二区三区 | 国产黄色精品 | 91精品在线看| 亚洲精品在线看 | 九九av| 国内av在线| 久久av一区 | 伊人伊成久久人综合网站 | 国产一区二区三区免费 | 成人福利 | 欧美性大战久久久久久久蜜臀 | 欧美精品久久久久久久久久 | 亚洲精品久久久久久首妖 | 欧美亚洲一区二区三区 | 久久久青草 | 九九亚洲精品 | 国精品一区| 中文字幕在线观看第一页 | 免费中文字幕 | 亚洲+变态+欧美+另类+精品 | 在线观看中文字幕视频 | 亚洲精品中文在线 | 国产精品久久久久久久久久99 | 亚洲一区二区三区在线视频 | 国产精品mv在线观看 | 久草免费在线视频 | 一区二区日韩 | 91n成人 | 久热爱| 亚洲精品电影在线观看 | 日韩一区二区三区在线观看视频 | 国产精品视频不卡 | 国产成人精品网站 | 一区二区三区日韩 | 一区二区三区在线观看视频 | 一级毛片中国 | 永久看片| 国产伦精品一区二区三区视频金莲 |