Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exploring different version at the same time throw an error. #190

Closed
maubin-kl opened this issue Jul 25, 2018 · 0 comments
Closed

Exploring different version at the same time throw an error. #190

maubin-kl opened this issue Jul 25, 2018 · 0 comments

Comments

@maubin-kl
Copy link

In an application with multiple OData versions, configure Swashbuckle.OData to display multiple api versions.

In two separate browser, select two different version and click Explore on both (as fast as possible).

It generates the error below:

500 : {"Message":"An error has occurred.","ExceptionMessage":"Collection was modified; enumeration operation may not execute.","ExceptionType":"System.InvalidOperationException","StackTrace":" at System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)\r\n at System.Collections.Generic.List1.Enumerator.MoveNextRare()\r\n at System.Collections.Generic.List1.Enumerator.MoveNext()\r\n at System.Linq.Enumerable.WhereSelectListIterator2.MoveNext()\r\n at System.Linq.Enumerable.d__591.MoveNext()\r\n at Swashbuckle.OData.ODataSwaggerProvider.GenerateSwagger(String rootUrl, String apiVersion)\r\n at Swashbuckle.OData.ODataSwaggerProvider.<>c__DisplayClass4_0.<GetSwagger>b__1()\r\n at System.Lazy1.CreateValue()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Lazy1.get_Value()\r\n at Swashbuckle.OData.ODataSwaggerProvider.GetSwagger(String rootUrl, String apiVersion)\r\n at Swashbuckle.Application.SwaggerDocsHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)\r\n at System.Net.Http.HttpMessageInvoker.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)\r\n at System.Web.Http.Dispatcher.HttpRoutingDispatcher.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)\r\n at System.Net.Http.DelegatingHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)\r\n at System.Web.Http.Cors.CorsMessageHandler.<SendAsync>d__0.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.HttpServer.<SendAsync>d__0.MoveNext()"} http://localhost:62670/swagger/docs/v12

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants