Note that there are some explanatory texts on larger screens.

plurals
  1. POProblems with deploying MVC 4 app on Windows Server 2008
    primarykey
    data
    text
    <p>I have deployed this MVC app on my localhost(on my machine running windows 8) and it runs as expected. The only difference between my installation folder and the one which is on the server, is the connection string. But when I try to deploy it on the server machine(Windows Server 2008) I get this strange error : </p> <p><code>[NullReferenceException: Object reference not set to an instance of an object.] PicknikMVC.ViewModels.ApplicationViewModel..ctor(Application app) in c:\Builds\workspace\Picknik\AppStoreService\target\checkout\AppStoreService\PicknikMVC\ViewModels\Application\ApplicationViewModel.cs:23 PicknikMVC.Controllers.Application.ShowController.Execute(String appid) in c:\Builds\workspace\Picknik\AppStoreService\target\checkout\AppStoreService\PicknikMVC\Controllers\Application\ShowController.cs:59 lambda_method(Closure , ControllerBase , Object[] ) +126 System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary</code>2 parameters)+247 System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary<code>2 parameters) +38 System.Web.Mvc.Async.&lt;&gt;c__DisplayClass39.&lt;BeginInvokeActionMethodWithFilters&gt;b__33() +119 System.Web.Mvc.Async.&lt;&gt;c__DisplayClass4f.&lt;InvokeActionMethodFilterAsynchronously&gt;b__49() +452 System.Web.Mvc.Async.&lt;&gt;c__DisplayClass37.&lt;BeginInvokeActionMethodWithFilters&gt;b__36(IAsyncResult asyncResult) +15 System.Web.Mvc.Async.&lt;&gt;c__DisplayClass2a.&lt;BeginInvokeAction&gt;b__20() +31 System.Web.Mvc.Async.&lt;&gt;c__DisplayClass25.&lt;BeginInvokeAction&gt;b__22(IAsyncResult asyncResult) +230 System.Web.Mvc.&lt;&gt;c__DisplayClass1d.&lt;BeginExecuteCore&gt;b__18(IAsyncResult asyncResult) +28 System.Web.Mvc.Async.&lt;&gt;c__DisplayClass4.&lt;MakeVoidDelegate&gt;b__3(IAsyncResult ar) +15 System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) +53 System.Web.Mvc.Async.&lt;&gt;c__DisplayClass4.&lt;MakeVoidDelegate&gt;b__3(IAsyncResult ar) +15 System.Web.Mvc.&lt;&gt;c__DisplayClass8.&lt;BeginProcessRequest&gt;b__3(IAsyncResult asyncResult) +42 System.Web.Mvc.Async.&lt;&gt;c__DisplayClass4.&lt;MakeVoidDelegate&gt;b__3(IAsyncResult ar) +15 System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +606 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&amp; completedSynchronously) +288</code></p> <p>The code in the app where this happens is basically instantiating a new object of particular class with some information from the database. Do you see any obvious problem? Could it be a problem with the connection string or it is something else?</p> <p>AppViewModel:</p> <pre><code> public class ApplicationViewModel { public int App_ID { get; set; } public string Title { get; set; } public string Developer { get; set; } public string DeveloperURL { get; set; } public bool IsImportant { get; set; } public IEnumerable&lt;ScreenshotPairViewModel&gt; Screenshots { get; set; } public ApplicationViewModel(PicknikData.Application app) { App_ID = app.App_ID; Title = app.Title; Developer = app.Developer; DeveloperURL = app.DeveloperURL; if (app.IsImportant.HasValue) { IsImportant = app.IsImportant.Value; } Screenshots = app.ScreenshotURLs.Select(p =&gt; new ScreenshotPairViewModel(p.Screenshot_URL,p.FK_Device)).ToList(); } } </code></pre> <p>and the code for the controller:</p> <pre><code> viewModel.Application = new ApplicationViewModel(app); </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload