Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Web Service method name is not valid

Reply
Thread Tools

Web Service method name is not valid

 
 
andrew
Guest
Posts: n/a
 
      09-18-2008
I have a web application demo page and a web service.

On my machine everything works great.

In our test environment the web service is working fine... when I point the
demo page on my machine to the test environment web service I get results as
expected.

The demo page in the test environment which is pointed at the web service in
the test environment doesn't work at all... instead I end up with this
bizarre error:

Client found response content type of 'text/plain; charset=utf-8', but
expected 'text/xml'.
The request failed with the error message:
--
System.InvalidOperationException: /WebServices/myWebService.asmx Web
Service method name is not valid.
at System.Web.Services.Protocols.HttpServerProtocol.I nitialize()
at System.Web.Services.Protocols.ServerProtocolFactor y.Create(Type type,
HttpContext context, HttpRequest request, HttpResponse response, Boolean&
abortProcessing)

I figure I need to change some sort of environmental variable on the test
environment machine but I'm not really sure what to change.

Here's the demo page code...

Private Sub Submit_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Submit.Click

Dim myWS As New myWebReference.myWebService
Dim myDS As DataSet
Dim myResponseStr As String

Try

'Create Soap Header
CreateSoapHeader(myWS)

myDS = myWS.GetStuff(Me.txtInput.Text)

myResponseStr = myDS.GetXml

txtOutput.Text = myResponseStr
Catch ex As Exception
Throw ex
End Try

End Sub

Public Sub CreateSoapHeader(ByRef myWS As myWebReference.myWebService)
Dim myWSCredentials As myWebReference.Credentials

' Build Credentials.
If (Me.txtUserName.Text <> "" AndAlso Me.txtPassword.Text <> "") Then
myWSCredentials = New ConsumerComplaintsWSWR.Credentials
myWSCredentials.UserName = Me.txtUserName.Text
myWSCredentials.Password = Me.txtPassword.Text
End If

myWS.CredentialsValue = myWSCredentials
End Sub
 
Reply With Quote
 
 
 
 
Jeff Dillon
Guest
Posts: n/a
 
      09-18-2008
>I have a web application demo page and a web service.
>
> On my machine everything works great.
>
> In our test environment the web service is working fine... when I point
> the
> demo page on my machine to the test environment web service I get results
> as
> expected.
>
> The demo page in the test environment which is pointed at the web service
> in
> the test environment doesn't work at all... instead I end up with this
> bizarre error:
>
> Client found response content type of 'text/plain; charset=utf-8',
> but
> expected 'text/xml'.
> The request failed with the error message:
> --
> System.InvalidOperationException: /WebServices/myWebService.asmx Web
> Service method name is not valid.
> at System.Web.Services.Protocols.HttpServerProtocol.I nitialize()


Point a browser at your web service, and see if you can connect

Jeff


 
Reply With Quote
 
 
 
 
andrew
Guest
Posts: n/a
 
      09-18-2008
I did that and I get the regular web service page with a listing of the
methods etc...

"Jeff Dillon" wrote:

> Point a browser at your web service, and see if you can connect
>
> Jeff

 
Reply With Quote
 
Jeff Dillon
Guest
Posts: n/a
 
      09-18-2008
"andrew" <> wrote in message
news:EFACB2C8-4D67-443C-9D98-...
>I did that and I get the regular web service page with a listing of the
> methods etc...
>
> "Jeff Dillon" wrote:
>
>> Point a browser at your web service, and see if you can connect
>>
>> Jeff


I would recommend installing a http packet sniffer like Fiddler which is
freely available at http://www.fiddler2.com



 
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
Does timer in Web Service Global.asax block my Web Service from processing web-site requests? Leo Violette ASP .Net Web Services 0 04-17-2009 12:39 AM
'' is not a valid name. Make sure that it does not include invalid characters or punctuation and that it is not too long. rote ASP .Net 2 01-23-2008 03:07 PM
Valid name for a method German Monfort Ruby 1 04-28-2007 07:11 PM
InvocationTargetException when calling "new Service()" in Axis web service to call another web service Michael Averstegge Java 0 01-10-2006 11:05 PM
Re: Urgent! how to get object name, method name and attribute name based on the strings? ding feng C++ 2 06-25-2003 01:18 PM



Advertisments