c# - Automapper configurations missings -


i'm struggling days qua strange problem: registered automapper mappings in static class so

public static class automapperconfig {     public static void configure()     {         mapper.createmap<person, editpersonviewmodel>();         mapper.createmap<user, edituserviewmodel>();     } } 

this class called application_start in global.asax. far good, because in development environment works fine.

in our production environment experiencing behaviour cannot explain. after time application start throwing these exceptions:

missing type map configuration or unsupported mapping

which quite strange, because mapping exists alright. quickfix repair recycle application pool, in turn causes application_start ran again.

we suspect goes wrong after application restarted after application pool idle timeout. unfortunately cannot reproduce issue decreasing iis idle timeout.

by way, ruled out other possible causes:

  1. the automapperconfig class not static
  2. we we're using autofac stuff register automapper maps, since figured maybe issue, removed autofac part

any thoughts on cause problem?


Comments

Popular posts from this blog

cakephp - simple blog with croogo -

How to group boxplot outliers in gnuplot -

bash - Performing variable substitution in a string -