当试图运行Imageresizer时,值不能为空异常。

问题描述 投票:1回答:1

当我试图使用我的 rest api 插件用这个 urL 运行我的 Image Resizer 时,得到以下错误。http:/localhost:8001D1900010012059。

插件代码可以在这里找到。https:/github.commikaelekstromresizerapipluginblobmasterRestAPIImageRetriever.cs。

Value cannot be null.
Parameter name: value 
  Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

 Exception Details: System.ArgumentNullException: Value cannot be null.
Parameter name: value

Source Error: 


 An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.  

Stack Trace: 



[ArgumentNullException: Value cannot be null.
Parameter name: value]
   System.String.StartsWith(String value, StringComparison comparisonType) +598
   ImageResizer.Storage.BlobProviderBase.FileExists(String virtualPath, NameValueCollection queryString) +88
   ImageResizer.Plugins.VirtualPathProviderShim.GetVIP(String virtualPath) +217
   ImageResizer.Plugins.VirtualPathProviderShim.FileExists(String virtualPath) +23
   System.Web.Routing.RouteCollection.IsRouteToExistingFile(HttpContextBase httpContext) +120
   System.Web.Routing.RouteCollection.GetRouteData(HttpContextBase httpContext) +129
   System.Web.Routing.UrlRoutingModule.PostResolveRequestCache(HttpContextBase context) +70
   System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +139
   System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) +195
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +88
imageresizer
1个回答
0
投票

你需要在插件中设置 VirtualFilesystemPrefix 属性来为你的类设置路由,你的类将处理所有前往该前缀的请求。你的类将处理所有前往该前缀的请求。

© www.soinside.com 2019 - 2024. All rights reserved.