How to identify Swagger errors

Last week I had the problem that Swagger wasn't working.
It just showed an HttpStatusCode 500 and in Visual Studio there wasn't any exception.

To identify the error I had to activate the 'DeveloperExceptionPage' in the Configure method.

public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)

{

app.UseDeveloperExceptionPage();

After this was activated, it showed me this nice error page with some great informations about the problem :)

In my case the error was simple to fix, just had two controller operations with same route and same HttpMethod.


Posted Nov 18 2016, 02:40 PM by Holger Vetter

Add a Comment

(required)  
(optional)
(required)  
Remember Me?
developers.de is a .Net Community Blog powered by daenet GmbH.