title: Internal server when trying to load external asp.mvc website through code
body: <p>I'm trying to help out a colleague with a problem he is having. This means I don't have all debug information available, but thought maybe someone here could steer us in the right direction.</p>
  
  <p>As stated in the title he is trying to load the html of an external website by code. He is in fact using cUrl. I have also tested using cUrl (php), file_get_contents (php), wget (terminal), and WebClient and HttpWebRequest (c#). The result is an internal server error message.</p>
  
  <pre><code>[NullReferenceException: Object reference not set to an instance of an object.]
  Innsyn.Controllers.BaseController.ExecuteCore() +673
  System.Web.Mvc.ControllerBase.Execute(RequestContext requestContext) +334
  System.Web.Mvc.&lt;&gt;c__DisplayClassb.&lt;BeginProcessRequest&gt;b__5() +61
  System.Web.Mvc.Async.&lt;&gt;c__DisplayClass1.&lt;MakeVoidDelegate&gt;b__0() +19
  System.Web.Mvc.&lt;&gt;c__DisplayClasse.&lt;EndProcessRequest&gt;b__d() +53
  System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +468
  System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&amp; completedSynchronously) +374
  </code></pre>
  
  <p>As you can see the website he is trying to load is an asp.mvc application: <a href="http://einnsyn.harstad.kommune.no/einnsyn" rel="nofollow">http://einnsyn.harstad.kommune.no/einnsyn</a></p>
  
  <p>When viewing the website with a browser the site works fine.</p>