Transfer the WebApi application to another PC, test it, without a development environment?

Markus Freitag 3,521 Reputation points



The target machine needs a host like IIS to host Web API.

We have no idea how your network is setup so we can't provide much information.

I use Windows10 Prof.

I have written a server that I now need to install on the target machine.

C# Desktop App is installed on the target computer.

Both are installed locally on the PC.

The link described is difficult to understand if I have never created it.

Do you have or know a good youtube installation video?

Picture Server


Which files from the server need to go to the target computer and to which location?

Internet Information Services
A set of technologies in the .NET Framework for building web applications and XML web services.
1,722 questions
{count} votes

Accepted answer
  1. Bruce ( 48,711 Reputation points

    as you have a app to deploy, on the target machine:

    1. install IIS with .net 4.* support
    2. create a folder to publish to
    3. create an application. pointing to the publish folder. be sure the app pool account has access to the folder
    4. from the app machine do a folder publish the publish folder you created on the target machine.


2 additional answers

Sort by: Most helpful
  1. P a u l 9,976 Reputation points

    Here's a very quick tutorial video about how you would deploy a Web API project on your local development machine to IIS:

    Importantly he explains how to "Publish" the project, rather just building it. In your screenshot you're showing the build output of your project, which is fine to use as your "Physical path" when developing locally, but in production (i.e. on your server) you'll want to point IIS at the published path instead.

    This shows how to do the setup on the server, view it over localhost & even how to reveal the app to your network by using your network private IP, but how you expose the API to the public is entirely up to you/your network admin.

    0 comments No comments

  2. Lex Li (Microsoft) 4,031 Reputation points

    Only ASP.NET Core makes it simple and easy to develop and test on any machine you like,

    1. Create a new folder on your dev machine.
    2. Install .NET SDK (for any of .NET 6/7/8).
    3. Open command prompt and navigate to that folder.
    4. Use dotnet new webapi to generate a sample project (REST API).
    5. Use dotnet run to test it locally.
    6. Use dotnet publish --self-contained -r win-x64 to generate Windows x64 deployment artifacts (runtime is bundled, so no need to install extra runtime on target machine).
    7. Copy the artifacts to any Windows x64 machine like your test machine and launch it there (Kestrel self hosting is used, so no need to install IIS).

    The sample project can easily walk you through all the steps above. Then you can copy/paste most of the code from controllers of your existing project so as to finish ASP.NET 4.x to ASP.NET Core migration.