2010-05-29 139 views
2

我需要一些幫助,可以通過Microsoft Visual Web Developer 2010 Express獲得一條錯誤消息。Web.Config中無法識別的配置節httpHandlers與Microsoft Visual Web Developer 2010 Express

我想爲我的網站創建一個畫廊,所以我從codeplex下載了NotesForGallery。我已經在項目中添加了參考,就像它在安裝說明中告訴我的那樣。該指令然後說

註冊ThumbnailHandler在web.config文件(HttpHandlers的部分):

<httpHandlers> 
… 
<add verb="*" path="ThumbnailHandler.ashx" type="NotesFor.ThumbnailHandler, NotesForGallery"/> 
… 
</httpHandlers> 

所以我在我的解決方案打開web.config文件,我將它添加當我嘗試啓動網站(單擊Web Developer中的播放按鈕)我收到錯誤消息:

無法識別的配置節httpHandlers。

錯誤的完整列表,我得到的是:

消息1未能找到元素「HttpHandlers的」的架構信息。 C:\ Documents and Settings \ adam \ My Documents \ Visual Studio 2010 \ WebSites \ FatBoyFudge \ Web.config 38 4 C:... \ FatBoyFudge \ 消息2無法找到元素'add'的架構信息。 C:\ Documents and Settings \ adam \ My Documents \ Visual Studio 2010 \ WebSites \ FatBoyFudge \ Web.config 39 8 C:... \ FatBoyFudge \ 消息3無法找到屬性「動詞」的模式信息。 C:\ Documents and Settings \ adam \ My Documents \ Visual Studio 2010 \ WebSites \ FatBoyFudge \ Web.config 39 12 C:... \ FatBoyFudge \ 消息4無法找到屬性「路徑」的架構信息。 C:\ Documents and Settings \ adam \ My Documents \ Visual Studio 2010 \ WebSites \ FatBoyFudge \ Web.config 39 21 C:... \ FatBoyFudge \ 消息5找不到屬性'type'的模式信息。 C:\ Documents and Settings \ adam \ My Documents \ Visual Studio 2010 \ WebSites \ FatBoyFudge \ Web.config 39 50 C:... \ FatBoyFudge \ 錯誤6無法識別的配置節httpHandlers。 C:\ Documents and Settings \ adam \ My Documents \ Visual Studio 2010 \ WebSites \ FatBoyFudge \ Web.config 38
警告7 C:\ Documents and Settings \ adam \ My Documents \ Visual Studio 2010 \ WebSites \ FatBoyFudge \ Gallery。 aspx:ASP.NET運行時錯誤:無法識別的配置節httpHandlers。 (C:\ Documents and Settings \ adam \ My Documents \ Visual Studio 2010 \ WebSites \ FatBoyFudge \ web.config line 38)C:\ Documents and Settings \ adam \ My Documents \ Visual Studio 2010 \ WebSites \ FatBoyFudge \ Gallery.aspx 1 1 C:... \ FatBoyFudge \

我創建的項目是一個網站,如果有幫助的話。

完整的web.config如下:

<configuration> 
    <connectionStrings> 
     <add name="ApplicationServices" connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|\aspnetdb.mdf;User Instance=true" providerName="System.Data.SqlClient"/> 
    </connectionStrings> 
    <system.web> 
     <compilation debug="true" targetFramework="4.0"/> 
     <authentication mode="Forms"> 
      <forms loginUrl="~/Account/Login.aspx" timeout="2880"/> 
     </authentication> 
     <membership> 
      <providers> 
       <clear/> 
       <add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="ApplicationServices" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10" applicationName="/"/> 
      </providers> 
     </membership> 
     <profile> 
      <providers> 
       <clear/> 
       <add name="AspNetSqlProfileProvider" type="System.Web.Profile.SqlProfileProvider" connectionStringName="ApplicationServices" applicationName="/"/> 
      </providers> 
     </profile> 
     <roleManager enabled="false"> 
      <providers> 
       <clear/> 
       <add name="AspNetSqlRoleProvider" type="System.Web.Security.SqlRoleProvider" connectionStringName="ApplicationServices" applicationName="/"/> 
       <add name="AspNetWindowsTokenRoleProvider" type="System.Web.Security.WindowsTokenRoleProvider" applicationName="/"/> 
      </providers> 
     </roleManager> 
    </system.web> 
    <system.webServer> 
     <modules runAllManagedModulesForAllRequests="true"/> 
    </system.webServer> 
    <httpHandlers> 
     <add verb="*" path="ThumbnailHandler.ashx" type="NotesFor.ThumbnailHandler, NotesForGallery"/> 
    </httpHandlers> 
</configuration> 

任何幫助,您可以給,因爲我不知道我做錯了

回答

5

把我將會很方便您的httpHandlerssystem.web部分。

+0

非常感謝您的答案。 – lardymonkey 2010-05-29 16:30:03

相關問題