Developer forum

Forum » Development » Webservice within a custom solution

Webservice within a custom solution

Rasmus Pedersen
Reply

I have a webservice in my custom solution located at /webservice/webservice.asmx.

This URL I can access without problem. 

I can access the functions in the webservice like so: /webservice/webservice.asmx?op=HelloWorld

 

But when I invoke the function like so: /webservice/webservice.asmx?/HelloWorld I get the DW 404

How can I get around this problem?


Replies

 
Pavel Volgarev
Reply
Hi Rasmus,

Have you tried invoking the method like this:
/webservice/webservice.asmx/HelloWorld?Param1=Value2&Param2=Value2

This might also help: How to: Access XML Web Services from a Browser

-- Pavel
 
Rasmus Pedersen
Reply
 It takes no params... it just returns "Hello World".

Even if I give it dummy params it has no effect.

/Edit:

Even if I request in my code on my dummy params it makes no difference.

 
Pavel Volgarev
Reply
Look at my example - you specify the name of the method right after the ".asmx" file extension, don't separate it with "?" character.

-- Pavel 
 
Rasmus Pedersen
Reply

 Sorry, that's how I write it as well, it is just a typo in the URL.

 

I call it like this: 
 /webservice/webservice.asmx/HelloWorld?Dummy=HelloWorld

 
Rasmus Pedersen
Reply

 Could it be the settings on my local machine?

 

Just going to test in on the production site.

 
Pavel Volgarev
Reply
This post has been marked as an answer
Hi Rasmus,

Adding the following lines to the web.config helped me (just tried one of the standard Dynamicweb web-services):
<system.web>
  <webServices>
    <protocols>
      <add name="HttpGet" />
    </protocols>
  </webServices>
</system.web>
-- Pavel

 
Votes for this answer: 0
 
Rasmus Pedersen
Reply
It didn't fix it on my local machine, it works on production though, so all is good.

Thanks

 

You must be logged in to post in the forum