1

I am using VS2010 WebTest to inovoke a list of WCF operations in sequence.

First call is to obtain a session token from the server. This token has to be passed as request element to all subsequent calls. I have extracted this token and stored this into Context as MyToken.

enter image description here

I need your help to find out how to bind MyToken into subsequent xml requests.

Is there any directive like <%# %> for this purpose.

Thank you for your help.

Abhijeet
  • 13,562
  • 26
  • 94
  • 175

1 Answers1

2

After a bit of more search, I have found out that we can use double curly braces to bind Context Parameters in string body of the request Xmls. As below -

{{MyToken}}

Visual Studio replaces these token in the XML Requests with values at runtime, dynamically.

Abhijeet
  • 13,562
  • 26
  • 94
  • 175
  • I do have same business rule. The only difference is: I am writting the Token value in the cookie using System.Web.HttpContext.Current.Response.AppendCookie(new HttpCookie("SignInKey", SessionCollection.AppUser.SignInKey)); Anyway to add an Extraction Rule that can read from Cookie instead? – Sumeet Feb 22 '13 at 05:52