简体   繁体   中英

Visual Studio 2019 - Web Deploy to local IIS

I've got a .NET 5 web api I'm trying to get deployed (for development/staging) on a local IIS. I've actually been doing this just fine for a couple of years now, but something changed and now it isn't deploying. The web deploy succeeds (according to Visual Studio), but instead of putting the files in the IIS website folder, it puts all of the files in the VS project folder . It literally fills up my project folder with.dlls that are meant for the target deployment folder.

For example, in my Build/Output window:

Adding file (devapi.mysite.com\api-ms-win-core-console-l1-1-0.dll).
Adding file (devapi.mysite.com\api-ms-win-core-console-l1-2-0.dll).
Adding file (devapi.mysite.com\api-ms-win-core-datetime-l1-1-0.dll).
(and a few hundred more...)

项目文件夹

I am unsure of what change caused the web deploy to fail. I recently updated Visual Studio to 16.11.11 and also updated several of my NuGet packages.

Searches (at least mine anyway) didn't come up with any solution. I did verify that I had everything in place by referencing this doc:

https://learn.microsoft.com/en-us/visualstudio/deployment/tutorial-import-publish-settings-iis?view=vs-2022

And as I said, Visual Studio reports that the publish was successful:

在此处输入图像描述

But upon deploy, I get 503 Service Unavailable from IIS.

No clue how this got changed... In IIS, go to your website, click on "Basic Settings...", and check the Physical path. Mine had somehow been reset to my project folder instead of the .netpub web deploy folder. Problem solved.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM