Solved

Webservice use a cookie created by client application.

Posted on 2014-04-10
1
445 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
Comment Utility
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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
JavaScript can be used in a browser to change parts of a webpage dynamically. It begins with the following pattern: If condition W is true, do thing X to target Y after event Z. Below are some tips and tricks to help you get started with JavaScript …
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…

762 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

9 Experts available now in Live!

Get 1:1 Help Now