Kestrel封装成WindowServer.zip

上传者: iml6yu | 上传时间: 2023-02-22 09:35:16 | 文件大小: 22.28MB | 文件类型: ZIP
背景 在一些开发过程中,会在局域网内搭建webapi服务作为移动端的服务接口使用,但是每次实施人员要到客户现场安装iis等工具,还有一些web的配置,非常繁琐,所以想着把webapi封装到WindowService中,可以通过自定义的安装程序进行一键部署,岂不美哉! 这篇文章主要是记录如何将Kestrel的服务封装在WindowService中 关于WindowsServer 请参考如下这篇文章 .netcore worker service (辅助角色服务) 的上手入门,包含linux和windows服务部署 开发服务 之前做过.net5版本的处理,觉得挺简单的,但是到.net6的时候遇到了一些问题,所以下面都会记录 .NET5版本 建项目 新建一个webapi项目,如下图 添加Controller using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; namespace WebApiNet_v5.Controllers { [Route("api/[controller]")]

文件下载

资源详情

[{"title":"( 633 个子文件 22.28MB ) Kestrel封装成WindowServer.zip","children":[{"title":"WorkerService1.csproj <span style='color:#111;'> 429B </span>","children":null,"spread":false},{"title":"Worker.cs <span style='color:#111;'> 587B </span>","children":null,"spread":false},{"title":"WorkerService1.csproj.nuget.dgspec.json <span style='color:#111;'> 2.68KB </span>","children":null,"spread":false},{"title":"WorkerService1.csproj.nuget.g.props <span style='color:#111;'> 1.73KB </span>","children":null,"spread":false},{"title":"WorkerService1.GlobalUsings.g.cs <span style='color:#111;'> 521B </span>","children":null,"spread":false},{"title":"WorkerService1.GeneratedMSBuildEditorConfig.editorconfig <span style='color:#111;'> 505B </span>","children":null,"spread":false},{"title":"WorkerService1.AssemblyInfo.cs <span style='color:#111;'> 1.14KB </span>","children":null,"spread":false},{"title":".NETCoreApp,Version=v6.0.AssemblyAttributes.cs <span style='color:#111;'> 198B </span>","children":null,"spread":false},{"title":"WorkerService1.AssemblyInfoInputs.cache <span style='color:#111;'> 42B </span>","children":null,"spread":false},{"title":"WorkerService1.csproj.AssemblyReference.cache <span style='color:#111;'> 107.07KB </span>","children":null,"spread":false},{"title":"WorkerService1.assets.cache <span style='color:#111;'> 22.72KB </span>","children":null,"spread":false},{"title":"project.assets.json <span style='color:#111;'> 61.05KB </span>","children":null,"spread":false},{"title":"WorkerService1.csproj.nuget.g.targets <span style='color:#111;'> 617B </span>","children":null,"spread":false},{"title":"WorkerService1.GlobalUsings.g.cs <span style='color:#111;'> 521B </span>","children":null,"spread":false},{"title":"WorkerService1.GeneratedMSBuildEditorConfig.editorconfig <span style='color:#111;'> 505B </span>","children":null,"spread":false},{"title":"WorkerService1.AssemblyInfo.cs <span style='color:#111;'> 1.14KB </span>","children":null,"spread":false},{"title":".NETCoreApp,Version=v6.0.AssemblyAttributes.cs <span style='color:#111;'> 198B </span>","children":null,"spread":false},{"title":"WorkerService1.AssemblyInfoInputs.cache <span style='color:#111;'> 42B </span>","children":null,"spread":false},{"title":"WorkerService1.csproj.AssemblyReference.cache <span style='color:#111;'> 107.07KB </span>","children":null,"spread":false},{"title":"WorkerService1.assets.cache <span style='color:#111;'> 22.72KB </span>","children":null,"spread":false},{"title":"project.nuget.cache <span style='color:#111;'> 4.93KB </span>","children":null,"spread":false},{"title":"appsettings.Development.json <span style='color:#111;'> 137B </span>","children":null,"spread":false},{"title":"launchSettings.json <span style='color:#111;'> 217B </span>","children":null,"spread":false},{"title":"Program.cs <span style='color:#111;'> 397B </span>","children":null,"spread":false},{"title":"appsettings.json <span style='color:#111;'> 137B </span>","children":null,"spread":false},{"title":".dtbcache.v2 <span style='color:#111;'> 379.41KB </span>","children":null,"spread":false},{"title":".suo <span style='color:#111;'> 77.00KB </span>","children":null,"spread":false},{"title":".futdcache.v2 <span style='color:#111;'> 1.04KB </span>","children":null,"spread":false},{"title":"740945d9-92eb-42ff-9758-fca3918c40c2.vsidx <span style='color:#111;'> 23.17KB </span>","children":null,"spread":false},{"title":"read.lock <span style='color:#111;'> 0B </span>","children":null,"spread":false},{"title":"1e92e047-a386-4b07-af46-7c282f5c91bb.vsidx <span style='color:#111;'> 20.13KB </span>","children":null,"spread":false},{"title":"873c3ce1-9cc4-4efd-bca9-9e173f96a0da.vsidx <span style='color:#111;'> 20.88KB </span>","children":null,"spread":false},{"title":"2dc49e39-40ce-4dde-97f3-c201fa665282.vsidx <span style='color:#111;'> 19.59KB </span>","children":null,"spread":false},{"title":"applicationhost.config <span style='color:#111;'> 81.70KB </span>","children":null,"spread":false},{"title":"kestrel封装成windowserver.metadata.v5.2 <span style='color:#111;'> 277.74KB </span>","children":null,"spread":false},{"title":"kestrel封装成windowserver.projects.v5.2 <span style='color:#111;'> 848.35KB </span>","children":null,"spread":false},{"title":"Kestrel封装成WindowServer.sln <span style='color:#111;'> 2.07KB </span>","children":null,"spread":false},{"title":"WebApiNet_v5.csproj.nuget.dgspec.json <span style='color:#111;'> 2.94KB </span>","children":null,"spread":false},{"title":"WebApiNet_v5.MvcApplicationPartsAssemblyInfo.cs <span style='color:#111;'> 635B </span>","children":null,"spread":false},{"title":"WebApiNet_v5.AssemblyInfo.cs <span style='color:#111;'> 1.15KB </span>","children":null,"spread":false},{"title":"WebApiNet_v5.dll <span style='color:#111;'> 8.50KB </span>","children":null,"spread":false},{"title":"Microsoft.OpenApi.dll <span style='color:#111;'> 169.88KB </span>","children":null,"spread":false},{"title":"WebApiNet_v5.exe <span style='color:#111;'> 123.00KB </span>","children":null,"spread":false},{"title":"Microsoft.Extensions.Hosting.WindowsServices.dll <span style='color:#111;'> 22.11KB </span>","children":null,"spread":false},{"title":"Microsoft.Extensions.DependencyInjection.dll <span style='color:#111;'> 81.13KB </span>","children":null,"spread":false},{"title":"System.Text.Encodings.Web.dll <span style='color:#111;'> 74.10KB </span>","children":null,"spread":false},{"title":"Microsoft.Extensions.FileProviders.Abstractions.dll <span style='color:#111;'> 20.63KB </span>","children":null,"spread":false},{"title":"Microsoft.Extensions.FileProviders.Physical.dll <span style='color:#111;'> 41.63KB </span>","children":null,"spread":false},{"title":"System.ServiceProcess.ServiceController.dll <span style='color:#111;'> 61.63KB </span>","children":null,"spread":false},{"title":"System.Diagnostics.EventLog.Messages.dll <span style='color:#111;'> 781.11KB </span>","children":null,"spread":false},{"title":"System.Diagnostics.EventLog.dll <span style='color:#111;'> 131.11KB </span>","children":null,"spread":false},{"title":"Microsoft.Extensions.Configuration.Binder.dll <span style='color:#111;'> 33.13KB </span>","children":null,"spread":false},{"title":"Microsoft.Extensions.Configuration.Json.dll <span style='color:#111;'> 25.13KB </span>","children":null,"spread":false},{"title":"Microsoft.Extensions.Primitives.dll <span style='color:#111;'> 39.11KB </span>","children":null,"spread":false},{"title":"System.ServiceProcess.ServiceController.dll <span style='color:#111;'> 33.13KB </span>","children":null,"spread":false},{"title":"appsettings.Development.json <span style='color:#111;'> 162B </span>","children":null,"spread":false},{"title":"Microsoft.Extensions.Configuration.dll <span style='color:#111;'> 35.61KB </span>","children":null,"spread":false},{"title":"System.Text.Json.dll <span style='color:#111;'> 497.60KB </span>","children":null,"spread":false},{"title":"Microsoft.Extensions.DependencyInjection.Abstractions.dll <span style='color:#111;'> 44.61KB </span>","children":null,"spread":false},{"title":"Microsoft.Extensions.Configuration.FileExtensions.dll <span style='color:#111;'> 25.61KB </span>","children":null,"spread":false},{"title":"Microsoft.Extensions.Hosting.Abstractions.dll <span style='color:#111;'> 27.13KB </span>","children":null,"spread":false},{"title":"Microsoft.Extensions.Logging.Configuration.dll <span style='color:#111;'> 26.11KB </span>","children":null,"spread":false},{"title":"Microsoft.Extensions.Logging.EventSource.dll <span style='color:#111;'> 34.63KB </span>","children":null,"spread":false},{"title":"Swashbuckle.AspNetCore.SwaggerUI.dll <span style='color:#111;'> 3.16MB </span>","children":null,"spread":false},{"title":"Microsoft.Extensions.Logging.Debug.dll <span style='color:#111;'> 17.63KB </span>","children":null,"spread":false},{"title":"Microsoft.Extensions.Logging.EventLog.dll <span style='color:#111;'> 23.63KB </span>","children":null,"spread":false},{"title":"Microsoft.Extensions.FileSystemGlobbing.dll <span style='color:#111;'> 43.13KB </span>","children":null,"spread":false},{"title":"WebApiNet_v5.pdb <span style='color:#111;'> 20.11KB </span>","children":null,"spread":false},{"title":"Microsoft.Extensions.Configuration.EnvironmentVariables.dll <span style='color:#111;'> 18.13KB </span>","children":null,"spread":false},{"title":"Microsoft.Extensions.Options.ConfigurationExtensions.dll <span style='color:#111;'> 22.13KB </span>","children":null,"spread":false},{"title":"WebApiNet_v5.runtimeconfig.json <span style='color:#111;'> 376B </span>","children":null,"spread":false},{"title":"System.Diagnostics.EventLog.dll <span style='color:#111;'> 52.60KB </span>","children":null,"spread":false},{"title":"Swashbuckle.AspNetCore.SwaggerGen.dll <span style='color:#111;'> 78.50KB </span>","children":null,"spread":false},{"title":"Swashbuckle.AspNetCore.Swagger.dll <span style='color:#111;'> 15.50KB </span>","children":null,"spread":false},{"title":"System.Runtime.CompilerServices.Unsafe.dll <span style='color:#111;'> 17.60KB </span>","children":null,"spread":false},{"title":"Microsoft.Extensions.Logging.Console.dll <span style='color:#111;'> 52.61KB </span>","children":null,"spread":false},{"title":"Microsoft.Extensions.Options.dll <span style='color:#111;'> 57.63KB </span>","children":null,"spread":false},{"title":"Microsoft.Extensions.Logging.Abstractions.dll <span style='color:#111;'> 62.11KB </span>","children":null,"spread":false},{"title":"web.config <span style='color:#111;'> 556B </span>","children":null,"spread":false},{"title":"appsettings.json <span style='color:#111;'> 327B </span>","children":null,"spread":false},{"title":"System.Diagnostics.DiagnosticSource.dll <span style='color:#111;'> 146.11KB </span>","children":null,"spread":false},{"title":"Microsoft.Extensions.Logging.dll <span style='color:#111;'> 43.61KB </span>","children":null,"spread":false},{"title":"WebApiNet_v5.deps.json <span style='color:#111;'> 131.77KB </span>","children":null,"spread":false},{"title":"Microsoft.Extensions.Configuration.CommandLine.dll <span style='color:#111;'> 22.61KB </span>","children":null,"spread":false},{"title":"Microsoft.Extensions.Configuration.Abstractions.dll <span style='color:#111;'> 24.63KB </span>","children":null,"spread":false},{"title":"Microsoft.Extensions.Configuration.UserSecrets.dll <span style='color:#111;'> 24.11KB </span>","children":null,"spread":false},{"title":"WebApiNet_v5.dll <span style='color:#111;'> 11.50KB </span>","children":null,"spread":false},{"title":"Microsoft.Extensions.Hosting.dll <span style='color:#111;'> 56.63KB </span>","children":null,"spread":false},{"title":"WebApiNet_v5.AssemblyInfoInputs.cache <span style='color:#111;'> 42B </span>","children":null,"spread":false},{"title":"apphost.exe <span style='color:#111;'> 123.00KB </span>","children":null,"spread":false},{"title":"WebApiNet_v5.csproj.AssemblyReference.cache <span style='color:#111;'> 172.10KB </span>","children":null,"spread":false},{"title":"WebApiNet_v5.GeneratedMSBuildEditorConfig.editorconfig <span style='color:#111;'> 516B </span>","children":null,"spread":false},{"title":"WebApiNet_v5.StaticWebAssets.Manifest.cache <span style='color:#111;'> 0B </span>","children":null,"spread":false},{"title":"WebApiNet_v5.StaticWebAssets.Pack.cache <span style='color:#111;'> 0B </span>","children":null,"spread":false},{"title":"WebApiNet_v5.pdb <span style='color:#111;'> 20.11KB </span>","children":null,"spread":false},{"title":"WebApiNet_v5.csproj.CopyComplete <span style='color:#111;'> 0B </span>","children":null,"spread":false},{"title":"WebApiNet_v5.RazorTargetAssemblyInfo.cache <span style='color:#111;'> 42B </span>","children":null,"spread":false},{"title":"_IsIncrementalBuild <span style='color:#111;'> 49B </span>","children":null,"spread":false},{"title":".NETCoreApp,Version=v5.0.AssemblyAttributes.cs <span style='color:#111;'> 198B </span>","children":null,"spread":false},{"title":"WebApiNet_v5.csproj.FileListAbsolute.txt <span style='color:#111;'> 7.95KB </span>","children":null,"spread":false},{"title":"......","children":null,"spread":false},{"title":"<span style='color:steelblue;'>文件过多,未全部展示</span>","children":null,"spread":false}],"spread":true}]

评论信息

免责申明

【只为小站】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【只为小站】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【只为小站】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,zhiweidada#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明