Web Service method name is not valid

A

andrew

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.Initialize()
at System.Web.Services.Protocols.ServerProtocolFactory.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
 
J

Jeff Dillon

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:

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

Jeff
 
A

andrew

I did that and I get the regular web service page with a listing of the
methods etc...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,962
Messages
2,570,134
Members
46,692
Latest member
JenniferTi

Latest Threads

Top