Skip to content

Commit 4a28770

Browse files
authored
Update README.md
Updated Alternative Implementation
1 parent 778cbfc commit 4a28770

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ private void DoValidationByLocalEventConfig()
131131
132132
var queueitToken = Request.QueryString[KnownUser.QueueITTokenKey];
133133
var pureUrl = Regex.Replace(Request.Url.ToString(), @"([\?&])(" + KnownUser.QueueITTokenKey + "=[^&]*)", string.Empty, RegexOptions.IgnoreCase);
134-
var eventConfig = new EventConfig()
134+
var eventConfig = new QueueEventConfig()
135135
{
136136
EventId = "event1", //ID of the queue to use
137137
CookieDomain = ".mydomain.com", //Optional - Domain name where the Queue-it session cookie should be saved. Default is to save on the domain of the request
@@ -143,7 +143,7 @@ private void DoValidationByLocalEventConfig()
143143
};
144144
145145
//Verify if the user has been through the queue
146-
var validationResult = KnownUser.ValidateRequestByLocalEventConfig(pureUrl, queueitToken, eventConfig, customerId, secretKey);
146+
var validationResult = KnownUser.ResolveQueueRequestByLocalConfig(pureUrl, queueitToken, eventConfig, customerId, secretKey);
147147
148148
if (validationResult.DoRedirect)
149149
{
@@ -157,6 +157,10 @@ private void DoValidationByLocalEventConfig()
157157
Response.Redirect(pureUrl);
158158
}
159159
}
160+
catch (System.Threading.ThreadAbortException)
161+
{
162+
//Response.Redirect will raise System.Threading.ThreadAbortException to end the exceution, no need to log the error
163+
}
160164
catch (Exception ex)
161165
{
162166
//There was an error validationg the request

0 commit comments

Comments
 (0)