public module not accessible

R

Ryan McLean

Hello everyone! I will describe what I am trying to accomplish, then
the problem I am having.

I am storing database passwords in the appSettings node of the
web.config file. In the Session_Start of the global.asax file I am
calling a public sub routine inside of a public module. The sub sets
a public variable (defined at the module level) to a connection
string, dependant upon the environment (dev, qa, or prd).

What I am seeing is the "global" is only accessible every other
request or so. Except it's not that consistent.

Our server administrators have us exclude the sessionState node from
the web.config. I imagine that the machine.config designated
sessionState is used in its absence.

Any ideas would be greatly appreciated.

Thanks, have a great weekend!
Ryan
 
K

Ken Cox [Microsoft MVP]

Hi Ryan,

Are there custom connection strings for each user? If not, you'd be better
to store it in an Application variable when the Application starts. That
would make it available to all users and not depend on the Session.

Ken
MVP [ASP.NET]
 
R

Ryan McLean

Thanks Ken! I think shared functions/subs and application variables
are the way to go. I appreciate the help!

Ryan
 

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

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top