堆栈跟踪:
[NullReferenceException: Object reference not set to an instance of an object.
**StartupMilestones.Site.Page_Load(Object sender, EventArgs e) in
C:\inetpub\wwwroot\StartupMilestones\StartupMilestones\Site.Master.vb:8**
System.Web.UI.Control.OnLoad(EventArgs e) +91
System.Web.UI.Control.LoadRecursive() +74
System.Web.UI.Control.LoadRecursive() +146
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, _
Boolean includeStagesAfterAsyncPoint) +2207我似乎不明白为什么我会在这上面得到一个NullReferenceException。这是到目前为止我为Site.Master.vb编写的唯一代码:
Public Class Site
Inherits System.Web.UI.MasterPage
Public Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles
Me.Load
Dim lbluserid As New Label
lbluserid.Text = "YO!"
End Sub
End Class奇怪的是,堆栈跟踪在这个位置引用第8行:**C:\inetpub\wwwroot\StartupMilestones\StartupMilestones\Site.Master.vb:8**,而VS中的文件在属性窗口中显示C:\Working Projects\StartUpMilestones\DEV\Site.Master.vb。哪里不对劲?谢谢!
发布于 2013-10-31 23:53:34
您需要更新IIS中的虚拟目录正在使用的物理位置,如下所示:
对于IIS7:
G215
有关更多信息,请阅读Change the Physical Path of Virtual Directory Content (IIS 7)。
https://stackoverflow.com/questions/19710682
复制相似问题