我需要一些关于Microsoft Visual Web Developer 2010 Express的错误信息的帮助。
我想为我的网站创建一个画廊,所以我从codeplex下载了NotesForGallery。我按照安装说明将参考添加到了项目中。然后说明说:
在Web.Config文件(httpHandlers部分)中注册ThumbnailHandler:
<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 无法找到属性“verb”的模式信息。C:\ Documents and Settings \ adam \ My Documents \ Visual Studio 2010 \ WebSites \ FatBoyFudge \ Web.config 39 12 C:... \ FatBoyFudge \ 消息4 找不到属性“path”的模式信息。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第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>
如果您能帮助我,将会很有帮助,因为我不确定自己做错了什么。