Web Reference or Service Reference in Business layer, where is the published url?

909 views Asked by At

I have a solution that uses caching to trigger some action in the business project within my solution. I would like to call a web service from this project and was going to add either a web or service reference. I can't call a web service in the front end as i can't have circular reference.

I can add the reference fine, but when i publish the front end, it has the business dll in the bin folder, but there is nothing to state what the url for the reference is. If there was a web reference in the front end, the url would be stored in the web.config. Is it being compiled into the dll?

1

There are 1 answers

0
DaveRead On BEST ANSWER

If you add a reference in the business layer project, the Visual Studio wizard will place the URLs into the .config file of this project.

If you then need to reference these services from your web application, you'll need to add the sections to your web.config, as this is the executing assembly.

For WCF service references this will be a system.serviceModel section with the client endpoint definitions. For ASMX web service references (from Add Web Reference) they will be in a settings section, if you have configured the service URL behaviour to be dynamic.