iis部署出现异常:如下
Object reference not set to an instance of an object. 
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.Source Error: 
Line 49:               
Line 50:             <div id="logindisplay">
Line 51:                 <% Html.RenderPartial("LogOnUserControl"); %>Line 52:             </div> 
Line 53:             
 Source File: e:\LAWSON\project\ShopInfo\context.Master    Line: 51 
大侠们,请问该如何解决。在线等

解决方案 »

  1.   

    .RenderPartial方法里面有对象为null了
      

  2.   

    LogOnUserControl控件 是不是没放对位置啊,没找到报错啊
      

  3.   

    不支持MVC?看看IIS Default app pool 里用的是 .net 哪个版本的?
      

  4.   

    LogOnUserControl是在母版页中的,但是默认首页却找不到,不知道是什么原因
      

  5.   

    原文的意思是:未将对象引用到对象的实例.也就是没有实例化一个对象。
    当声明了变量,但是没有赋值,仍然为null.用的时候就会报错.还有一种情况是,出错原因:可能是你使用的语言包版本不对应(language/language.xml)或错误的修改了新闻文件。 
    解决方法:使用与新闻系统版本对应的语言包文件。修改新闻系统文件时不要删除已有的控件可能是IIS找不到LogOnUserControl的引用了