ASP .NET Core 3.1
System.DllNotFoundException: Unable to load shared library 'urlmon.dll' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: liburlmon.dll: cannot open shared object file: No such file or directory at FindMimeFromData(IntPtr pBC, String pwzUrl, Byte[] pBuffer, Int32 cbSize, String pwzMimeProposed, Int32 dwMimeFlags, IntPtr& ppwzMimeOut, Int32 dwReserved) at ValidateMimeType(List`1 colBytesFile, htconstructorparams htConstructorParams) in \Share.cs:line 5048 at ValidateFileMimeType(HttpRequest request, htconstructorparams htConstructorParams) in \Share.cs:line 5019 at FileMiddleware.Invoke(HttpContext context) in ''\FileMiddleware.cs:line 43 at JwtMiddleware.Invoke(HttpContext context, IUserSessionService _userSessionService) in ''\JwtMiddleware.cs:line 79 at Microsoft.AspNetCore.Builder.Extensions.MapMiddleware.Invoke(HttpContext context) at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context) at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context) at Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIMiddleware.Invoke(HttpContext httpContext) at Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext httpContext, ISwaggerProvider swaggerProvider) at ErrorHandlerMiddleware.Invoke(HttpContext context, hk_log_dbcontext logDbContext)
1条答案
按热度按时间q7solyqu1#
urlmon.dll
是一个Windows组件。NET核心是跨平台的,但是当你在Linux上运行它时,你不能访问任何特定于Windows的库、功能或文件,比如
urlmon.dll
。如果您想找出Linux上文件的mime类型,可能必须使用特定于Linux的解决方案,如How can I find out a file's MIME type (Content-Type)?。