PIYUSH RANA
PIYUSH RANA

Reputation: 1

cant call the web service from html page

I am trying to call an asp.net web service from an html page,but its not able to call the web service .but instead its open the url for the webservice only..

I tried to call it from the FORM in html on action="web service link and method ="POST":

<form id="getdata"  method="post" action="192.168.1.1:85/Service.asmx?op=Hello" target="_blank">

    <input id="btnload" type="submit" value="Submit" />

</form>

ERROR ITS SHOWS:

The webpage at 192.168.1.1:85/Service.asmx?op=Hello might be temporarily down or it may have moved permanently to a new web address. Error code: ERR_INVALID_RESPONSE

Web service is working fine and tested. pls help.....

Upvotes: 0

Views: 604

Answers (1)

Dai
Dai

Reputation: 155035

Your action="" attribute needs to specify the URI scheme because it isn't a relative URI.

Use this:

action="http://192.168.1.1:85/Service.asmx?op=Hello"

In a URI, the scheme (often incorrectly called "the protocol") is the first part before the colon which states what type of URI it is, for example:

mailto:[email protected]
http://hostname:8080/path
file://\\SMBServer\share\path
urn:epc:tag:cpi-var:3.0614141.5PQ7%2FZ43.12345

Upvotes: 1

Related Questions