Hi,
I solved the problem.
Silly mistake, I had commented the [Web Method] before my method that
prevented its exposure. :~)
Regards
Andy
--
Regards,
Anand
[quoted text, click to view] "Andy" <aramanan@ivesia.com> wrote in message
news:OQ8xSGSOGHA.2300@TK2MSFTNGP15.phx.gbl...
> Hi,
>
> I created a sample web service and tried calling it from my VBScript.
>
> Here it is:
> --------------------------------------------------------------------------
--
> ---------------
> '-- Declare variables
>
> dim fs
>
> dim file
>
> dim strPara
>
> Const URL = "http://localhost/Sample/SampleService.asmx"
>
> '-- Initialize variables
>
> para = "Anand"
>
> Set fs = CreateObject("Scripting.FileSystemObject")
>
> Set file = fs.OpenTextFile("C:\Inetpub\wwwroot\Sample\output\get.html", 8,
> True)
>
> ' Create the HTTP object
>
> Set xmlhttp = CreateObject("Microsoft.XMLHTTP")
>
> xmlhttp.open "GET", URL & "/HelloWorld?pstrTemp=" & strPara, false
>
>
> ' Send the request synchronously
>
> xmlhttp.send ""
>
> '-- Write output to file
>
> file.write xmlhttp.responseText
>
> file.close()
>
> --------------------------------------------------------------------------
--
> ---------------
> But I get the output as:
>
> System.InvalidOperationException: HelloWorld 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 have allowed httpget and httppost in my web.config of the sample web
> service.
> <webServices>
>
> <protocols>
>
> <add name="HttpGet"/>
>
> <add name="HttpPost"/>
>
> <add name="HttpPostLocalhost"/>
>
> <!-- Documentation enables the documentation/test pages -->
>
> <add name="Documentation"/>
>
> </protocols>
>
> </webServices>
>
> I also do not have my firewall enabled.
>
> Any clue how to solve this?
>
> Regards,
> Anand
>
>