Showing posts with the label Web Service

Step by step migration of ASP.NET Core 2.2 to 3.1

In order to upgrade/migrate core version to 3.1 following steps to be perform.
Download and install Visual Studio 2019 version 16.4 or higher.Download and install .NET Core 3.1 the projects of solution to .NET Core 3.1 , because ASP.NET Core 3.1 requires it.Update existing Nuget packages to a version compatible with ASP.NET Core 3.1 in each projectUse IHost interface from a IHostBuilder instead of building and running a IWebHost from a IWebHostBuilder in Program.cs public static IHostBuilder CreateWebHostBuilder(string[] args) => Host.CreateDefaultBuilder(args) .ConfigureWebHostDefaults(webBuilder => { webBuilder.UseKestrel() .UseSerilog() .UseStartup<Startup>(); }) Change AddMvc method has been replaced by AddControllers in Startup.cs of each projects.In Startup.cs,UseMvc method to be replaced by…

Cannot create type 'webservice' error solution

We create a web-service in development environment it working fine. But when we deploy the developed web service in production server many people get the Cannot create type 'some web-service  error. After finding the solution on the net i got one resolution which i am going to share now.
To get ride of this error we need to re-install the .net framework 2.0 in IIS. This is essential to run web service on server. Following is the step you need to follow to register the .net framework in IIS.
Open command promptThen type >CD C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe -iAfter above instruction the .net framework will be register in IIS.Now run the web service again. it should be run normally.Hurray you did it