Solved

Webservice use a cookie created by client application.

Posted on 2014-04-10
1
450 Views
Last Modified: 2014-04-15
I have a web application that creates a cookie which contains a sessionid.

This web application is written in ASP.net, javascript and c#.

This application calls web service, again written in asp.net, c# and javascript.  

How can I get the web service to see the cookie created by my application?

I have tried

AthenaCamera.AthenaCameraWebService ws = new AthenaCamera.AthenaCameraWebService(); 
System.Net.CookieContainer cookieJar = new System.Net.CookieContainer();
 ws.CookieContainer = cookieJar;

Open in new window


It didn't work.

I don't know about these things yet, so any help would be great.  Thanks.

Kevin.
0
Comment
Question by:kev43barrie
1 Comment
 
LVL 8

Accepted Solution

by:
deepu chandran earned 500 total points
ID: 39991492
HI,

In your First Applications Write the cookie in
Response.Cookies.Add(Cookie Object);

While calling the WebService you have to get the value of the Cookie and Pass it over to the service. To get the cookie value

(Cast to Cookie object) Request.Cookies[“CookieName”];

Thanks
Deepu
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses the difference between strict equality operator and equality operator in JavaScript. The Need: Because JavaScript performs an implicit type conversion when performing comparisons, we have to take this into account when wri…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question