Start a conversation

BC30002 type 'web.httpcontext' is not defined

You installed DNN chat module and received the following error

Compiler Error Message: BC30002: Type 'Web.HttpContext' is not defined.

In App_Code\Chat\DnnChatCodeHelper.vb
Line 308: Try
Line 309: Dim ctx As Web.HttpContext = Web.HttpContext.Current
Line 310: Dim lvstrImageRoot As String = String.Empty
Line 311: oCache = ctx.Cache.Get(key)


This issue is caused by adding Telerik controls in DNN 5.3.1 which adds DotNetNuke.Web.HttpContext. If modules don't use qualified paths and did import both system and DotNetNuke, the reference is now solved incorrectly.


Solution
open the file DnnChatCodeHelper.vb, located under the folder of App_code\Chat

DirectoryName:\\DNNDirectory\App_Code\Chat

Search Dim ctx As Web.HttpContext = Web.HttpContext.Current


and change to

Dim ctx As System.Web.HttpContext = System.Web.HttpContext.Current

Choose files or drag and drop files
Was this article helpful?
Yes
No
  1. Senior Engineer Jessie

  2. Posted
  3. Updated

Comments