0

When I upload the files on the remote server I get the following message:

Object reference not set to an instance of an object

And a few errors supposed to be happening in the ClassDesigner file and other few classes.

Cœur
  • 37,241
  • 25
  • 195
  • 267
met.lord
  • 618
  • 2
  • 9
  • 35
  • 1
    Please give more details of the exceptions. – Daniel A. White Sep 03 '10 at 01:05
  • There was no error in the code, but thanks anyway. The problem was that someone else deleted a table on the database. The cause for this were some models that were not used. Thanks anyway for your replies. – met.lord Oct 07 '10 at 14:56

2 Answers2

0

You have a bug in your code.

You need to read the details of the exceptions and find and fix the bug.

SLaks
  • 868,454
  • 176
  • 1,908
  • 1,964
0

The error message you give is to general to help. It basically means you are trying to access a object that is null. Please at least give a stack trace.

Craig
  • 36,306
  • 34
  • 114
  • 197
  • I'm sorry... Here is the stack trace: [NullReferenceException: Object reference not set to an instance of an object.] Models.ClasesDataContext..ctor() in Clases.designer.cs:98 [TargetInvocationException: Exception has been thrown by the target of an invocation.] System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandle& ctor, Boolean& bNeedSecurityCheck) +0 – met.lord Sep 03 '10 at 01:25
  • System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean fillCache) +86 System.RuntimeType.CreateInstanceImpl(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean fillCache) +230 System.Activator.CreateInstance(Type type, Boolean nonPublic) +67 System.Web.Mvc.DefaultControllerFactory.GetControllerInstance(RequestContext requestContext, Type controllerType) +80 – met.lord Sep 03 '10 at 01:26
  • [InvalidOperationException: An error occurred when trying to create a controller of type 'Summumnet.Controllers.PortalController'. Make sure that the controller has a parameterless public constructor.] System.Web.Mvc.DefaultControllerFactory.GetControllerInstance(RequestContext requestContext, Type controllerType) +189 – met.lord Sep 03 '10 at 01:26
  • System.Web.Mvc.DefaultControllerFactory.CreateController(RequestContext requestContext, String controllerName) +60 System.Web.Mvc.MvcHandler.ProcessRequestInit(HttpContextBase httpContext, IController& controller, IControllerFactory& factory) +116 System.Web.Mvc.MvcHandler.BeginProcessRequest(HttpContextBase httpContext, AsyncCallback callback, Object state) +47 – met.lord Sep 03 '10 at 01:26
  • System.Web.Mvc.MvcHandler.BeginProcessRequest(HttpContext httpContext, AsyncCallback callback, Object state) +60 System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.BeginProcessRequest(HttpContext context, AsyncCallback cb, Object extraData) +13 System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +8677954 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +155 – met.lord Sep 03 '10 at 01:27
  • As I said before, in my local computer it works perfectly, no errors compiling... don't understand what happens remotely. Also, I tried two different ways to publish the app but no success... Don't understand why... – met.lord Sep 03 '10 at 01:28