473,900 Members | 4,979 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Web Service "HTTP Status 401" -> "HTTP Status 404" issue

7 New Member
I've been banging my head against the wall with this one for a couple days so I'm hoping someone has some ideas. I have a web service that I created that is called by a .NET class library (which in turn is called by another application). This all works fine in my development environment.

Test environment: Windows Server 2003, ASP 6.0, .NET 2.0, Anonymous authentication is enabled. All components (web service, DLL, and calling application) are all on the same server.

I first got the error "The request failed with HTTP status 401: Unauthorized." After some research I added...

< authentication mode="Windows" / >
< identity impersonate="tr ue" / >

... to the web.config file for the web service and ...

iService.PreAut henticate = true;
iService.Creden tials = System.Net.Cred entialCache.Def aultCredentials ;

... to the class library code before the call to the web service.

After making that change, now I'm getting the error "The request failed with HTTP status 404: ." (no detail after the colon)

The web service works fine from the browser, it's only returning this error when called through the class library. I've tried a few things...

- Removed the virtual directory and recreated it
- Granted the IUSR and ASPNET accounts administrator priviledges to the virtual directory
- Added this code to the web.config file for the web service...

< defaultProxy >
< proxy usesystemdefaul t="false" / >
< / defaultProxy >

- Added this code to the class library before the web service call...

IWebProxy proxyObject = new WebProxy("http://testserver:8080 ", true);
iService.Proxy = proxyObject;

None of those changes resolved the issue, I still get the same error. (Note: From the same class library, I'm calling a couple other web services that reside on a different server and those calls are successful.)
Jul 18 '07
11 8351
jjw92
7 New Member
Okay, thanks for the help. I'll check it out.
Jul 20 '07 #11
dorandoran
145 New Member
Jim,

Can you post the code which took care of issue(s)?
Sep 22 '09 #12

Sign in to post your reply or Sign up for a free account.

Similar topics

4
57147
by: Christian Eriksson | last post by:
Hi! I want to clarify, for myself, some basic facts about Oracle Client Server configuration. I start with the listener configuration on the server side. What block(s) in what configuration file(s) defines the services (shown below)? What causes there to be more than one instance of a service (shown
0
1275
by: Andrew Yinger | last post by:
Hi. I have recently encountered a serious problem with mysql: the mysqld-nt service pegs the processor at 100% after I start it. I noticed this right after a crash of the service, and the size of one of the tablespaces (the second, auto-extending one) grew to larger than 500GB (it is now 503 GB). I have currently turned off all apps that access the DB, but the mysql process on the server still holds at 100% after I restart it. ...
1
1454
by: pronto | last post by:
Hi guys. I made Web Service (C#) and running it on my localhost (Win2000). It does work from IE and from C# client application. Now I'm trying to create application with Visual C++ 6 and get access to the same WebService. What VC++ application does is : get HTML page from the URL and print it out to stdout. It does work with regular sites (like www.cnn.com), but when I specify URL to get access to my Web Service, I've got 401 error...
2
1773
by: Michael Chong | last post by:
Another same issue on "NullReferenceException" :- I have an (exe) executable program created in VB.NET 2003 that calls to a MFC DLL written in VC++.NET 2003. I always get an error msg "NullReferenceException: Object Reference Not Set to an Instance of an Object" when my exe calls the following codes: in VB.NET Declare Function test Lib "C:\Cyob\IOComm\Debug\IOComm.dll" _ (ByVal a As Long, ByRef b As String) As Integer
2
1297
by: Chuck Haeberle | last post by:
Its the classic scenario. We want our users to connect from their desktop to the web server and on to the database server using integrated windows authentication. It just wont work, even after I think I've done everything I'm supposed to for enabling delegation. IE is set to allow integrated authentication. ASPNET on the web server has permission to act as part of the operating system. web.config impersonate is set to true Active...
4
4197
by: tshad | last post by:
What would be a good way to check programmatically whether a service was running? We have a service that dies periodically and I need to check to see if this service is running. I know how to check to see if the status is in stopped or running mode. But that doesn't tell me if it is actually running. I need to know this so that if it happens I can programmatically start the same service on another machine.
0
1281
by: pagates | last post by:
Hello All, For links in my page, I would like to change the window.status to show something a little friendlier than "javascript:WebForm_DoPostBackWithOptions(.............)". I thought that using the ToolTip for the WebControl could be just the thing. I have a function (see below signature) that recursively looks at the controls on the page (and, if it HasControls, then at its child controls, etc.), starting at "this". If the...
2
7712
by: =?Utf-8?B?Vmlua2k=?= | last post by:
Hello everyone, I have this application that stops and starts IIS admin. When I try to stop the service. I get an error "Cannot open IISADMIN service on computer '.'.". I tried changing the machine name to my machine name then also it does not work. Below is the code ServiceController controller = new ServiceController();
7
1884
by: tim | last post by:
Hi all, I want to execute a VB application from a ASP page (not .Net). Want I want to do is that I write some parameters to a database and then start the external application that will pickup these parameters and run in the background. I looked for a sample but I can't find any. Who can help me. Many thanks Tim
0
3513
by: =?Utf-8?B?YXZhTmF0ZQ==?= | last post by:
We're having an issue getting our POX service to accept messages over 65k for some reason. When that threshold is breached, a 400 is issued by WCF...and it doesn't make it anywhere into the service. Code:
0
9997
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
9845
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
11276
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10497
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...
1
8043
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
7204
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
6082
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
4301
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3320
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.