Search code examples
asp.netvisual-studio-2010gac

ASP.NET value changing on method call


This is driving me nuts! I have an asp.net application on my server. It references two dll-files which are placed in my GAC on the server. I have also placed pdb-files in the GAC-folders so I can debug remotely.

Here is my problem: When I call the following:

addToAbsenceList(e.Initials, a.StartDate, a.EndDate, a.Type.TypeId, vacationDays);

I can see that e.Initials contains the value "OFR". When I press F11 to jump into addToAbsenceList:

addToAbsenceList(string initials, DateTime startDate, DateTime endDate, int AbsenceType, double duration)

the variable initials now contains the value NULL.

I have just corrected this problem (previously it always sent NULL - now it works), so somehow it seems as if it still gets information from my previous code.

I only have one version of the dll in my GAC folder.
I have made sure that the version in my dll-folder is the new version (based on date of the file).
To be 100% sure I have also put the new dll-file in my BIN folder of the project.
When decompiling the dll-file with dotPeek from JetBrains I see that it contains my corrections.
I have tried restarting my web application from IIS
It works in my development environment.

So somehow it seems as if the old dll file is still active in my GAC. How can I assure that the new one is invoked? Preferable not by restarting the production server.

Server: MS Windows 2008 R2 64-bit
Deveveloment: Windows 7 32-bit


Solution

  • Believe I have to "upgrade" my comment to an answer:

    And now it works! I tried opening a command prompt as administrator. Then I copied the dll-files directly into the GAC-folders. Then it worked. Why it should be different from opening a Windows Explorer in administrator mode and copying the same is a mystery to me. Also because I did check date/times and they were updated correctly. –