I have created a WebAPI project in .Net Core (3.1) that references / has a dependency to a second project in my solution.
It works perfectly on my local machine, but I published it to my web-host, and I am getting 500 errors from a specific POST method that is using the referenced project.
When I examine the output log, the error looks as follows:
Connection id "0HMFHNV7NFO0R", Request id "0HMFHNV7NFO0R:00000010": An unhandled exception was thrown by the application.
System.UnauthorizedAccessException: Access is denied. (0x80070005 (E_ACCESSDENIED))
at System.Speech.Internal.SapiInterop.ISpRecognizer.SetRecognizer(ISpObjectToken pRecognizer)
...
at <Referenced project & method> in C:\Users\<username>\...\...\....cs:line 23
Basically, from what I'm seeing, it seems my API is actually trying to access the referenced project at it's original location on my local machine (C:\Users<username>..........cs:line 23).
I truly don't understand what's happening here since the rest of the API seems to work well except for the parts referencing the other project, but that doesn't make sense to me since .Net core should just supply the relevant DLLs, no?
As a bit more information, the second library being referenced is using System.Speech
which another poster has mentioned may be the issue, but it is a library utilizing .Net Core 3.1 which, to the best of my knowledge, should make it not require anything outside of the provided libraries.
What can I do to fix this / what does this error mean?