Does adding a .dll to the GAC require a reboot?

  • Thread starter Christopher Campbell
  • Start date
C

Christopher Campbell

I have a custom control that I developed working fine. When I deployed it
to my staging server, I copied the DLL into the global assembly cache just
using drag-n-drop. This worked fine and the .dll was registered. However,
when I ran the application, I got a "Parser Error" indicating that the .dll
was not found. I restarted IIS and the problem was resolved. I thought
that when a new assembly was added to the GAC, the .NET Framework was
supposed to pick it up on the fly and recompile the application to use it
without a restart. I want to deploy the control to my production server but
I don't want to stop my application to do it.

Can anyone tell me if I'm doing something wrong?

Thanks for any help you can offer.

Chris

Christopher K. Campbell
mailto://[email protected]
 
J

Jacob Yang [MSFT]

Hi Chris,

Considering the performance, IIS cache the dll in memory for later fast
launch-up after it initialized the dll for the first time. It is a behavior
by design. Without restarting IIS, there is another way to ask IIS to
unload the cached dlls. That is, we should go to the Internet Information
Service console, right click the virtual directory, select Properties, and
click Unload button on the default tab page.

Does it answer your question? If I have misunderstood your concern, please
feel free to let me know.

Best regards,

Jacob Yang
Microsoft Online Partner Support
Get Secure! ¨C www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 
C

Christopher Campbell

I had already tried what you suggested and it didn't work.

Here's an update...

I have moved the application into production. I have two versions running
on the same server. One version works fine. The other still gets the .dll
not found error. However, I moved the .dll into the bin folder of the
problem version and it works.

Could I be missing something in the configuration? I intend on using this
control across several applications and I don't want to have it in the bin
folder of every app.

Thanks,

Chris
 
J

Jacob Yang [MSFT]

Hi Chris,

Based on my research and experience, I think that the problematic
application should be rebuilt along with the custom control located in GAC.
The reason is I skeptical that the problematic application was original
developed and compiled with the custom dll in bin folder, rather than the
one in GAC on development machine. Thank you for your understanding.

I hope it helps.

Best regards,

Jacob Yang
Microsoft Online Partner Support
Get Secure! ¨C www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,535
Members
45,007
Latest member
obedient dusk

Latest Threads

Top