Mvc Swagger报错的解决办法。
报错信息:Not supported by Swagger 2.0: Multiple operations with path ‘xxxx.aspx’ and method 'POST'
解决办法出处:https://stackoverflow.com/questions/39706508/swagger-not-supported-by-swagger-2-0-multiple-operations-with-path
解决办法:
第一步:找到SwaggerConfig页面,引用:using System.Linq;
第二步:
找到大概175行的代码,是注释状态,取消注释。再执行可以解决。
c.ResolveConflictingActions(apiDescriptions => apiDescriptions.First());