I asked a server if they could install aspJpeg so I can use it in my classic asp project but they told me that I should put its DLL in my own bin folder.
I have read some answers and guidelines using Visual Studio . But I didn't use visual studio in my project. There is no bin folder and no more extra files and settings to add and consume a dll in my project.
Can I consume a dll using manual code through web.config or inline with my asp codes (or vbscript code) or something like that? I have no access to command prompt and server administration and I want to do that through pure coding.
DLL must be registered on server side by using command
regsvr32 <youdll>
Your hosting company/hosting support team have to do this. You cannot do this remotely.
By the way, what IIS version are you using?
"There is no bin folder"
Yes, because it's not an ASP.NET project.
"but they told me that I should put its DLL in my own bin folder."
When you contacted hosting support team, did you mentioned that you are running Classic ASP website? You could upload DLL, but you cannot register it on their server.
Related
I need to publish .net core project to smarterasp.net server. I use visual studio code. How can I deploy my project?
I've run into bugs with Web Deploy, so I use a Folder (aka 'File') deploy to a local folder and then FTP the content of that folder to the root website folder at SmarterASP.NET. The main trick is that when you set up your publishing profile, you must change to 'self contained' and target x86. If you leave the default settings, your site won't work. I'm referring to Core 3 here....
since I don't know the smarterasp.net provider, but unless you have a free hosting plan, smarterasp.net declares that ASP.NET Core 3.x is already installed for which you only need to build your project and inserting it in the root of your IIS site without installing the core framework on the server would not work.
Good luck.
I have .net core web application project which using a third party DLL (zkemkeeper.dll a C++ DLL). Adding this library to my VS project is fine.
I can add it as a reference and everything works fine when I tried to run it. However, VS didn't recognize the library of this DLL as you can see on the below image.
So due to this issue I can't publish the project? Any tricks on this?
Just do the following steps,
1. Register zkemkeeper.dll in server (where your side is hosted)
2. Also register above dll on the computer where you are developing it.
Note: best way to register dll of zkemkeeper
download sdk of 32/64 bit from http://www.zkteco.eu/index.php/downloads/software-downloads
run Auto-install_sdk file as a administrator or system.
it will automatically register required dll into your system
Thanks
Just sharing, I've already fixed the issue by using the DLL generated in my bin folder (Interop.zkemkeeper.dll). Now my only problem is this one.
I am a little new to VB.NET but I have downloaded and installed VS Express 2012 for web. I created a web application that is fairly simple. One page. mypage.aspx It runs perfect in studio and responses how I would expect.
What I want to do is make it run from the dll. Not from the mypage.aspx.vb. I see the dll for the project in the bin folder.
But when I move mypage.aspx and web.config, and bin with dll to the server it simply says its missing the code behind page. Do I just need to change the reference to the VB file?
If you want to use dll, Go to Build menu in your Visual Studio and click on Publish Web Site
Set Target Location, there your whole project will be get created with dll and without code behind files.
Use this project to deploy on your server.
I would like to run a native httpmodule (c++ 64-bit dll) in windows azure. Firstly is this possible and secondly, what id the best way to go about it?
I have previously used a native dll in azure but wrapped it within a managed c# httphandler which worked fine but this time I would like to host the native dll directly. Is it possible to just host the native dll in azure same as I would in IIS?
I believe you are using a Windows Azure Web Role and on Windows Azure Web Role, native HttpModule configuration with IIS will be the same as and other IIS server the only trick here is that you would be using Startup task to run AppCmd command to install, register and configure your native module.
The basic command you would need in your startup task will be similar to as below:
appcmd install module /name: string /image: string /add:true|false /lock:true|false
For example, to register, enable, and lock a module named ImageCopyrightModule with the .dll file in the %windir%\system32\inetsrv directory, type the following at the command prompt, and then press ENTER:
appcmd install module /name: ImageCopyrightModule /image:c:/%windir%/system32/inetsrv/ imageCopyrightModule .dll /add:true /lock:true
Yes It's possible, I recently had to use an unmanaged C library in my Azure project so what I did was to create a C++/CLI wrapper for it and simply reference it in my C# project.
I believe that's the easiest way to do it, otherwise you'll need to use P/Invoke to call the unmanaged native code directly from C#.
Remember that on the cloud side, Azure uses the 2008 Visual C++ runtime library so you'll either have to compile your C++ project using VS2008, or a better alternative would be to upload the Visual C++ 2010 Redistributable Package to the cloud and silently install it on start-up.
I list the 3 simple steps to do that here If you're interested.
I'm trying to add a .NET 4.0 .dll to the GAC. I am attempting to do this because it is published by a 3rd party company as both a 32 and 64bit .dll which I must use from different apps on different platforms in both formats.
At any rate, I am having trouble registering this dll to the GAC on a Windows Server 2008 environment.
I have tried copying gacutil.exe (and supporting file) found at "C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\bin\NETFX 4.0 Tools" on my local machine to the "C:\Windows\Microsoft.NET\Framework\v4.0.30319" folder on the target production server per the suggestions found here.
I then tried copying them to "C:\Windows\Microsoft.NET\Framework64\v4.0.30319".
Running from both locations indicated successful installation. And indeed, the registration appears successful:
C:\Windows\Microsoft.NET\assembly\GAC_64\ChilkatDotNet4\v4.0_9.0.8.0__eb5fc1fc52ef09bd\ChilkatDotNet4.dll
C:\Windows\Microsoft.NET\assembly\GAC_32\ChilkatDotNet4\v4.0_9.0.8.0__eb5fc1fc52ef09bd\ChilkatDotNet4.dll
However, running a console app that refers to the (64bit) version of the dll errors out with the following message:
System.IO.FileNotFoundException: Could
not load file or assembly
'ChilkatDotNet4.dll' or one of its
dependencies. The specified module
could not be found. File name:
'ChilkatDotNet4.dll'
So, I have now manually created the following GAC entries using mkdir and copy from a command prompt (which may or may not actually work. I have no clue what is so special about gacutil.exe):
C:\Windows\Microsoft.NET\assembly\GAC_MSIL\ChilkatDotNet4\v4.0_9.0.8.0__eb5fc1fc52ef09bd\ChilkatDotNet4.dll (using the 64bit version of the dll)
C:\Windows\assembly\GAC_64\ChilkatDotNet4\v4.0_9.0.8.0__eb5fc1fc52ef09bd\ChilkatDotNet4.dll
C:\Windows\assembly\GAC_32\ChilkatDotNet4\v4.0_9.0.8.0__eb5fc1fc52ef09bd\ChilkatDotNet4.dll
After each "install" of the dll, I tested and received the same error. Any ideas welcome!
EDIT: the GAC issue above may not actually be the culprit. Turns out, even when I create a brand new Console App project and add the .dll directly (so that it lives in the bin), I still can't run it on the sever. Also, I've noted that Console apps are created targeting the .NET 4.0 Client Profile rather than the .NET Framework 4. When I try to run it targeting the client profile, it appears that none of the System.Web* libraries are available. However, I tried running a very simple test app targeting both and neither would run on the server while referencing the bad .dll.
Is there a special kind of install that was to occur to run .NET 4.0 Console Apps?
For anyone else who may have trouble with this in the future. It was not a generalized problem with the way I was registering the dll to the GAC or how I was referring to it from my projects.
ChilkatDotNet4.dll (and the other versions I'm sure) was built in Visual C++. So, the server it is being deployed to has to have the Visual C++ Runtime installed for the appropriate processor architecture.
For 2010 (.NET 4.0):
x86
x64
If you're running an x86 app on a 64-bit platform. Make sure to mark the application pool with "Enable 32-bit applications" = true.