Last post Feb 02, 2018 02:16 PM by iLens
Feb 01, 2018 01:54 PM|iLens|LINK
My web service works fine when I test with Localhost, but when I deploy to the web I get a Protocol error with the message
Message=The request failed with the error message:
<body><h1>Object Moved</h1>This document may be found <a HREF="http://XXXX.org.uk/WSLog.asmx">here</a></body>
Where the HREF is the correct address of the service.
I created the service interface with the "Add service reference/advanced/Add Web reference" in Visual studio 2013
I assume I'm missing a setting in the web config or the host site ("Anonymous authentication" is checked on the host)
Feb 02, 2018 02:05 AM|Edward Z|LINK
>> but when I deploy to the web I get a Protocol error
How did you deploy the web service?
Could you access “http://XXXX.org.uk/WSLog.asmx"” in web browser, and could you invoke the method in the wsdl?
After deploying the web service, did you update your service reference with the new service address?
In addition, for this error, I suggest you check whether links below are helpful.
#Object Moved error while consuming a webservice
Note: This response contains a reference to a third party World Wide Web site. Microsoft is providing this information as a convenience to you.
Microsoft does not control these sites and has not tested any software or information found on these sites;
Therefore, Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there.
There are inherent dangers in the use of any software found on the Internet, and Microsoft cautions you to make sure that you completely understand the risk before retrieving any software from the Internet.
Feb 02, 2018 10:43 AM|iLens|LINK
Thanks for the reply
I went through linking processs again at https://msdn.microsoft.com/en-us/library/bb628649.aspx and copied the bin and .asmx to the web again, but no change.
I can access the .asmx via a webbrowser and get the list of methods
I set the host name dynamically, so I can try with the local host or the remote host. It's using the correct name and I use this technique successfully in another site
Dim svcLog = New WSLog.WSlog
Dim host As String = "www.xxxx.org.uk"
If OptDebug Then
Dim localID As String = InputBox("Enter local host ID or Cancel to use remote server", "svcEntrant", "56461").Trim
If localID <> "" Then host = "Localhost:" & localID
Dim uri = host & "/WSLog.asmx"
If Not uri.StartsWith("http://") Then uri = "http://" & uri
svcLog.Url = uri
svcLog.Timeout = -1
It works fine with localhost
I tried the links you suggested...
The first link talks about the Service node in IIS to set the cookie status - I looked with remote desktop but I can't find it anywhere. I wrote some code to check, and the app can read/write cookies OK so that's not it!
The second link refers to unticking the ""Redirect requests to this destination:" node , but it was unticked already.
Do you know where the "Object moved" message originates and what it actually means?
Feb 02, 2018 02:16 PM|iLens|LINK
I found the problem....
my website responds to www.xxxx.org.uk as well as xxx.org.uk - I was using the host name "www.xxxx.org.uk", and when I dropped the "www." it worked.
Many thanks for your help