472,965 Members | 1,970 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

web service method calls over http get protocol

SM
Hi,

I have a web service method developed in .Net 1.1 where both http get and
post protocols are enabled.

the problem is that , when i access my web method from ie window like
http://localhost/ws/FindName.asmx/FindName?name="test"&age=30 it returns
results in xml , however , if tried to call the same method in the following
fashion
http://localhost/ws/FindName.asmx/FindName?name="test"&age=
returns an error message right on the ie window with out touching the method.

the error message on the ie window is
Cannot convert n to System.Int32.
Parameter name: type --> Input string was not in a correct format.

I wanted to catch this with in the web method and produce a custom error
message in xml format.

Any help is highly appreciated.

Jun 25 '06 #1
2 2125

In my opinion you shouldn`t do that , as it is standard behavior
a programmer acessing your service can see the error notification in his
response object , if you provide a custom error this might confuse him / her

i guess that the error is thrown by IIS itself before the method is even
called , you can customize these errors but as i said i wouldn`t recomend
it , as it might confuse users of your webservice

regards

Michel Posseth [MCP]

"SM" <SM@discussions.microsoft.com> schreef in bericht
news:1D**********************************@microsof t.com...
Hi,

I have a web service method developed in .Net 1.1 where both http get and
post protocols are enabled.

the problem is that , when i access my web method from ie window like
http://localhost/ws/FindName.asmx/FindName?name="test"&age=30 it returns
results in xml , however , if tried to call the same method in the
following
fashion
http://localhost/ws/FindName.asmx/FindName?name="test"&age=
returns an error message right on the ie window with out touching the
method.

the error message on the ie window is
Cannot convert n to System.Int32.
Parameter name: type --> Input string was not in a correct format.

I wanted to catch this with in the web method and produce a custom error
message in xml format.

Any help is highly appreciated.

Jun 25 '06 #2
It goes without saying that I hate using HTTP GET and POST in web
services but lets assume you have your reasons and try and help you
out.

The only solution I can think of is that you would have to set the age
parameter to a string type which you would then parse yourself and
handle as you wish.

Josh
http://www.thejoyofcode.com/
SM wrote:
Hi,

I have a web service method developed in .Net 1.1 where both http get and
post protocols are enabled.

the problem is that , when i access my web method from ie window like
http://localhost/ws/FindName.asmx/FindName?name="test"&age=30 it returns
results in xml , however , if tried to call the same method in the following
fashion
http://localhost/ws/FindName.asmx/FindName?name="test"&age=
returns an error message right on the ie window with out touching the method.

the error message on the ie window is
Cannot convert n to System.Int32.
Parameter name: type --> Input string was not in a correct format.

I wanted to catch this with in the web method and produce a custom error
message in xml format.

Any help is highly appreciated.


Jun 26 '06 #3

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

Similar topics

18
by: jabailo | last post by:
I wrote a program that loops through a file of records. It parses each line in the file and sends them to a web service that inserts them into an AS400DB2 database using Asynch calls. This is...
5
by: Marty McDonald | last post by:
I create and start several threads, each thread executes the same method - within the method, a web service is invoked. I find that the more threads I use, the longer it takes for all of the...
23
by: Adam Clauss | last post by:
I have a C# Windows Service running as the NetworkService account because it needs to access a network share. As part of the service's initialization, I want the service to terminate, if an...
5
by: Brian Patrick | last post by:
I have an application model which will consist of a front-end configuration application, which needs to control the state of a back-end vb.net windows service (which is the component that does all...
0
by: Dominick Baier | last post by:
Hi, try to set the PreAuthenticate property on the client proxy to true - i never needed this but the docs sound like that this could solve your problems. --- Dominick Baier -...
3
by: Jim Lewis | last post by:
I have read several things that state accessing a Web Service through a Query String should work. However, when I try to execute http://localhost/webservice1/service1.asmx/HelloWorld I get the...
5
by: Nate | last post by:
We are attempting to make a request to a web service (we will refer to it as XXXServices) hosted on a Web Logic server from a C# SOAP client. The server responds with a 401 Unauthorized error...
2
by: Dmitry Markin | last post by:
I've faced one cunning problem recently: I'm using IIS 6.0 as a web server, running on 1.1 framework. When i'm accessing my .net web service all goes fine, until I receive "The operation has...
0
by: ben | last post by:
OK so there are a few things going on. I succesfully created a SOAP webreference in VS IDE which when built works fine under small amounts of load, however under heavy amounts of load we start to...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...

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.