Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Services > web exception error

Reply
Thread Tools

web exception error

 
 
Nab
Guest
Posts: n/a
 
      09-18-2006
I have a web service connected to a sql server 2005 express. The service has
a web method and information is extracted from the database through a stored
procedure that has two parameter:input and output. So for example some one
could supply a stock brokers name and in turn one gets the stock broker's
charging commission. Here's the code for that (connection established through
the gui):

<WebMethod()> _
Public Sub GetFee(ByVal brokerName As String, ByRef brokerFee As Single)

Dim cmd As New SqlCommand("GetDealingFee", sqlConn)
cmd.CommandType = CommandType.StoredProcedure
cmd.Parameters.Add("@BName", SqlDbType.VarChar, 50)
cmd.Parameters("@BName").Direction = ParameterDirection.Input
cmd.Parameters("@BName").Value = brokerName
cmd.Parameters.Add("@Fee", SqlDbType.Real)
cmd.Parameters("@Fee").Direction = ParameterDirection.Output
If cmd.Connection.State <> ConnectionState.Open Then
cmd.Connection.Open()
End If
cmd.ExecuteNonQuery()
brokerFee = cmd.Parameters("@Fee").Value
cmd.Connection.Close()

When I consume the service by a pocket pc (through activesync) i get a
system.net.webexception erro and this is stack trace:


at System.Web.Services.Protocols.SoapHttpClientProtoc ol.doInvoke()
at System.Web.Services.Protocols.SoapHttpClientProtoc ol.Invoke()
at DeviceApplication_Stockbrokers.localhost.Service.G etFee()
at DeviceApplication_Stockbrokers.Form1.Button1_Click ()
at System.Windows.Forms.Control.OnClick()
at System.Windows.Forms.Button.OnClick()
at System.Windows.Forms.ButtonBase.WnProc()
at System.Windows.Forms.Control._InternalWnProc()
at Microsoft.AGL.Forms.EVL.EnterMainLoop()
at System.Windows.Forms.Application.Run()
at DeviceApplication_Stockbrokers.Form1.Main()


At this stage my knowledge is limited and any help of what's happening and
how to fix this error will be appreciated.

I use win2003 server and Visual Studio 2005 Prof (using VB) and published
the web service to a local IIS.

Thanks.



--
UK
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Error: uncaught exception: [Exception... "Component returned failure friend Javascript 1 05-12-2008 07:25 AM
Exception of type 'System.Web.HttpUnhandledException' wasthrown.Exception has been thrown by the target of an invocation.System.WebSystem.Exception jobs ASP .Net 1 11-16-2007 05:57 PM
exception unknown software exception error - Excel.exe mfinamore Software 0 11-15-2007 04:54 PM
while executing my client program i get the exception javax.naming.LinkException: [Root exception is javax.naming.LinkException: [Root exception is javax.naming.NameNotFoundException: remaining if plz anybody know how to solve this problem then mahesh Java 0 03-08-2007 12:26 PM
Re: bizaar exception that isn't really an exception jeff ASP .Net 0 06-24-2003 12:46 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57