AutoMapper/AutoMapper — Issue #166: Calling Automapper mutiple times fails
Author: ajsica
Created: 2012-01-11 00:04:18+00:00
State: open

I am using Automapper in web application. Previously I had been calling reset() on each request, so I had never run into this issue. Under heavy load, I was getting some race conditions with Automapper being initialized on different requests, so I changed the code to initialize automapper once in global.asax. This caused a new problem to surface. The first mapping goes through with no problem. If automapper is called mutilple times on the same object, no problem. But if automapper is called on a different object, then I receive mapping errors. The mapping is fairly large and I have a sample project with a test case that fails.