3

I want to access Network path with credential on Dotnet Core 2.0. I am able to access network locally in windows machine. I am following the solution in How to provide user name and password when connecting to a network share

But when i hosted application in docker in linux container, it throws error Application startup exception:

System.DllNotFoundException: Unable to load DLL 'mpr.dll': The specified module or one of its dependencies could not be found. (Exception from HRESULT: 0x8007007E)

The error is because 'mpr.dll' is not in linux. mpr.dll is found at C:\Windows\System32\mpr.dll. I tried to refer dll but it is not supported in dotnet core.

Is there any alternative solution?

mohan08p
  • 5,002
  • 1
  • 28
  • 36
Renjith
  • 682
  • 4
  • 19
  • Your main question and the error you get seem to be about 2 completely different things. Can you, perhaps, split the question? Accessing network paths is probably unrelated to mpr.dll. And you havent told us anything about mpr.dll. What is it? Where is it coming from? – omajid Apr 17 '18 at 12:03
  • hi @omajid https://stackoverflow.com/a/1197430/7961239 – Renjith Apr 17 '18 at 12:42
  • 1
    @omajid The solution he's following has references to mpr.dll as most of those solutions given in that link are WIN32 only solutions, referencing mpr.dll/advapi32.dll + kernal32.dll. Obviously none of those will work on a linux or OS x environment – Salizar Marxx Jul 17 '18 at 19:25
  • 3
    Hey @Renjith, I know this question is kind of old now. But did you ever figure out a solution? I'm in the same boat now. – Treyphor Sep 23 '19 at 20:00
  • Hey @Renjith, I know this question is old but did you manage to solve this problem? – Vogel T. Sep 09 '22 at 22:42

0 Answers0