Solved

Webservice use a cookie created by client application.

Posted on 2014-04-10
1
452 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Having worked on larger scale sites, we found out that you are bound to look at more scalable solutions to integrating widgets, code snippets or complete applications and mesh them into functional sites, in any given composition. To share some of…
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 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…

724 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