473,386 Members | 1,785 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,386 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 2147

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: 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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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:
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...
0
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,...
0
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...

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.