By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,741 Members | 1,973 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,741 IT Pros & Developers. It's quick & easy.

web service method calls over http get protocol

P: n/a
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
Share this Question
Share on Google+
2 Replies


P: n/a

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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.