La aplicación ASP.NET se comporta de manera diferente en 2 servidores de producción (.net 4 win2008 iis 7.5)

I want to transfer my application to an other production server within the same network.
I publish my site using vs 2010 (Debug Mod), I copy it to one server I get an exception.
The other server loads it fine.
I have made iisreset and delete .net temp files in both servers, but still one giving me an exception and the other not.

The is the exception I get in one server: I believe that I get the wrong stack because it is deployment environment.

System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NullReferenceException: Object reference not set to an instance of an object.
  at ExpressApp.Models.ActionsMetadata.BaseField.GetWrapper() in C:\Users\myPC\Documents\Visual Studio 2010\Projects\ExpressApp\ExpressApp\Models\ActionsMetadata\BaseField.cs:line 42
  at ExpressApp.Models.ActionsMetadata.Renderers.Field..ctor(FieldName name, List`1 validators, ApplicationLanguage lang) in C:\Users\myPC\Documents\Visual Studio 2010\Projects\ExpressApp\ExpressApp\Models\ActionsMetadata\Renderers\Field.cs:line 21
  --- End of inner exception stack trace ---
  at System.RuntimeMethodHandle._InvokeConstructor(IRuntimeMethodInfo method, Object[] args, SignatureStruct& signature, RuntimeType declaringType)
  at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
  at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
  at System.Activator.CreateInstance(Type type, Object[] args)
  at ExpressApp.Models.ActionsMetadata.ActionStep.LoadFields(XDocument stepFields, ApplicationLanguage lang) in C:\Users\myPC\Documents\Visual Studio 2010\Projects\ExpressApp\ExpressApp\Models\ActionsMetadata\ActionStep.cs:line 67
  at ExpressApp.Models.ActionsMetadata.ActionStep..ctor(String name, XDocument stepFields, ApplicationLanguage lang, Type handler, App App, Boolean secured) in C:\Users\myPC\Documents\Visual Studio 2010\Projects\ExpressApp\ExpressApp\Models\ActionsMetadata\ActionStep.cs:line 22
  at ExpressApp.Models.ActionsMetadata.AppAction.ChargeSteps(XDocument xAction) in C:\Users\myPC\Documents\Visual Studio 2010\Projects\ExpressApp\ExpressApp\Models\ActionsMetadata\AppAction.cs:line 107
  at ExpressApp.Models.ActionsMetadata.AppAction..ctor(App App, XDocument xAction, String actionName, ApplicationLanguage lang) in C:\Users\myPC\Documents\Visual Studio 2010\Projects\ExpressApp\ExpressApp\Models\ActionsMetadata\AppAction.cs:line 84
  at ExpressApp.Models.ActionsMetadata.AppActions.Load() in C:\Users\myPC\Documents\Visual Studio 2010\Projects\ExpressApp\ExpressApp\Models\ActionsMetadata\AppAction.cs:line 58  

Editar
Line 42 has nothing that can happened there.
I Even did
try{}catch(Exeption e){log.Error(e)}
over the entire method there to prevent the exception but still I get the exception

preguntado el 31 de enero de 12 a las 08:01

And what does line 42 of BaseField look like? -

nothing that can happened there, I even did try{}catch(){log.Error()} -

Do these 2 servers contain the same .dll AND .pdb files? It's important that they'll be exactly the same - first to eliminate this as a possible cause for the differentiation, second - to validate that the line you pointed to is indeed line 42. -

I get this error (although not the exact stack trace) whenever I have an issue with my db connection string -

I have no database in this application -

0 Respuestas

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.