473,472 Members | 1,831 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Global .asax - AppConstant error

Hi,

I've been given an application that I have to deploy. But I'm getting
a compiler error that "The name 'UerRecruiting' does not exist in the
current context", when I try to access any page. My Global.asax
contains the following entry ..

<script runat="server">

void Application_Start(Object sender, EventArgs e) {
myRecruiting.AppConstants.CONN_STRING_RECRUITING =
ConfigurationManager.ConnectionStrings["connRecruiting"].ToString();

myGRIP.AppConstants.RESEARCH_CONNECTION_STRING =
ConfigurationManager.ConnectionStrings["connResearch"].ToString();
}
..
..
..
..
</script>

myGRIP is a namespace that, I think is part of a reference I have
included. It is not showing any errors. But myRecruiting the name of
this application itself. It is not used as a namespace anywhere. What
should I do to get rid of the error ?

Thanks !

May 21 '07 #1
2 1749
If you are attempting to get the actual connection string, it would be:

ConfigurationManager.ConnectionStrings["connResearch"].ConnectionString;
Don't know about the constants part, that looks problematic (dynamically
setting a const = nope.
This is really an ASP.NET question and belongs in that group.
Peter
--
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net


"Zeba" wrote:
Hi,

I've been given an application that I have to deploy. But I'm getting
a compiler error that "The name 'UerRecruiting' does not exist in the
current context", when I try to access any page. My Global.asax
contains the following entry ..

<script runat="server">

void Application_Start(Object sender, EventArgs e) {
myRecruiting.AppConstants.CONN_STRING_RECRUITING =
ConfigurationManager.ConnectionStrings["connRecruiting"].ToString();

myGRIP.AppConstants.RESEARCH_CONNECTION_STRING =
ConfigurationManager.ConnectionStrings["connResearch"].ToString();
}
..
..
..
..
</script>

myGRIP is a namespace that, I think is part of a reference I have
included. It is not showing any errors. But myRecruiting the name of
this application itself. It is not used as a namespace anywhere. What
should I do to get rid of the error ?

Thanks !

May 21 '07 #2
Oh, okay .. Thanks for your help anyways,
This is really an ASP.NET question and belongs in that group.
Peter
May 22 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: tshad | last post by:
I am trying to set up some shared functions in my Global.asax file and can't seem to get it to work. In my Global.asax: Public Class myUtils inherits System.Web.HttpApplication public...
2
by: Michael Tissington | last post by:
How do I specify the CodeFile for my Global.asax file ? According to the documentation I can use the CodeFile attribute with Application, however when I try to use this I get an error saying that...
0
by: hynek.cihlar | last post by:
A strange behaviour thatI found in ASP.NET 2.0. I am trying to issue a callback request (handled by ICallbackEventHandler and RaiseCallbackEvent) and a regular GET request in the client browser...
1
by: Anonieko | last post by:
Global.asax? Use HttpModules Instead! In a previous post, I talked about HttpHandlers - an underused but incredibly useful feature of ASP.NET. Today I want to talk about HttpModules, which are...
19
by: furiousmojo | last post by:
This is a strange problem. I have a project where the contents of global.asax application_error are not firing. It is an asp.net 2.0 application using web application projects. I have another...
4
by: Hardy Wang | last post by:
Hi all, In order to solve code-behind of global.asax problem, I removed the code from global.asax, and just leave one line "<%@ Application Language="C#" Inherits="Global"%>" in this file. Then I...
4
by: Al Santino | last post by:
Hello, I've created a simple C# web services project using Visual Studio 2005. My service compiles and runs correctly when called by remote clients. I'm able to step through the service in the...
16
by: thefritz_j | last post by:
We just converted our VS2003 1.1 VB web project (which was working fine) to VS2005 2.0 and now I get: Parser Error Message: Could not load type '<Namespace>.'. Source Error: Line 1: <%@...
8
by: Rob T | last post by:
When I was using VS2003, I was able to compile my asp.net project locally on my machine and copy it to the production server and it would run just fine. I've now converted to VS2005. The project...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.