Last post Jul 28, 2017 07:54 AM by PatriceSc
Jul 27, 2017 08:05 AM|Amarnath Mahato|LINK
I wanted to import "ASPUPLOADLib.dll" is GAC as it is throwing error in CS0246: The type or namespace name 'ASPUPLOADLib' could not be found (are you missing a using directive or an assembly reference?)
<%@ Import Namespace="ASPUPLOADLib" %>
Things i tried :
1. I know copying the dll file and pasting in Windows\Assembly won't work, although i tried that too
2. Tried to use gacutil /i ASPUPLOADLib.dll but it gave some Assign / change strong name to existing assembly error so i followed the steps mentioned here :
i.e creating a new signature and creating a new dll using ( sn, ildasm, ilasm) but it didn't worked.
Can someone help me with this??
Server : Windows server 2012 R2
IIS Version 8
How to add this interop assembly file in GAC?
Jul 27, 2017 08:25 AM|PatriceSc|LINK
Or just use https://msdn.microsoft.com/en-us/library/wkze6zky.aspx to add a reference to this file? And then use "copy local" on this file to keep it in your bin folder. Does it work?
IMO keep the GAC for really very stable and widely used files.
Jul 27, 2017 08:54 AM|Amarnath Mahato|LINK
Actually I have more than 600+ websites running in IIS. so it's not a good option to create /bin folder for all in root directory
Jul 27, 2017 01:34 PM|PatriceSc|LINK
And they are all using this DLL ? How do they work currently ? This is a 3rd party and you don't have access to the source code for this ?
According to https://stackoverflow.com/questions/1220519/how-to-sign-a-net-assembly-dll-file-with-a-strong-name you have other tools as well
but regardless of what you'll try, it will be easier to help if you tell what happens rather than just that "it didn't worked".
Ah, could it be that the DLL was added to the GAC but that you still have this CS0246 error message? Stricly speaking it's unrelated to having a DLL in the GAC. You still need to have a reference to the DLL if this is not yet the case.
Jul 27, 2017 02:10 PM|mgebhard|LINK
ASPUPLOADLib.dll is a COM+ component. COM+ is installed through the component snap in in windows or by registering the component using regsvr32 path/to/the/dll. If this is a 32-bit app and you are running in a 64 bit environment, then you'll need to execute regsvr32
from syswow64 and make sure you run the command as an admin. However, registering this way does not guarantee it will work as you might need supporting DLLs as well.
The full install instructions are available on the software owner's documentation page.
I suggest you contact the software provider for further assistance.
Jul 28, 2017 02:28 AM|Cathy Zou|LINK
Hi Amarnath Mahato,
Following the create steps below to Install an Assembly into the Global Assembly Cache:
1.Copy the ‘ASPUPLOADLib’ assembly to your local computer.
2.Open Developer Command Prompt for Visual Studio as administrator.
3.Type the following:
gacutil /i path_to_assembly_file /f
For example, type:
gacutil /i c:\temp\filename.dll /f
The /f option overwrites any existing assembly that has the same assembly name. For more info on the gacutil commands and options, type gacutil /?.
Jul 28, 2017 07:54 AM|PatriceSc|LINK
Or is this really this component? Looks outdated for ASP.NET. Which value does it add?
Anyway, once again it will be easier to help if you tell what happens when doing something rather than just telling that it doesn't work.