(100分急急急问)急问:一个很郁闷的问题..."Object reference not set to an instance of an object"
用asp.net 的C#写程序.
所用的开发环境是:VS2005 Version 8.0.50727.42 (RTM.050727-4200)
用里面的Visual Web Developer采用本地(localhost)测试网站,可是
连它自动生成的完全没有代码的页面运行时都报出如下错误:
Server Error in '/' Application.
--------------------------------------------------------------------------------
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:
An unhandled exception was generated during the execution of the current web request. 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.]
System.Web.Hosting.ISAPIWorkerRequestInProc.GetServerVariable(String name) +1618
System.Web.Security.WindowsAuthenticationModule.OnEnter(Object source, EventArgs eventArgs) +593
System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +92
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +64
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.42
---------------------------
然而,如果用本地文件系统来测试(测试的时候由VS自动启动一个服务器测试)的时候完全没有问题.
因此我初步断定可能是
1)我的IIS 5.0的服务器没有配置好.
2)还有就是可能代码没有编译好.
我的系统是:windows XP Pro XP2
IIS5.0
.net 2.0 Framework
但是在网上找了很多这方面的资料,都没有解决.好郁闷啊..
请各位大侠帮小弟这个忙啊(以前用VS2003时不会有这样的问题)