私は@Request.Browser.IsMobileDevice
、ASP .NET MVC Web サイトへの訪問者を区別するために依存しています。
51 Degrees
ライブラリを使用しています。ただし、モバイル デバイスから一部の画像を閲覧すると、エラーが発生します414 (request-uri too long)
。これは PC では発生せず、モバイルでのみ発生します。
スタックは次の場所に表示PathTooLongException
されています:
à System.IO.PathHelper.GetFullPathName()
à System.IO.Path.NormalizePath(String path, Boolean fullCheck, Int32 maxPathLength, Boolean expandShortPaths)
à System.IO.Path.GetFullPathInternal(String path)
à System.Security.Util.StringExpressionSet.CanonicalizePath(String path, Boolean needFullPath)
à System.Security.Util.StringExpressionSet.CreateListFromExpressions(String[] str, Boolean needFullPath)
à System.Security.Permissions.FileIOPermission.AddPathList(FileIOPermissionAccess access, AccessControlActions control, String[] pathListOrig, Boolean checkForDuplicates, Boolean needFullPath, Boolean copyPathList)
à System.Security.Permissions.FileIOPermission..ctor(FileIOPermissionAccess access, String path)
à System.Web.InternalSecurityPermissions.PathDiscovery(String path)
à System.Web.HttpRequest.MapPath(VirtualPath virtualPath, VirtualPath baseVirtualDir, Boolean allowCrossAppMapping)
à System.Web.HttpServerUtility.MapPath(String path)
à FiftyOne.Foundation.Mobile.Detection.Feature.ImageOptimiser.OptimisedImageResponse(HttpContext context)
à FiftyOne.Foundation.Mobile.Detection.DetectorModule.OnPostAuthorizeRequest(Object sender, EventArgs e)
à System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
à System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
FiftyOne
このスタックにあるようです。51Degrees をアンインストールすると、動作が再開されます。ただしIsMobileDevice
、現在のデバイスとの互換性を維持するには、51 度が必要です。
不足しているパラメータはありますか? 51度はバージョン.NET 3.1.9.3