Unmanaged DLLs fail to load on ASP.NET server

This happens because the managed dlls get shadow copied to a temporary location under the .NET Framework directory. See http://msdn.microsoft.com/en-us/library/ms366723.aspx for details. Unfortunately, the unmanaged dlls do NOT get copied and the ASP.NET process won’t be able to find them when it needs to load them. One easy solution is to put the unmanaged dlls … Read more

Marshaling – what is it and why do we need it?

Because different languages and environments have different calling conventions, different layout conventions, different sizes of primitives (cf. char in C# and char in C), different object creation/destruction conventions, and different design guidelines. You need a way to get the stuff out of managed land an into somewhere where unmanaged land can see and understand it … Read more

What is meant by “managed” vs “unmanaged” resources in .NET?

The term “unmanaged resource” is usually used to describe something not directly under the control of the garbage collector. For example, if you open a connection to a database server this will use resources on the server (for maintaining the connection) and possibly other non-.net resources on the client machine, if the provider isn’t written … Read more

What is managed or unmanaged code in programming?

This is a good article about the subject. To summarize, Managed code is not compiled to machine code but to an intermediate language which is interpreted and executed by some service on a machine and is therefore operating within a (hopefully!) secure framework which handles dangerous things like memory and threads for you. In modern … Read more

What exactly are unmanaged resources?

Managed resources basically means “managed memory” that is managed by the garbage collector. When you no longer have any references to a managed object (which uses managed memory), the garbage collector will (eventually) release that memory for you. Unmanaged resources are then everything that the garbage collector does not know about. For example: Open files … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)