Solved

Webservice use a cookie created by client application.

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
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…

867 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now