NullReferenceException

Topics: ASP.NET 2.0
May 9, 2008 at 1:56 PM
Hi guys!

I´m installing the blog on a XP SP2 Machine but when i'll run the blog i get this message:

NullReferenceException: Referência de objeto não definida para uma instância de um objeto.
System.Web.Hosting.ISAPIWorkerRequestInProc.GetServerVariable(String name) +1802
System.Web.Hosting.ISAPIWorkerRequest.ReadRequestHeaders() +121
System.Web.Hosting.ISAPIWorkerRequest.GetKnownRequestHeader(Int32 index) +84
System.Web.Configuration.HttpCapabilitiesEvaluator.GetUserAgent(HttpRequest request) +68
System.Web.Configuration.HttpCapabilitiesEvaluator.Evaluate(HttpRequest request) +50
System.Web.Configuration.HttpCapabilitiesBase.GetBrowserCapabilities(HttpRequest request) +162
System.Web.HttpRequest.get_Browser() +134
BlogEngine.Core.Utils.get_IsMobile() in C:\Documents and Settings\Mads Kristensen\Skrivebord\BlogEngine.Core\Utils.cs:152
BlogEngine.Core.BlogSettings.get_Theme() in C:\Documents and Settings\Mads Kristensen\Skrivebord\BlogEngine.Core\BlogSettings.cs:588
BlogEngine.Core.Web.Controls.BlogBasePage..ctor() in C:\Documents and Settings\Mads Kristensen\Skrivebord\BlogEngine.Core\Web\Controls\BlogBasePage.cs:29
_default..ctor() +24
ASP.defaultaspx..ctor() in c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\blogs\bb81b24d\9f9c01a0\AppWeb_j7rnr5qa.14.cs:0
_ASP.FastObjectFactoryappwebj7rnr5qa.CreateASPdefaultaspx() in c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\blogs\bb81b24d\9f9c01a0\AppWeb_j7rnr5qa.16.cs:0
System.Web.Compilation.BuildResultCompiledType.CreateInstance() +49
System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath virtualPath, Type requiredBaseType, HttpContext context, Boolean allowCrossApp, Boolean noAssert) +115
System.Web.UI.PageHandlerFactory.GetHandlerHelper(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath) +31
System.Web.UI.PageHandlerFactory.System.Web.IHttpHandlerFactory2.GetHandler(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath) +40
System.Web.HttpApplication.MapHttpHandler(HttpContext context, String requestType, VirtualPath path, String pathTranslated, Boolean useAppConfig) +139
System.Web.MapHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +128
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +161

Machine Configuration
SO: XP SP2
Language: Portuguese

Any sugestion to solv this?
May 12, 2008 at 5:42 PM
Guys! Please help me!
May 12, 2008 at 9:13 PM
Edited May 12, 2008 at 9:14 PM
Since you're running on XP, your local IIS probably loads BE.NET in a subfolder.
You'd need to update the VirtualPath value in your web.config to reflect this location.

For example:

<add key="BlogEngine.VirtualPath" value="~/YourAppFolder" />

Also set your folder as application in your IIS admin management console

Cheers Mike