Sumit Chourasia
Sumit Chourasia

Reputation: 2434

SAP RFC libraries not working with IIS server

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.

Upvotes: 1

Views: 402

Answers (1)

David Stewart
David Stewart

Reputation: 11

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>

Upvotes: 0

Related Questions