我有一个使用ASMX服务的ASP.NET核心应用程序。当我使用Visual Studio或IIS的IIS Express运行它时,它可以正常工作(根据https://learn.microsoft.com/en-us/aspnet/core/publishing/iis)。如果我使用dotnet run(dotnet Publish),则在访问服务时会出现错误404。你能告诉我,这是什么原因?
错误404未找到文件目录。
1. Make sure all of your file after published are included.
2. To do that > on your Project Solution Explorer > select the folder where the file is content > Properties > Copy if Newer.
3. Clean > Rebuild > Publish.