SAP web service method consume code doesn't work in Deployment
Steps to reproduce
I have a .NET Core Web API project that consumes a SAP web service. My project works well in the Visual Studio, feathers data from the SAP services, perfect. When this code deploy on a Windows server 2012 R2, the SAP service call fails. Deployment server contains required software installed and ready (Deployed a sample project in the same server without SAP call, it is working well. So I'm very sure that the server contains required software installed.) Move the same source code to the server and ran in Visual Studio, code working in Visual Studio on the Server too.
Now I suspect the binaries bundle (.DLLs, configurations etc) used in the deployment. Visual Studio 2017 publish option is used to bundle binaries.
Are yo guys recommending Visual Studio Publish option to bundle employable binaries or recommended to use CLI commands to bundle?
Are there any additional publish options to use/recommended?
Expected behavior
.NET Core web API should be able to call and get results from methods in SAP web service when the code is deployed.
Actual behavior
.NET Core web API call SAP method fails in the deployment but same code work well in the Visual Studio (in the same environment)
Environment data ( this is my Dev environment)
Product Information: Version: 2.1.202 Commit SHA-1 hash: 281caedada Runtime Environment: OS Name: Windows OS Version: 6.1.7601 OS Platform: Windows RID: win7-x64 Base Path: C:\Program Files\dotnet\sdk\2.1.202\
Microsoft .NET Core Shared Framework Host Version : 2.0.9 Build : 1632fa1589b0eee3277a8841ce1770e554ece037
publish from the command line and publish from vs are equivalent, though I will confess that I am not sure what you mean by bundle.
Without further details, I don't see how this is a CLI issue. Have you tried publishing from the command line and distributing the contents of the publish folder?
Bundle = Use the publish option to build deployable.
What is the error message you get? Are there logs? I am not familiar with SAP web services and don't know how ASP.NET Core interacts with it, but I without additional information, I can't say if this is an issue in your code, your deployment, in the .NET Core SDK or in ASP.NET.
Closing for lack of additional information.