Problem with Application Variables

C

coynej60

I think this is probably a relatively simple problem, but I can't
figure it out. I have an app that uses an Application variable to
store my DB connection string. The object is created as so:

Sub Application_Start(ByVal sender As Object, ByVal e As EventArgs)
Application("datacon") = "My Connection String"
End Sub

When I run the page that uses this App Object on my local IIS 5.1
server everything works fine. However when I try to run it on our
production IIS 6.0 server the Application variable has no value. I
have no idea why this is happening. Can anyone help?
 
C

coynej60

What is the benefit of placing in Web.Config vs. Global.asax? I have
heard that it is more effiecient to place in Global.asax. I figured
out what my problem was, and it works now, just curious what the
benefits are to using Web.Config vs. Global.asax.

thank you for your reply

Jake
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,269
Messages
2,571,097
Members
48,773
Latest member
Kaybee

Latest Threads

Top