使用Microsoft Visual Web Developer 2010 Express在Web.Config中无法识别的配置部分httpHandlers

lar*_*key 3 c# web-config visual-studio-2010

我需要一些帮助,我在Microsoft Visual Web Developer 2010 Express中收到错误消息.

我想为我的网站创建一个库,所以我从codeplex下载了NotesForGallery.我已将该引用添加到项目中,就像它在安装说明中告诉我的那样.然后说明说

在Web.Config文件(httpHandlers部分)中注册ThumbnailHandler:

<httpHandlers>
…
<add verb="*" path="ThumbnailHandler.ashx" type="NotesFor.ThumbnailHandler, NotesForGallery"/>
…
</httpHandlers> 
Run Code Online (Sandbox Code Playgroud)

所以我在我的解决方案中打开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\Message 2无法找到元素"add"的架构信息.C:\ Documents and Settings\adam\My Documents\Visual Studio 2010\WebSites\FatBoyFudge\Web.config 39 8 C:...\FatBoyFudge\Message 3无法找到属性"verb"的架构信息.C:\ Documents and Settings\adam\My Documents\Visual Studio 2010\WebSites\FatBoyFudge\Web.config 39 12 C:...\FatBoyFudge\Message 4无法找到属性"path"的架构信息.C:\ Documents and Settings\adam\My Documents\Visual Studio 2010\WebSites\FatBoyFudge\Web.config 39 21 C:...\FatBoyFudge\Message 5无法找到属性"type"的架构信息.C:\ Documents and Settings\adam\My Documents\Visual Studio 2010\WebSites\FatBoyFudge\Web.config 39 50 C:...\FatBoyFudge\Error 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第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>
Run Code Online (Sandbox Code Playgroud)

你能给我的任何帮助都会很方便,因为我不确定我做错了什么

Dan*_*ite 6

把你httpHandlers放在这个system.web部分.