Base solution for your next web application
Ends in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

Error obtaining Swagger UI #6779


User avatar
0
PhilWynn created

Hi,

I am trying to view the Swagger UI and am getting a 500 error. Please could you give me some guidance as to how I can debug this issue.

I have not changed the cofiguration from the default:

private void ConfigureSwaggerUi() { Configuration.Modules.AbpWebApi().HttpConfiguration .EnableSwagger(c => { c.SingleApiVersion("v1", "ippex.IppexCloud.WebApi"); c.ResolveConflictingActions(apiDescriptions => apiDescriptions.First()); }) .EnableSwaggerUi(c => { c.InjectJavaScript(Assembly.GetAssembly(typeof(IppexCloudWebApiModule)), "ippex.IppexCloud.WebApi.Scripts.Swagger-Custom.js"); }); }

I am using ABP v3.8.3 and Aspnet Zero v4 with MVC/Jquery

Many thanks


5 Answer(s)
  • User Avatar
    0
    ryancyq created
    Support Team

    Hi, can you share the full stacktrace of the http 500 exception?

  • User Avatar
    0
    PhilWynn created

    Hi,

    I managed to fix the 500 error by adding the UseFullTypeNameInSchemaIds directive.

    Unfortunately, now the browser is simply running out of memory!

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @philwynn

    We don't suggest using UseFullTypeNameInSchemaIds for swagger configuration. It causes other problems. Are you getting this error with a blank template downloaded from aspnetzero.com or it happend because of a change you have made ?

    Thanks.

  • User Avatar
    0
    PhilWynn created

    Hi,

    It has has happened due to changes I have made. I am happing to debug, however I do not know how to go about doing this.

    Cheers

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @philwynn

    The log file (App_Data/Logs/Logs.txt or Logs/Logs.txt under your web app directory) should contain a detailed error message. Could you check it and share with us ?

    Thanks,