473,403 Members | 2,270 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,403 software developers and data experts.

Ticket persistence

In a custom application the web methods receive a user ticket in Soap
Headers. This web methods call many bussiness methods to access database,
validate user rights and so on. Today I must pass the ticket from web
methods to all this bussiness methods as a parameter. How include this
ticket in a 'global' variable to be accessible during the web method life
instead of passing this by each method? A static variable is not possible
because the ticket should be available for the context of the current
execution and not for all clientes connected to server.

Thanks,

Max
Dec 5 '06 #1
2 1092
"Max André Bündchen" <no****@microsoft.comwrote in message
news:eZ****************@TK2MSFTNGP06.phx.gbl...
In a custom application the web methods receive a user ticket in Soap
Headers. This web methods call many bussiness methods to access database,
validate user rights and so on. Today I must pass the ticket from web
methods to all this bussiness methods as a parameter. How include this
ticket in a 'global' variable to be accessible during the web method life
instead of passing this by each method? A static variable is not possible
because the ticket should be available for the context of the current
execution and not for all clientes connected to server.
If your business methods are instance methods, then the ticket could be
passed to the constructor of the class of which the business methods are
members:

public class BusinessClass
{
private readonly string _ticket;
public BusinessClass(string ticket){_ticket = ticket;}
public BusinessMethod(params){
DAL.Method(_ticket, params);
}
}

John
Dec 6 '06 #2
1) You can use session state if that is an option
2) You can use constructor injection or setter injection (property)

Gabriel Lozano-Morán

"Max André Bündchen" <no****@microsoft.comwrote in message
news:eZ****************@TK2MSFTNGP06.phx.gbl...
In a custom application the web methods receive a user ticket in Soap
Headers. This web methods call many bussiness methods to access database,
validate user rights and so on. Today I must pass the ticket from web
methods to all this bussiness methods as a parameter. How include this
ticket in a 'global' variable to be accessible during the web method life
instead of passing this by each method? A static variable is not possible
because the ticket should be available for the context of the current
execution and not for all clientes connected to server.

Thanks,

Max

Dec 6 '06 #3

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

Similar topics

6
by: Paolo Losi | last post by:
Hi all, I'm pretty new to the python language so please excuse me if this is FAQ... I'm very glad to be part of the list! :-) I'm looking into a way to implement a generic workflow framework...
1
by: e | last post by:
I'm using forms authentication on a site. When the user logs in via the login page, the entered creds are checked against AD, and if valid, an encrypted forms authentication ticket is produced and...
7
by: Ali | last post by:
Our security people have been able to copy and use the FormsAuthentication cookie. Our Authetication cookie is based on an encrypted ticket and we use FormsAuthentication.SignOut() when users...
10
by: Simon Harvey | last post by:
Hi everyone, Can anyone tell me if I declare a global variable in my pages code behind, is it persisted if the page does a post back, or do I need to add the object to the session object in...
2
by: StanD | last post by:
At the end of my login process I am generating my own Persistent FormsAuthentication ticket. I encode this and set a cookie value. I then use Response.Cookies.Add(cookie), and I continue the...
0
by: Sean Patterson | last post by:
Hey all, I've followed the examples online on how to use Forms Authentication to create a ticket, assign it a role, and then intercept it in the Global.asax file to make sure it gets sucked in...
2
by: dkode | last post by:
Hello, I am laying out the architecture for a very large website that will scale to a very large degree. I have a couple of questions before I attempt to go and implement a Broker/Persistence...
6
by: kossanah | last post by:
I like to seek to your assistance in any measure.I need your help on how to go about This: I am developing a promotional site where user will be issued a ticket(manually) which will be a...
0
myusernotyours
by: myusernotyours | last post by:
Hi all, Am trying to create a Java Desktop App that uses Java Persistence in Netbeans. The database is MS Access but I tried with Mysql and got the same error. When I run the app( Create the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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...
0
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.