title: How to stop asp.net from trying to load sharepoint?
body: <p>I have a ASP.net forms page that is acting as a proxy.</p>
  
  <p>My website is downloading some content from another website, companyX.com.</p>
  
  <p>companyX.com's site is using sharePoint. </p>
  
  <p>My site is downloading the HTML from companyX.com and successfully adding it to my page, however, after <code>Page_Init, Page_Load</code> and <code>Page_Unload</code> but before <code>Render</code> my page is throwing the error pasted below.</p>
  
  <p>My site does not have any sharepoint installed. However, it looks like there is something in asp.net that is processing the HTML content in my page, recognizing some sharepoint tags and then trying to load sharepoint. I would love to turn this off!</p>
  
  <p>My page does have <code>EnableViewState="false" EnableViewStateMac="false" ValidateRequest="false"</code></p>
  
  <p>Error:</p>
  
  <pre><code>System.Web.HttpException (0x80004005): The state information is invalid for this page and might be corrupted. ---&amp;gt; System.Web.UI.ViewStateException: Invalid viewstate. 
      Client IP: 127.0.0.1
      Port: 55413
      Referer: xxx/App.aspx?id=xxx
      Path: /App.aspx
      User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.72 Safari/537.36
      ViewState: xxx... ---&amp;gt; System.ArgumentException: The serialized data is invalid. ---&amp;gt; System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' or one of its dependencies. The system cannot find the file specified.
     at System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMarkHandle stackMark, IntPtr pPrivHostBinder, Boolean loadTypeFromPartialName, ObjectHandleOnStack type)
     at System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark&amp;amp; stackMark, IntPtr pPrivHostBinder, Boolean loadTypeFromPartialName)
     at System.RuntimeType.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark&amp;amp; stackMark)
     at System.Type.GetType(String typeName, Boolean throwOnError)
     at System.Web.UI.ObjectStateFormatter.DeserializeType(SerializerBinaryReader reader)
     at System.Web.UI.ObjectStateFormatter.DeserializeValue(SerializerBinaryReader reader)
     at System.Web.UI.ObjectStateFormatter.DeserializeValue(SerializerBinaryReader reader)
     at System.Web.UI.ObjectStateFormatter.DeserializeValue(SerializerBinaryReader reader)
     at System.Web.UI.ObjectStateFormatter.DeserializeValue(SerializerBinaryReader reader)
     at System.Web.UI.ObjectStateFormatter.DeserializeValue(SerializerBinaryReader reader)
     at System.Web.UI.ObjectStateFormatter.DeserializeValue(SerializerBinaryReader reader)
     at System.Web.UI.ObjectStateFormatter.DeserializeValue(SerializerBinaryReader reader)
     at System.Web.UI.ObjectStateFormatter.DeserializeValue(SerializerBinaryReader reader)
     at System.Web.UI.ObjectStateFormatter.DeserializeValue(SerializerBinaryReader reader)
     at System.Web.UI.ObjectStateFormatter.DeserializeValue(SerializerBinaryReader reader)
     at System.Web.UI.ObjectStateFormatter.DeserializeValue(SerializerBinaryReader reader)
     at System.Web.UI.ObjectStateFormatter.DeserializeValue(SerializerBinaryReader reader)
     at System.Web.UI.ObjectStateFormatter.DeserializeValue(SerializerBinaryReader reader)
     at System.Web.UI.ObjectStateFormatter.DeserializeValue(SerializerBinaryReader reader)
     at System.Web.UI.ObjectStateFormatter.DeserializeValue(SerializerBinaryReader reader)
     at System.Web.UI.ObjectStateFormatter.DeserializeValue(SerializerBinaryReader reader)
     at System.Web.UI.ObjectStateFormatter.DeserializeValue(SerializerBinaryReader reader)
     at System.Web.UI.ObjectStateFormatter.DeserializeValue(SerializerBinaryReader reader)
     at System.Web.UI.ObjectStateFormatter.DeserializeValue(SerializerBinaryReader reader)
     at System.Web.UI.ObjectStateFormatter.Deserialize(Stream inputStream)
     --- End of inner exception stack trace ---
     at System.Web.UI.ObjectStateFormatter.Deserialize(Stream inputStream)
     at System.Web.UI.ObjectStateFormatter.Deserialize(String inputString, Purpose purpose)
     at System.Web.UI.ObjectStateFormatter.System.Web.UI.IStateFormatter2.Deserialize(String serializedState, Purpose purpose)
     at System.Web.UI.Util.DeserializeWithAssert(IStateFormatter2 formatter, String serializedState, Purpose purpose)
     at System.Web.UI.HiddenFieldPageStatePersister.Load()
     --- End of inner exception stack trace ---
     at System.Web.UI.ViewStateException.ThrowError(Exception inner, String persistedState, String errorPageMessage, Boolean macValidationError)
     at System.Web.UI.HiddenFieldPageStatePersister.Load()
     at System.Web.UI.Page.LoadPageStateFromPersistenceMedium()
     at System.Web.UI.Page.LoadAllState()
     at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
     at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
     at System.Web.UI.Page.ProcessRequest()
     at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context)
     at System.Web.UI.Page.ProcessRequest(HttpContext context)
     at ASP.app_aspx.ProcessRequest(HttpContext context)
     at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
     at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&amp;amp; completedSynchronously)
  </code></pre>