webconfig中的随机重复错误

本文关键字:错误 随机 webconfig | 更新日期: 2023-09-27 17:54:41

我在webserver下的模块部分声明了一个随机名称,我得到了一个重复的错误消息:

Cannot add duplicate collection entry of type 'add' with unique key attribute 'name' set to 'jhgfygsdufygsdufygsdfuy2134567890hergwhegr2' 

Webconfig代码:

<system.webServer>
<modules runAllManagedModulesForAllRequests="true">
  <remove name="FormsAuthentication" />
  <add name="jhgfygsdufygsdufygsdfuy2134567890hergwhegr2"  />
 </modules>
<handlers>
  <remove name="ExtensionlessUrlHandler-Integrated-4.0" />
  <remove name="OPTIONSVerbHandler" />
  <remove name="TRACEVerbHandler" />
  <add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="*" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" />
</handlers>

webconfig中的随机重复错误

您应该尝试先添加<remove name="jhgfygsdufygsdufygsdfuy2134567890hergwhegr2">