在我的 .Net 框架应用程序中,"startup.cs"(.Net Core) 的等价物是什么?

what is the equivalent of "startup.cs"(.Net Core) in my .Net framework application?

Startup.cs 有一些方法可用于配置 swagger 以添加文件上传功能,现在我可以在 .NET Framework 中的哪个文件中执行相同的功能?

正如您所说,您希望在 dot net frameworkconfigure Swagger,因此您需要 install Swashbuckle 只需打开 package manager 并输入以下内容 commands

Install-Package Swashbuckle -Version 5.6.0

然后查看您的 App_Start 文件,您会发现 SwaggerConfig.cs 您可以在其中配置它

最小值,你需要这条线到 enable Swagger and Swagger UI

GlobalConfiguration.Configuration
  .EnableSwagger(c => c.SingleApiVersion("v1", "A title for your API"))
  .EnableSwaggerUi();

Look here for long Explanation