1

I am using SAP Connector Core Library to fetch SAP data using RFC, though my changes are working perfectly with the Kestrel server, but it is not working with IIS.

I am using the following libraries which I have downloaded from SAP website.

enter image description here

and I have installed the ASP.NET Core Module/Hosting Bundle

and on checking the log at location C:\Windows\System32\LogFiles\HTTPERR\httperr1.log am getting

2023-03-10 02:36:26 ::1%0 53017 ::1%0 4430 HTTP/2 GET /home/GetSapData 25 - 4 
Connection_Abandoned_By_ReqQueue PublishCode
2023-03-10 02:38:33 ::1%0 53017 ::1%0 4430 - - - - - - Timer_ConnectionIdle -
2023-03-10 02:41:26 ::1%0 53064 ::1%0 4430 HTTP/2 GET /home/GetSapData 1 503 4 AppOffline 
PublishCode
2023-03-10 02:43:34 ::1%0 53064 ::1%0 4430 - - - - - - Timer_ConnectionIdle -

I have checked multiple things in IIS but nothing worked:

  1. I tried changing Enable 32-Bit Applications to true in Application pool.
  2. I tried Increasing the Recycling Private Memory Limit in Recycling part of Application pool
  3. I tried increasing cache output size

I have been struggling for past 1 week to make it work in IIS, while in Kestrel server the same location code it is working perfectly.

Any help would be highly appreciated.

Sandra Rossi
  • 11,934
  • 5
  • 22
  • 48
Sumit Chourasia
  • 2,394
  • 7
  • 30
  • 57
  • could you try setting up the iis application pool to the no managed code. if it does not work could you enable failed request tracing and collect the logs for the 300-500 status code – Jalpa Panchal Mar 10 '23 at 13:54
  • 1. You need to use a tool like `dumpbin` to verify the bitness of SAP files and determine the application pool bitness, not guessing around. 2. Open Windows application log to see if there are a lot of entries for `w3wp` process crashes. With that there can be further discussions. – Lex Li Mar 11 '23 at 01:25
  • Any reason why you use unofficial connector instead of the official [NCo 3.1](https://support.sap.com/en/product/connectors/msnet.html?anchorId=section)? – Suncatcher Aug 21 '23 at 02:43

1 Answers1

0

We had a similar problem, SAP RFC communication from .NET Core working fine out of IIS, but not within. After much experimentation, it seemed to solve the issue to run our web API project out-of-process. In this mode, IIS is working as a reverse proxy to kestrel, which you have working already. Specifically, you enable this in the project file by setting:

<AspNetCoreHostingModel>OutOfProcess</AspNetCoreHostingModel>