Error loading native library grpc_csharp_ext.x86.dll - asp.net

I have an ASP.NET web site targeting Framework 4.6.2 where I attempt to use a GRPC service from my controller. When I attempt to create the Channel, I get an exception:
"Error loading native library \"C:\\Users\\sstainba\\repos\\location-management-service\\src\\LocationManagement.Web\\bin\\grpc_csharp_ext.x86.dll\""}
My project already has a reference to the GRPC, GRPC.Core, GRPC.Auth and GRPC.Tools packages. And, in fact, the assembly DOES exist at that exact location. I am at a loss as to why it won't load. What other things can I try other than adding the reference?

Figure out the problem... Permissions on the bin folder. I temporarily set permissions to give everyone full control and it worked.

Related

500 Error (0x80070005 (E_ACCESSDENIED)) in ASP.Net Core API with referenced project

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?
System.Speech requires LocalSystem of Application Pool Identity if you use it in a .net web application. I don't have a better solution, perhaps you can try another Speech library which can work individually for your project. The similar question

Classic ASP error when using a COM+ DLL

I have an old site that I was tasked with fixing after it broke. We are getting the following error:
ActiveX component can't create object for aBRR.Generato`r
The code on that line is:
set taMaker = createObject("aBRR.Generator")
I found the DLL aBRR.dll on an old machine. I believe it needs to go in:
e$\components\COM+\theAppName\
To install it in the COM+ folder do I just drop it in there? Is there anything else?
Do I just add the IUSR with what permissions to the DLL?
I think that was done but it's still giving the error.
If it's a classic COM DLL, you simply need to register it with regsvr32.
However, if the library depends on COM+, you need to place it inside a COM+ application. That way, any call to createObject() gets intercepted by the COM+ catalog manager, which ensures that that the object receives additional services.
See this link for further details.

Could not load file or assembly 'Microsoft.AI.Web' or one of its dependencies. The system cannot find the file specified.

I am a new bee to web services and I have to publish a web service to a server.
I added an application using IIS but when I try to browse the application it gives me this error.
Could not load file or assembly 'Microsoft.AI.Web' or one of its dependencies. The system cannot find the file specified.
I had seen other answers about this issue,where most of them are related to installing Microsoft.AI.Web package. This is already installed in my web service and I am still getting the error.
Thanks in advance for any suggestions to resolve this.
There was an update waiting on the Nuget package manager for Microsoft.ApplicationInsights, after updating it added the application again to IIS. This resolved my error.

ASP.Net Forms "type exists in both dll1 and dll2" error in Debug mode but not Release mode

In a website project targeted for the .Net Framework 3.5 I occasionally get an error like the following:
The type 'ASP._myetc_master' exists in both 'c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\site\3a65eca7\73f2d86b\App_Web_myetc.master.cdcab7d2.iefhoqis.dll' and 'c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\site\3a65eca7\73f2d86b\App_Web_myetc.master.cdcab7d2.tgrvlldi.dll'
This error often pops up after updating a backend library that the data access layer for the site relies upon, and crops up in pages that rely on those objects. I have removed the Temporary ASP.Net Files folder in question, and have also removed and re-added the references in question and deleted the contents of my /bin directory. None of those things seem to have any effect (although the last time I encountered the problem clearing the references seemed to resolve the issue).
I only encounter the error when building in the Debug configuration - when building in the Release configuration the error doesn't occur.
Any pointers to where else I might look for a cause or solution would be highly appreciated.
OK, I think I resolved it. Here's what I think the scoop is:
My solution is structured so that I have a data access layer project that references an integration layer with our ERP system. The web project references the data access layer. I had the integration layer also referenced in the web project, so in essence it was being included twice; once by the DAL and once by the web project. Removing the reference at the web project layer resolved the issue.
I am still a little confused as to why the error message pointed to duplication in a master page and not in the objects provided by the integration layer. I am also confused as to why the web project built fine when in Release mode but not in Debug mode. Nevertheless, my specific problem appears to be resolved.

"The specified module can not be found" in asp.net application

I just tried to copy my entire web application to a new instance of Visual Studio 2008 on another (virtual) machine.
It builds just fine, but when I try to run the applicaton I just get the message "The specified module could not be found".
Does anyone have an idea how I can find out which module this message refers to? Because there are quite a lot, and as far as I can see they're all installed.
I would suggest you delete all the temporary ASP.Net files for your project and then do a rebuild. This will ensure all the new code is recompilled and no old references remain.
Sometime simply building the solution doesn't work and you need to rebuild instead to force it to either show you the real error or get the references correct.
If your project uses COM and an interop assembly, you'll be able to build (because the assembly is there), but raise a runtime exception if the COM server is not registered on the new machine.

Resources