# Having Trouble Integrating Web API Based on Sample Code

**URL:** https://discuss.workflowgen.com/t/having-trouble-integrating-web-api-based-on-sample-code/779
**Category:** Web API
**Created:** [May 25, 2017, 3:56pm UTC](https://discuss.workflowgen.com/t/having-trouble-integrating-web-api-based-on-sample-code/779 "2017-05-25T15:56:52Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![eddy.daouk](https://yyz2.discourse-cdn.com/flex030/user_avatar/discuss.workflowgen.com/eddy.daouk/32/672_2.png) [@eddy.daouk](https://discuss.workflowgen.com/u/eddy.daouk)
#### Post date: [May 25, 2017, 4:20pm UTC](https://discuss.workflowgen.com/t/having-trouble-integrating-web-api-based-on-sample-code/779/2 "2017-05-25T16:20:46Z")

</div>

Hi,

You have probably created a Service Reference instead of **Web Reference**

The service reference is the latest interface for adding references to all manner of WCF services (they may not be web services) whereas Web reference is specifically concerned with **ASMX** web references.

## How to Add a Web Reference in Visual Studio:

1- In the Solution Explorer Right Click on **References -\> Add Service Reference…**

2- The _Add Service Reference_ popup will open. Click on **Advanced…**

 ![](https://canada1.discourse-cdn.com/flex030/uploads/workflowgen/original/1X/7179a465326eb7da822d09046204e91d6c838c82.png)

3- Then click on **Add Web Reference…**

 ![](https://canada1.discourse-cdn.com/flex030/uploads/workflowgen/original/1X/30fe9ea268093c6ee27704a5768d6fcafa58b815.png)

4- Add the URL of the **ProcessesRuntime.asmx** file in the URL bar. You will be asked for the credentials to access the file then you should be all set.

 ![](https://canada1.discourse-cdn.com/flex030/uploads/workflowgen/original/1X/2e02b81155cf523eb6d786eaa99580a707b969b8.png)

Let me know if this helps,  
Eddy.

---

_[View the full topic](https://discuss.workflowgen.com/t/having-trouble-integrating-web-api-based-on-sample-code/779)._
