Hi everyone,
We developped a WebService with Visual Studio .Net and we faced an
authentication problem with a java client. My assumption is that this
is because cookies passed from client are misunderstood by the
framework.
Basically, these are the headers received from the client (I used a
packet sniffer to know exactly what we received from him before the
framework modifies it):
=============== ===========*=== =============== ============*=
POST /webservices/csaccessservice s.*asmx HTTP/1.0
Content-Type: text/xml; charset=utf-8
Accept: application/soap+xml,...(tr unc*ated for clarity)
User-Agent: Axis/1.2.1
Cache-control: no-cache
Pragma: no-cache
SOAPAction: "http://cedrom-sni.com/schema/WhoAmI"
Content-Length: 308
Authorization: Basic Y253ZG5hMTNFXzE 6Y253ZG5FMQ==
Cookie: ASP.NET_Session Id=xsigyd55n0nf *4q55kujvolzi
Cookie: IDENTITY=C2AC93 6CD45DE...(trun *cated for clarity)
=============== =============== *============== =============
and this is what I have when I look at the headers and server variables
when entering Application_Beg inRequest method:
=============== =============== *============== =============
POST /webservices/csaccessservice s.*asmx HTTP/1.0
Cache-Control: no-cache
Pragma: no-cache
Content-Length: 308
Content-Type: text/xml; charset=utf-8
Accept: application/soap+xml,...(tr unc*ated for clarity)
Authorization: Basic Y253ZG5hMTNFXzE 6Y253ZG5FMQ==
Cookie: ASP.NET_Session Id=xsigyd55n0nf *4q55kujvolzi, IDENTITY=C2A...
User-Agent: Axis/1.2.1
SOAPAction: "http://cedrom-sni.com/schema/WhoAmI"
=============== =============== *============== =============
As you can see, cookies have been merged on a single line. If it
worked, I wouldn't care about it, but it isn't. When I look at
Context.Request .Cookies object provided by the framework, I see that
there is only one cookie! It's name is ASP.NET_Session Id (the first
cookie) and it's value is the IDENTITY-value (C2A...)!!! So it seems
like the framework doesn't parse correctly the cookies, but I don't
know why??? It doesn't see the second cookie but it takes the second
cookie's value and associate this value with the first cookie. This is
kind of weird!!!
When I ask for the value of
Context.Request .ServerVariable *s["HTTP_COOKI E"], the entire line is
returned.
I was able to reproduce this strange behavior by calling our webservice
using System.Net.WebR equest with a POST method. The cookies were on a
single line and separated by "," and they cookies were parsed by the
framework exactly the same way they are when called from java.
I know that if I call this webservice from a .Net client with
WebReferences it works well, but there is a slight difference between
the calls: cookies are separated by ";" instead of ",".
Any hint or help would be appreciated.
Thanks
Karl 0 2393 This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: bagsmode |
last post by:
Hi,
I'm trying to set a session cookie and then redirect, however I get the
error:
Status: 302 Moved Location: /index.cgi
I thought I recall getting an error like this when I first tried
performing a redirect when I had left in
print "Content-type:text/html\n\n";
|
by: Derick Bailey |
last post by:
I have a development website running on Win2K Server, using ASP 3.0. I'm
using IE6 (all updates added).
I have a cookie that is set on a login page, which is an Encrypted password:
Response.Cookies("PWORD")=EncryptedPassword
I then redirect to a page:
Response.Redirect(GotoPage)
|
by: Karl |
last post by:
Hi everyone,
We developped a WebService with Visual Studio .Net and we faced an
authentication problem with a java client. My assumption is that this
is because cookies passed from client are misunderstood by the
framework.
Basically, these are the headers received from the client (I used a
packet sniffer to know exactly what we received from him before the
framework modifies it):
|
by: |
last post by:
Hi,
I'm trying to use the cookie munging session handling behaviour of asp.net
instead of cookies themselves as I'm finding quite a few people are barring
cookies (especially AOL users). If I change the setting in web.config
everything seems to work fine as long as I'm using relative paths. The
problem is I've got a menuing system that's generated from a site-wide
template - so I use a fixed path from the application root - (ie:...
|
by: Ken Varn |
last post by:
I have a page that uses two cookies.
On postback, both cookies are updated and added back into the
Page.Response.Cookies collection. For some reason, only the first cookie is
actually updated on the client. The second cookie contains its original
value on postback, not the new value.
Can someone tell me why I can't update the second cookie?
Here is a code sample.
| |
by: Charlie |
last post by:
Hi:
Our portal writes a cookie to browser on login. The cookie is then
requested by applications launched by portal as a way of passing
credentials. The problem is when logging off portal, then logging back in
as another person, cookie retrieved by application belongs to first user who
is now logged out. Portal is correctly adding and removing cookies on login
and logout so it appears the old cookie is being kept in memory somewhere...
|
by: Jimmy |
last post by:
Problem:
My cookie name is supposed to be "MyCookie123whatever..." but when I
take a look at my cookies, it's called "SITESERVER" and it's not
keeping any of the properties (expiration, etc..) that I've set in the
codebehind.
Code:
HttpCookie myCookie = Request.Cookies;
//check to see if it exists
|
by: 4site |
last post by:
Hi all, this is probably stupidly easy but I'm struggling.
I am trying to understand why cookies only appear to be readable when a
web page is retrieved by *typing the url into the browser's address
box* but NOT when the same page is accessed *via a link from another
page*. I probably don't fully understand the mechanics of an HTTP
request...
Example:
|
by: eyal.herlin |
last post by:
hi,
i set a cookie to hold a utf-8 string. either by the server or by the
client. it doesn't matter.
when i try to read this cookie using Request.Cookies("my_utf8_cookie")
on iis 5.0 i get garbage.
this garbage seems to be the result of treating the utf-8 data as some
single-byte encoding.
i have <%@ codepage="65001"%set on the top of the page.
this problem does not appear on iis 5.1.
|
by: Mike C# |
last post by:
Is there a decent cookie parser out there somewhere? I keep running into
cookies that .NET can't handle. I've also found a couple of other parsers
but they're choking as well.
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |