简体   繁体   English

在IIS 8上部署后,Asp.net应用程序给出错误

[英]Asp.net application giving error after deploying on IIS 8

I have created an Asp.Net application in VS 2012 and deployed it on IIS 8 server. 我在VS 2012中创建了一个Asp.Net应用程序,并将其部署在IIS 8服务器上。 But when I try to run the application it is throwing an error stating Object reference not set to an instance of an object. 但是,当我尝试运行该应用程序时,它抛出了一个错误,指出未将Object引用设置为对象的实例。

I have been searching for the solution for last 2 days but the problem hasn't got solved. 我过去两天一直在寻找解决方案,但问题尚未解决。 Please help. 请帮忙。 Thanks. 谢谢。

The detailed error message is as follows: 详细的错误消息如下:

Server Error in '/OperatorSlip_deploy' Application. “ / OperatorSlip_deploy”应用程序中的服务器错误。

Object reference not set to an instance of an object. 你调用的对象是空的。

Description: An unhandled exception occurred during the execution of the current web request. 说明:执行当前Web请求期间发生未处理的异常。 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. 异常详细信息:System.NullReferenceException:对象引用未设置为对象的实例。

Source Error: 源错误:

An unhandled exception was generated during the execution of the current web request. 当前Web请求的执行期间生成了未处理的异常。 Information regarding the origin and location of the exception can be identified using the exception stack trace below. 可以使用下面的异常堆栈跟踪来标识有关异常的来源和位置的信息。

Stack Trace: 堆栈跟踪:

[NullReferenceException: Object reference not set to an instance of an object.] OperatorSlip.Default.Page_Load(Object sender, EventArgs e) +84 System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +51 System.Web.UI.Control.OnLoad(EventArgs e) +92 System.Web.UI.Control.LoadRecursive() +54 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +772 [NullReferenceException:对象引用未设置为对象的实例。] OperatorSlip.Default.Page_Load(Object sender,EventArgs e)+84 System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender,EventArgs e)+51 System.Web .UI.Control.OnLoad(EventArgs e)+92 System.Web.UI.Control.LoadRecursive()+54 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint,Boolean includeStagesAfterAsyncPoint)+772

Version Information: Microsoft .NET Framework Version:4.0.30319; 版本信息:Microsoft .NET Framework版本:4.0.30319; ASP.NET Version:4.0.30319.18449 ASP.NET版本:4.0.30319.18449

Try this: 尝试这个:

You should add your website as an application under the default website or you set in the IIS to start from your website. 您应该将网站添加为默认网站下的应用程序,或者在IIS中设置为从网站开始。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM