473,757 Members | 2,320 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Authorization HTML Header going missing

I am not sure if this is a .NET bug/feature and IIS5 one or a combination of
the 2 so here goes

I have a situation where when I call an ASP.NET webservice running under
windows 2000 (I assume IIS5) with a webservice client also in .NET that the
webservice request loses the Authorization HTML header.

This DOES NOT happen under Windows 2003.

I am using the followng (patch/fix) to preauthenticate the web request (this
is from a KB article, or newsgroup article I think)

Protected Overrides Function GetWebRequest(B yVal uri As System.Uri) As
System.Net.WebR equest
Dim webReq As System.Net.WebR equest = MyBase.GetWebRe quest(uri)
If Me.PreAuthentic ate Then
Dim cred As System.Net.Netw orkCredential =
Me.Credentials. GetCredential(u ri, "Basic")
If Not cred Is Nothing Then
Dim buff As Byte() = New
System.Text.UTF 8Encoding().Get Bytes(cred.User Name & ":" & cred.Password)
webReq.Headers( "Authorization" ) = "Basic " &
Convert.ToBase6 4String(buff)
End If
End If
Return webReq
End Function
Also webservice and client are running under the same process/application -
long story but it is to fake the fact that the server we are supposed to
talk to isn't available yet.

i.e. under my webservice I have 2 folders - in one folder I have the .asmx
files that our web application talks to and under the other folder I have a
..asmx that responds the way the 3rd party service is supposed to
with requests to the first folder causing a request to the second.

I hope someone can tell me what is going on.

Regards

Shaun
Nov 18 '05
15 3015
Hi Shaun,

Thanks for your followup. En, yes, I did tried both BAsic Authentication
turn ON and OFF when testing on my local w2k box. That's why I think the
problem is due to a enviroment specific issue.
Also, if you can leave your service as anonymous turn on in IIS, I think
you can try use a custom httpheader to carry the username/password info ,
does this work? Anyway, please feel free to post here if you got any
further findings.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Nov 18 '05 #11
Hi Steven

I have 4 different boxes it happens to. 2 developer boxes, 1 deployment box
and my own home machine. And it doesn't work on either and yet you say it
works on your machines then there is a bug somewhere (maybe a patch). Also
other posters in the past have noted the same issue (Google groups).
If it is patch related there is no way to determine and or fix it so I can't
rely on it working elsewhere. I think I am going to have to insist that
they use IIS basic Authentication in win2k machine.

Unfortunately I can't use a custom HTTP header as other (3rd party) clients
(java based) need to connect and the standard I am following requires that
we
use the Authorization header and preauthenticati on.

Shaun
"Steven Cheng[MSFT]" <v-******@online.m icrosoft.com> wrote in message
news:RK******** ******@cpmsftng xa10.phx.gbl...
Hi Shaun,

Thanks for your followup. En, yes, I did tried both BAsic Authentication
turn ON and OFF when testing on my local w2k box. That's why I think the
problem is due to a enviroment specific issue.
Also, if you can leave your service as anonymous turn on in IIS, I think
you can try use a custom httpheader to carry the username/password info ,
does this work? Anyway, please feel free to post here if you got any
further findings.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Nov 18 '05 #12
Thanks for your reply Shaun,

Currently I haven't any definite ideas on this. But I'll hold on and wait
for the testing result (by the isapi I attached in the former message) from
you. That'll help us dig some further. Thanks.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Nov 18 '05 #13
Hi Shuan,

Any further progress on this issue? If there're any updating or new
findings , please feel free to post here.
Thanks.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Nov 19 '05 #14
Hi

Nothing new as yet - got too much other things on that I haven't had time to
spend on this.

Its odd that on all windows sever 2000 machines I have test on with the
application runing on exhibits the problem and not platforms. As I said
since there does not seem a way to predict it then I'll have to assume worst
case scenario and treat all windows server 2000 machines as having the same
problem.

Shaun

"Steven Cheng[MSFT]" <v-******@online.m icrosoft.com> wrote in message
news:8Z******** ******@cpmsftng xa10.phx.gbl...
Hi Shuan,

Any further progress on this issue? If there're any updating or new
findings , please feel free to post here.
Thanks.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Nov 19 '05 #15
Ok Shaun, if you have time to do some further investigate and got any
findings on this, please feel free to post here. Thanks.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Nov 19 '05 #16

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
1357
by: Fabrice | last post by:
hi ! here is my problem ! I add a field to an html header using php function header("field_name: value"). When the php page is on my local machine (which act as a server) i can read the "value" of field_name (i also on my local machine). But when i put the file on another server and i'm still on my local machine i cannot read this field_name (but i can see the page on my browser). Can any one tell me what is the problem ?
8
2358
by: Terry | last post by:
Hi, I built a website using the HMTL header: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> All the CSS layout stuff looks good.
4
1442
by: crs2003c | last post by:
For some time now, other teachers have had this problem. Visual C++ 6.0 was once installed on a WIN98 platform and apstring.h and graphic.h worked. However, since moving to WIN2000 and WINXP, these header files are missing. Where can I find these header files?? I have tried to create these headers over again, even CUT/PASTE, however, I most not be doing something right. Help here would be very appreciated.
1
1161
by: gerrod | last post by:
When using a master page In .NET v2.0 Beta 1, you could attach additional stylesheets to the master page from your content pages, with a call such as: Header.LinkedStyleSheets.Add("_Styles/Stylesheet.css"); In Beta 2, it seems as though IPageHeader no longer exposes this property. Does anyone know what the new approach / work-around is? Thank in advance.
2
2078
by: Simon Verona | last post by:
I don't know if this is the correct group to ask the question, but I'll ask it here anyways! I have a solution, written in vb.net 2003 (using Visual Studio 2003 Professional) which has multiple projects. What I find is that from time to time (once every couple of days) that when I go to run the solution (which compiles all the projects) that the compile fails because a control is missing. The control in question is always a...
3
2725
by: dotcom | last post by:
hello, i am sending whole javascript code(it is for freezing html header) it works fine eith IE but not firefox scroll bar does not come var divContent = null; var divHeaderRow = null; var divHeaderColumn = null; var divHeaderRowColumn = null; var headerRowFirstColumn = null; var x;
5
14123
by: dabei | last post by:
Hi, I am trying to use AS3 to make a URL request with authorization header. Using the code below: var request:URLRequest = new URLRequest ( 'http://myserviceURL' ); var requestHeader:URLRequestHeader = new URLRequestHeader("Authorization", "AuthSub token=CI3xlrq1DxCjtruCAw"); request.requestHeaders.push(requestHeader); ... But I get the following error: ArgumentError: Error #2096: The HTTP request header Authorization cannot be set via...
1
1296
by: abhilash12 | last post by:
how can resizing html header table
3
1112
by: funkymonk | last post by:
I have no idea if this or how this can be done. Basically Ive been given a website made in dreamweaver using asp and html. I use asp.net and so everything I make uses masterpages rather than header and footers and the website already has a .....header and footer. Is there a way of converting the header and footer into a masterpage. I am a noob btw. Thanks for any assistance
0
9487
marktang
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...
0
9297
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9904
jinu1996
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...
0
9735
tracyyun
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...
0
8736
agi2029
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...
1
7285
isladogs
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...
0
6556
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5168
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
3
2697
bsmnconsultancy
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...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.