开发者

Unrecognized configuration section httpHandlers in Web.Config with Microsoft Visual Web Developer 2010 Express

开发者 https://www.devze.com 2023-01-01 06:23 出处:网络
I am in need of some help with an error message I get with Microsoft Visual Web Developer 2010 Express.

I am in need of some help with an error message I get with Microsoft Visual Web Developer 2010 Express.

I would like to create a gallery for my site so I downloaded the NotesForGallery from codeplex. I have added the reference into the project like it told me to in the installation instructions. The instructions then say

Register the ThumbnailHandler in the Web.Config file (httpHandlers section):

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

So I open the web.config file in my solution and I add it in. When I try and start the website (clicking the play button in Web Developer) I get the error message:

Unrecognized configuration section httpHandlers.

The complete list of errors I get are:

Message 1 Could not find schema information for the element 'httpHandlers'. C:\Documents and Settings\adam\My Documents\Visual Studio 2010\WebSites\FatBoyFudge\Web.config 38 4 C:...\FatBoyFudge\ Message 2 Could not find schema information for the element 'add'. C:\Documents and Settings\adam\My Documents\Visual Studio 2010\WebSites\FatBoyFudge\Web.config 39 8 C:...\FatBoyFudge\ Message 3 Could not find schema information for the attribute 'verb'. C:\Documents and Settings\adam\My Documents\Visual Studio 2010\WebSites\FatBoyFudge\Web.config 39 12 C:...\FatBoyFudge\ Message 4 Could not find schema information for the attribute 'path'. C:\Documents and Settings\adam\My Documents\Visual Studio 2010\WebSites\FatBoyFudge\Web.config 39 21 C:...\FatBoyFudge\ Message 5 Could not find schema information for the attribute 'type'. C:\Documents and Settings\adam\My Documents\Visual Studio 2010\WebSites\FatBoyFudge\Web.config 39 50 C:...\FatBoyFudge\ Error 6 Unrecognized configuration section httpHandlers. C:\Documents and Settings\adam\My Documents\Visual Studio 2010\WebSites\FatBoyFudge\Web.config 38

Warning 7 C:\Documents and Settings\adam\My Documents\Visual Studio 2010\WebSites\FatBoyFudge\Gallery.aspx: ASP.NET runtime error: Unrecognized configuration section 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\

The project I created was a website if that helps any.

The complete web.config is as follows:

<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>

Any help you could give me would be handy because I'm not sure what I am doing wrong


Put your httpHandlers in the system.web section.


Change the app pool to use "integrate mode' instead of 'classic'

0

精彩评论

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