Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeGetting StartedGetting StartedInstalling DNN ...Installing DNN ...How does Global.asax.vb knows about the Config classHow does Global.asax.vb knows about the Config class
Previous
 
Next
New Post
6/23/2010 5:26 AM
 

Hi -

in Global.asax.vb, there's this function Application_Start:

Private Sub Application_Start(ByVal sender As Object, ByVal e As EventArgs)

         If Config.GetSetting("ServerName") = "" Then

                    ServerName = Server.MachineName

         Else

                    ServerName = Config.GetSetting("ServerName")

          End If

End Sub

Global.asax has the following namespaces imported:

Imports DotNetNuke.Security.Roles

Imports DotNetNuke.Services.Log.EventLog

Imports DotNetNuke.Services.Upgrade

And Global.asax.vb itself is under DotNetNuke.Common namespace. I wonder how it can call Config class directly in the code, because Config class is under DotNetNuke.Common.Utilities name space. Is there any settings in the web.config or on install environment to enable that?

I'm asking this question is because I'm getting the "BC30451: Name 'Config' is not declared" error, but I double checked that my web.config is in place and all the dlls are under bin folder.

Thank you very much for any suggestions!

yy

 
New Post
6/27/2010 9:20 AM
 
Forget about what you're asking and let's answer the real problem.  Tell us the version of DNN, version of IIS, version of the framework and whether this is a new installation or if it worked prior to something else happening.

Jeff
 
New Post
6/28/2010 11:52 AM
 
Jeff - Thanks for your response.

DNN is working fine in our Test and Production, but just stopped working on my local machine. All the dlls and the web.config are at the right places. We have IIS 6 and this version of DNN:
DotNetNuke Web Application Framework 04.09.00

.NET Framework:

The .NET Framework version which the application is running on - specified through IIS

2.0.50727.3603



I got the error below. If I put the full path before Config then the error moves to some other parts saying "IDataReader" is not declared. In all, the error indicate the Dlls were not loaded properly.

Any idea on how to solve this issue is apprecaited. thanks.


Compilation Error

Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

Compiler Error Message: BC30451: Name 'Config' is not declared.

Source Error:

Line 66: Private Sub Application_Start(ByVal sender As Object, ByVal e As EventArgs) Line 67: Line 68: If Config.GetSetting("ServerName") = "" Then Line 69: ServerName = Server.MachineName Line 70: Else

Source File: ...\Website\App_Code\Global.asax.vb    Line: 68
 
New Post
6/29/2010 7:03 PM
 
Since it's your local machine and not a live server i'd suggest blowing away your install and starting from scratch. Get the default DNN install up and running (make sure you use the same version as the live site) Then migrate the live site to your machine by copying the db and migrating the files in the DNN folder. You will need to make sure your connections strings in web.config are correct after moving the files over, but it's not too hard. I do this when I want to get a fresh copy of our production server over to test or onto my local machine.
 
Previous
 
Next
HomeHomeGetting StartedGetting StartedInstalling DNN ...Installing DNN ...How does Global.asax.vb knows about the Config classHow does Global.asax.vb knows about the Config class


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out