Problem after deploying ASP.NET AJAX RC1 app ?

You've deployed your app in prod server, you run it on the browser and you get an exception:

Object reference not set to an instance of an object.


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.Script.Services.WebServiceData.GetWebServiceData(Http
Context context, String virtualPath, Boolean failIfNoData,
Boolean pageMethods) +378 System.Web.Script.Services.PageClientProxyGenerator.GetClientProxy
Script(HttpContext context, IPage page, Boolean debug) +45 System.Web.UI.ScriptManager.RegisterServices() +728 System.Web.
UI.ScriptManager.OnPagePreRenderComplete(Object sender,
EventArgs e) +244 System.Web.UI.Page.OnPreRenderComplete(EventArgs e) +2012740 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBef
oreAsyncPoint, Boolean includeStagesAfterAsyncPoint)+1566

It happens when your site use ASP.NET AJAX RC in a VS 2005 Web Site Project and you deploy with "publish web site" or "web deployment project" utility with checkbox "allow the site to be updatable" unchecked.

It's a bug from ASP.NET AJAX RC1 and will be fixed in next version.

Until this you can make everything work fine if you precompile with checkbox "allow this site to be updatable" checked.

No Comments