473,403 Members | 2,354 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,403 software developers and data experts.

How Do I Specify Web Service ResponseCode

Hello All.

I have a C# Web service created with .NET 2002. When my main WebMethod
works normally, the first line of the SOAP response is "ResponseCode: 200
(OK)". When something happens in my WebMethod that forces me to throw a
SoapException, the first line of the response always says "ResponseCode 500
(Internal Server Error)".

In some cases, it would be more appropriate for me to return a ResponseCode
400.

How do I force a ResponseCode 400 instead of a 500?

Thanks very much!

Earl
Nov 21 '05 #1
0 1077

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

Similar topics

2
by: Yolande | last post by:
Hi there, I have a C# web service and I want to specify the lower bound and upper bound of input value. e.g. public long MilesToKilometers(long lngMiles). I want the input value for lngMiles...
0
by: billmiami2 | last post by:
I'm creating an ASP.NET web service with a number of web methods. The consumers of these web services are developers using Macromedia Flash which comes with its own interface for web services. In...
1
by: Matthew Frederick | last post by:
Hope this is the best forum for this, any suggestions for another are appreciated. I have a simple Compact Framework (2) app that sends some data to a web service and acts despending on the...
0
by: mjurban | last post by:
I am trying to find a way to specify the "Start Parameters" for a windows service upon installation, instead of before startup. There is an Account property in the ServiceProcessInstaller class...
1
by: DiamonDogX | last post by:
I have created a project of type "AST.NET Web Service" in Visual Studio 2005. When I run it on my box, (i.e. click the green debug button), it launches Internet Explorer and shows the available web...
1
by: Dave | last post by:
I have a Console app, a related Service Project and Service Setup / Installer Project. I would like to have the result of running the installer.msi file register the service to run with certain...
0
by: Dave | last post by:
I have a Console app, a related Service Project and Service Setup / Installer Project. I would like to have the result of running the installer.msi file register the service to run with certain...
2
by: =?Utf-8?B?TWluaS1Ub29scyBUaW1t?= | last post by:
I have an odd web services problem. I have a shared assembly (shared.dll) that is referenced both by a C# WinForms client (client.exe) and a C# Web Service (service.dll). When I upload the web...
0
by: Dave Burns | last post by:
Hello, I am trying to specify a logical default value for a in a WCF Web Service using basicHttpBinding. I realize that the language defaults are: int - 0 string - null bool - false
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
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...
0
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,...
0
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...

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.