I made a web application that use a DllImport to use a specific printer in my application. The printer DLL are in my System32. If I put myweb application in my web server, this DllImport will search for this Dll in my server or in the client ?
If the answer is in the client, how can I made to search this Dll in the client ?
The DLL will be searched for on the Server, not the client.
You should also know that anything printed through the .NET code will be printed on the Server side as that's where all of the .NET code executes.
Related
I've developed a machine control application that needs a technician panel - local and remote (internal local network). I thought a good way to avoid duplicate coding is use Blazor Web Assembly application, launch it locally in a WebView2 control or externally on the technician laptop and communicate with the system using gRPC.
All is well but one issue - I don't have and do not want to run a web server on the machine's computer.
Is there a way I can launch a web assembly application (Blazor) directly from a local file?
One thing you could try is launching it as a desktop application using Electron or WebWindow.
WebWindow is experimental, but a lot lighter than Electron. (See https://github.com/SteveSandersonMS/WebWindow)
Here is an article about using Electron and blazor WASM. https://medium.com/cloudnimble/bringing-your-blazor-apps-to-the-desktop-with-electronnet-blazor-67701bff82f7
You could also compile it to static html files and use a mini Python HTTP server to serve up the files. If you use Python 3 you can run the python -m http.server [port] command from the publish\wwwroot directory to serve up the files locally. You then just navigate to localhost:[port]to access your app.
Hopefully at least one of these approaches helps you.
I have a C# WCF Web Service on a remote server running on IIS 8.5. One of the method of this web service tries to call a function in another custom DLL on the remote server but it returns a System.Exception specifying that it doesn't found the DLL. I logged the exception on the DLL Loader and it returns the right path to the DLL though.
The DLL is a C++ DLL used to execute a Matlab function via the runtime (installed on the server and referenced in the PATH variable as well as the DLL.
My DLL is situated in the bin folder of the project. I also tried to put it into the %windir%/System32 but same error.
By the way, the web service works great while on my Local Computer. The error only occurs while deployed
Any idea on how I can have my web service to find the DLL and execute the function?
Thanks,
I am new to C++/VC++ and SNMP. I am trying to implement Snmp extension agent which would send custom information for OIDs defined by me. I followed this link and got the Snmp extension agent working as expected. The application in the link is developed in native C++.
I would like to have the dll developed in VC++/C#. I compiled the application in C++/cli and deployed the dll, but Snmp service stopped picking up my dll. What am I missing?
I have a Windows Server 2008 Standard 64-bit box on which I run a test web site under IIS7.
My hosting provider has the same configuration than me yet my precious custom DLL is not honored?
Calls to my DLL (plain vanilla _CDECL Export Functions) are, well. "ignored".
No error message. Nothing. Zilch. I press the button in the middle of the page that should trigger the calls but nothing happens.
The DLL is located in C:\Windows\SysWOW64 on both machines.
That's the path used in my DllImport declaration.
The site is setup with ASP.NET v4 with Integrated Pipeline mode.
I checked for pesky dependencies and this DLL makes calls to Kernel32.dll and NTdll.dll, both of which who are sitting in C:\Windows\SysWOW64 next to my dear DLL.
No, I didn't have to register this DLL on my machine.
Any ideas would be appreciated.
I am creating a web page using ASP.Net C# 4.0, that will be used to detect scanner deployed with a server and save scanned images to the server. I have created this page using WIA (Windows Image Acquisition). This page is working and scanning images when I run it within asp.net development server, but when I deploy it in IIS 6.0 it says:
Could not load file or assembly 'Interop.WIA' or one of its dependencies. An attempt was made to load a program with an incorrect
format.
Is it because of WIA being a COM component ? Or is there anything which I am missing when deployed in IIS ?
Please help !!!
"An attempt was made to load a program with an incorrect format." Usually means you're trying to load 32-bit code into a 64-bit process or vice-versa.
Try setting your IIS app pool to 32-bit (some info here)
Got to Start->Run->type inetmgr and on the left application pools, select DefaultAppPool and the virtual directory name of the app and for both make sure to enable 32 -bit applications to true, am using IIS7.0 and windows 7 64-bit.
Solution