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

Value cannot be null Parameter name: virtualPath #41

Closed
lakeba opened this Issue Dec 30, 2015 · 1 comment

Comments

Projects
None yet
1 participant
@lakeba

lakeba commented Dec 30, 2015

The following error happens just after Install-Package Swashbuckle.OData and the adding of c.CustomProvider(defaultProvider => new ODataSwaggerProvider(defaultProvider, c)); into my existing Swagger config file.

Any idea?

500 : {"Message":"An error has occurred.","ExceptionMessage":"Value cannot be null.\r\nParameter name: virtualPath","ExceptionType":"System.ArgumentNullException","StackTrace":" at System.Web.VirtualPath.Create(String virtualPath, VirtualPathOptions options)\r\n at System.Web.Hosting.MapPathBasedVirtualPathProvider.CacheLookupOrInsert(String virtualPath, Boolean isFile)\r\n at System.Web.Routing.RouteCollection.IsRouteToExistingFile(HttpContextBase httpContext)\r\n at System.Web.Routing.RouteCollection.GetRouteData(HttpContextBase httpContext)\r\n at System.Web.Http.WebHost.Routing.HostedHttpRouteCollection.GetRouteData(HttpRequestMessage request)\r\n at Swashbuckle.OData.Descriptions.SwaggerRouteStrategy.CreateHttpRequestMessage(HttpMethod httpMethod, Operation potentialOperation, String potentialPathTemplate, ODataRoute oDataRoute, HttpConfiguration httpConfig)\r\n at Swashbuckle.OData.Descriptions.SwaggerRouteStrategy.GetActionDescriptors(HttpMethod httpMethod, Operation potentialOperation, String potentialPathTemplate, ODataRoute oDataRoute, HttpConfiguration httpConfig)\r\n at Swashbuckle.OData.Descriptions.SwaggerRouteStrategy.GetActionDescriptors(SwaggerRoute potentialSwaggerRoute, HttpConfiguration httpConfig)\r\n at Swashbuckle.OData.Descriptions.SwaggerRouteStrategy.<>c__DisplayClass3_0.b__1(SwaggerRoute potentialSwaggerRoute)\r\n at System.Linq.Enumerable.d__162.MoveNext()\r\n at System.Linq.Enumerable.<SelectManyIterator>d__162.MoveNext()\r\n at System.Linq.Enumerable.d__162.MoveNext()\r\n at System.Linq.Enumerable.<DistinctIterator>d__631.MoveNext()\r\n at System.Collections.Generic.List1..ctor(IEnumerable1 collection)\r\n at System.Linq.Enumerable.ToList[TSource](IEnumerable1 source)\r\n at Swashbuckle.OData.CollectionExtentions.ToCollection[T](IEnumerable1 source)\r\n at Swashbuckle.OData.Descriptions.ODataApiExplorer.GetApiDescriptions()\r\n at System.Lazy1.CreateValue()\r\n at System.Lazy1.LazyInitValue()\r\n at Swashbuckle.OData.Descriptions.ODataApiExplorer.get_ApiDescriptions()\r\n at Swashbuckle.OData.ODataSwaggerProvider.GetApiDescriptionsFor(String apiVersion)\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.Owin.PassiveAuthenticationMessageHandler.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.d__0.MoveNext()"} http://localhost/Easy.Docs.API/swagger/docs/v1

@ghost ghost closed this in a139e32 Dec 30, 2015

@ghost

This comment has been minimized.

Show comment
Hide comment
@ghost

ghost Dec 30, 2015

Hi @lakeba, please update to NuGet package v2.8.4 and retry. Let me know if you still have issues. Thanks!

ghost commented Dec 30, 2015

Hi @lakeba, please update to NuGet package v2.8.4 and retry. Let me know if you still have issues. Thanks!

@ghost ghost added the bug label Jan 4, 2016

This issue was closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment