huysentruitw / SapNwRfc

SAP NetWeaver RFC library for .NET 5, .NET Core and .NET Framework
MIT License
148 stars 43 forks source link

In-process hosting with IIS Error:Could not open the lcu common library. The following files must be in the path described by the environment variable "PATH": icuuc50.dll, icudt50.dll,icuin50.dll #32

Closed Qiulin-Git closed 3 years ago

Qiulin-Git commented 3 years ago

image

I have placed the DLL in the project output folder,The Out-of-process hosting with IIS is running normally , But In-process hosting with IIS Error:Could not open the lcu common library. The following files must be in the path described by the environment variable "PATH": icuuc50.dll, icudt50.dll,icuin50.dll

campersau commented 3 years ago

What is the value of Directory.GetCurrentDirectory()? Depending on the aspnet core version you might need to use this: https://github.com/dotnet/aspnetcore/issues/4206#issuecomment-445612167

huysentruitw commented 3 years ago

Great suggestion of @campersau to check the current directory. I have ran this as in-process under IIS without issues (by having the SAP dll's together with all other .NET dll's of the project on the server).

A workaround could be to place the SAP dll's in C:\sap, add C:\sap to the systems PATH variable and restart IIS.

Qiulin-Git commented 3 years ago

There is no problem registering the DLL into the system , But I want to call DLL directly in the project output folder