3

I have a WCF .dll that loads configuration from web.config file.
I'm using that dll in asp.net 5 application, when I try to call a function from dll, I'm getting exception:

Could not find default endpoint element that references contract 'WebService.MyWebService' in the ServiceModel client configuration section. This might be because no configuration file was found for your application, or because no endpoint element matching this contract could be found in the client element.

The configuration for dll exists in web.config.
This used to work in asp.net beta 6, but now that I upgraded to rc1 it doesn't work.

How can I make this work?

4
  • What does this have to do with Kestrel? Commented Dec 1, 2015 at 15:07
  • From beta 8, asp.net kestrel server is used link Commented Dec 1, 2015 at 15:11
  • Web.Config is not supported in Asp.Net 5, it's only present for configuring IIS. Commented Dec 1, 2015 at 23:35
  • By the way, here you have an extension to add "Add Service Reference" dialog box to VS2105 update 1 blogs.msdn.com/b/webdev/archive/2015/12/15/… Commented Jan 7, 2016 at 18:10

1 Answer 1

5

As stated here:

Support for app.config when running on the full .NET Framework
When running on the full .NET Framework you can now use System.Configuration to access configuration data in app.config from a DNX based console application. Simply put your XML configuration file next to your project.json file.

So I only had to copy contents of web.config to app.config

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.