Solved

Webservice use a cookie created by client application.

Posted on 2014-04-10
1
449 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

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

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

This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
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…

809 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