0

I was working on a Project that consists of an ASP.NET Web service API (Framework 4.7) and a Library project. In order to generate the Help pages for my Web service, I applied the method in the following post's top rated answer : https://stackoverflow.com/a/21895258/14273666 It worked great during development.

When I published my project though, after creating my IIS site and application pool, My App_Data folder was not published along with the web service project. This can easily be fixed by moving the adding the App_Data folder to my project's IIS site folder, but requires manual action to be taken. How could I configure my project for this folder to be published with such a folder ?

Caelio
  • 19
  • 6
  • 1
    That's not what `App_Data` is for. HTTP/Web APIs typically publish their schema *and* documentation as [Swagger/OpenAPI docs](https://swagger.io/solutions/api-documentation/). This is a standard used by both developers *and* tooling. You can generate an API client automatically from its OpenAPI schema. Adding a UI like Swagger UI will display the operations, their DTOs and even allows executing operations with test data – Panagiotis Kanavos Dec 08 '22 at 09:22
  • You can use the [Swashbuckle library](https://github.com/domaindrivendev/Swashbuckle.WebApi) to add Swagger support to an ASP.NET Framework Web API project. [XML Comments are supported](https://github.com/domaindrivendev/Swashbuckle.WebApi#including-xml-comments) out of the box – Panagiotis Kanavos Dec 08 '22 at 09:25

1 Answers1

1

1- Create a publish profile

2- Edit the profile xml not to exclude App_Data from publish like this:

<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

  <PropertyGroup>
    ....
    <ExcludeApp_Data>False</ExcludeApp_Data>
    ...
  </PropertyGroup>
</Project>
MD Zand
  • 2,366
  • 3
  • 14
  • 25