Not able to see use all WSDL content on .NET Core Web API - wcf

I'm not able to see all of the methods of the Web Services that I want to use on my .NET CORE Web API project on Visual Studio 2019.
Unlike on a Console Application project that I used to work with and add the .WSDL through the "Add Connected Services" method.
2 projects. Same WSDL. Different results.
Here's an example of the method that I need to use and it's there (AuthenticateUser) :
Here is how it looks on reference file on the Console Application project :
Here is a screenshot from the .NET CORE Web API project which the AuthenticateUser() method cannot be found on the reference file :
Same service, different result.
I've already seen some posts here such as :
Wcf service works in .NET Core 3.1 console app, but fails to work in ASP.NET Core 3.1 Web API
Doesn't seems to be working for me.
What am I missing?

Related

Can I run .Net 4.6 Application under .Net Core Site on IIS

I inherited a project that is a collection of WCF Services that target .Net Framework 4.6.1. I wrote a front end SPA application that targets .Net Core 2.2 not realizing that the hosting model was such that both the UI (.Net Core) and the API (.Net 4.6.1) need to run under one Site on IIS.
I'm trying to get this to work on my local machine. I created a new Site in IIS -- Site A. I published my .Net Core application to Site A and set it up with an application pool set to "No Manged Code".
I then added an Application to Site A called API and added all my WCF services in that folder. I configured API to use an application pool that targets ".NET CLR 4.0".
I updated the web.config in the root of Site A to include all the necessary bits for WCF.
I'm able to hit Site A and get my SPA UI, but when I do anything that attempts to hit the backend API (including trying to hit it directly -- http://localhost:464646/api/test.svc), I get the following error:
HTTP Error 502.5 - ANCM Out-Of-Process Startup Failure
Is what I'm doing even possible? If so, what changes do I need to make in order to get this to work?

Can a Worker Service be called and/or used inside an existing ASPNET.Core web project?

I've been reading and learing about the new Worker Service features provided in .Net Core 3.0. I have been using this link from Microsoft: Background tasks with hosted services in ASP.NET Core
What I don't understand is this, can these worker service concepts be introduced into an existing ASPNET Web Project, like a Razor Pages site? Or must you create a new project and then deploy that project as a service using whatever mechanism the host OS proivdes for that?
Yes, you can host any number of hosted services (IHostedService) within ASP.NET Core applications. With version 3, ASP.NET Core uses the generic host (Host.CreateDefaultBuilder) which is the framework that is hosting these hosted services when the application starts. In fact, the ASP.NET Core web application is an IHostedService itself.
To add additional hosted services to your ASP.NET Core application, just register additional hosted services with your service collection, e.g. within the Startup’s ConfigureServices:
services.AddHostedService<MyHostedService>();
That service will then launch together with the ASP.NET Core web server when the application runs.
The Worker SDK that is mentioned in the documentation is actually a subset of the Web SDK that you are using with ASP.NET Core application. Microsoft.NET.Sdk.Worker is basically Microsoft.NET.Sdk.Web without the web-specific stuff like Razor compilation and wwwroot folder stuff. It basically sets up automatic file globbing e.g. for the appsettings.json and does some other useful things that the core Microsoft.NET.Sdk does not have.
Ultimately this means, that when you are using the Web SDK, then you already have everything the Worker SDK offers. So you do not need to specify the Worker SDK just to host additional background services.

Running ASP.NET Core within/alongside an existing ASP.NET WebForms project in Visual Studio and IIS Express

I have a large Visual Studio solution with several ASP.NET web sites with a mix of WebForms, MVC and WebAPI. What I'd like to be able to do is add an ASP.NET Core project to this solution to provide MVC, Razor Pages, WebAPI and SPA (Vue.JS in this case) facilities. The plan is to take each WebForms page at a time and convert to the new framework.
I'll target .NET Framework and the Core site will share some assemblies from the WebForms - but no state is shared except a session cookie and any state stored in the database.
I specifically want to be able to serve the new framework from IIS Express on the same port. So for example, an old page such as http://localhost:1234/page1.aspx will be converted to http://localhost:1234/core/page1. However, I'm unable to simply change the Core project to be hosted on IIS Express and change the path to http://localhost:1234/core. I have managed by following instructions to host in IIS but this has several disadvantages for development. I've also tried adding <urlRewrite> configuration to the WebForms site to forward requests to Core running on a different port but I wasn't very successful and I believe POST request are not supported which renders it fairly useless!

How to publish service on IIS using ASP.NET Boilerplate?

As there is no documentation, Could you please provide steps to publish ASP.NET Boilerplate service on IIS Server
All the steps are same for Asp.Net Core which we have for a classical Asp.Net web application.
First, you need to install the .NET Core Hosting Bundle. Please find the steps below.
Navigate to the .NET All Downloads page.
Select the latest non-preview .NET Core runtime from the list (.NET
Core > Runtime > .NET Core Runtime x.y.z). Unless you intend to work
with preview software, avoid runtimes that have the word "preview" in
their link text.
On the .NET Core runtime download page under Windows, select the
Hosting Bundle Installer link to download the .NET Core Hosting
Bundle.
After all the above steps just follow the steps which you do for Asp.Net web application.

How to enable trace.axd in ASP.NET core?

Our app is based on ASP.NET Core 2.0. It works fine in development environment but we see an oauth error when published to production.
All the documentation on asp.net core seems to point to using ILoggingxxx interfaces. The examples I found typically call logging.AddConsole() method so that the log lines can be viewed in VIsual Studio debug window. I am wondering if the good old trace.axd is still available under asp.net core. If so, I would appreciate the steps to enable tracing. Regards.
trace.axd is exclusive to applications based on .NET Framework and ASP.NET 4.x. It is not available in ASP.NET Core applications at all.