Quantcast
Channel: ASP.NET Core
Viewing all articles
Browse latest Browse all 9386

ArgumentException with BuildWebHost - .Net core 2.0

$
0
0

That's the way I've added what has been made in this article, it makes me mistake every time I try to run the website.

i have make this here:

System.ArgumentException: 'Cannot instantiate implementation type 'XXXXXX.HelperClass.ViewRenderService' for service type 'XXXXXX.HelperClass.IViewRenderService'.'

Every time I try to drive it, there are errors here.

public static IWebHost BuildWebHost(string[] args) =>
        WebHost.CreateDefaultBuilder(args)
            .UseStartup<Startup>()
            .Build();

But in my ConfigureService there I have added my opportunity to send email to the customer / user

services.AddScoped<IViewRenderService, ViewRenderService>();

What can I do to prevent this error from coming back?


Viewing all articles
Browse latest Browse all 9386

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>