Bug 2605

.Net web services issue 20 November, 2020

Marco Cimaroli
10 April, 2019
Product: PowerBuilder Category: Database
Version: 2017 R3 Build:
Classification: Publishing: Public
Priority: P3
Status: Verifying Reason:
Ken Guo @Appeon 20 November, 2020
#21
Hi Marco,

I would like to check with you if the response provided has been helpful enough
to resolve your case. If so, can we proceed to close the ticket?
Otherwise, do let us know if we can provide you with any further assistance and
keep in mind that you are always welcome to open another ticket in case you
need it.

Regards,
Ken
Ken Guo @Appeon 15 April, 2019
#20
Hi Marco,

Please check if there is any error in Windows event?
I suggest that you reinstall IIS and see if it resolves the issue. If it doesn’t resolve the issue, I still suggest that you try it on a new machine and see if you reproduce the issue. 

For the license issue, you can log out PB 2017 R3 license from your current machine and then log in on the new machine and log out again after you finish the test. 

Regards,
Ken
Marco Cimaroli 15 April, 2019
#19
(In reply to Ken Guo from comment #17)
Appeon Test Result

Hi Marco,

I wrote a small case locally but can’t reproduce the issue. Please see the
attached picture.
I suggest you use a clean machine with only IIS, ASA and PB 2017R3 installed
and try again.

Regards,
Ken
Hi Ken, i have deployed your example with the same results: w3wp.exe error. I have some difficulties to create another vm because i need another pb2017r3 license. It's non possible to trace the webservice call in a log file ? Thanks
Ken Guo @Appeon 15 April, 2019
#18
Appeon test case

Attached please find the code of my test case.
Ken Guo @Appeon 15 April, 2019
#17
Appeon Test Result

Hi Marco,

I wrote a small case locally but can’t reproduce the issue. Please see the attached picture.
I suggest you use a clean machine with only IIS, ASA and PB 2017R3 installed and try again.

Regards,
Ken
Marco Cimaroli 12 April, 2019
#16
pb2017_test_ws.png (71KB)

(In reply to Ken Guo from comment #15)
Hi Marco,

1) Whether it is OK if you use ODBC to connect to the database instead of
ado.net?
2) If the issue still exists, please try not to connect to any database,
instead, only use code like return ‘test’ and see whether it is OK.
3) The .Net Web Service functionality of Appeon PB is totally the same as
that of SAP PB 12.6. Meanwhile, we disconnect to maintain it and it is now
obsolete. So we don’t recommend you use it anymore. 

The subsequent Appeon PB versions will support C# functionality. Please
refer to the below roadmap for more details:
https://www.appeon.com/developers/roadmap 


Regards,
Ken
Hi Ken, ODBC test also generate w3wp.exe error, without database connection method return string without problems. See the attachment. I used Pb 12.5.2 only for a parallel test. Thanks Marco
Ken Guo @Appeon 12 April, 2019
#15
Hi Marco,

1) Whether it is OK if you use ODBC to connect to the database instead of ado.net?
2) If the issue still exists, please try not to connect to any database, instead, only use code like return ‘test’ and see whether it is OK.
3) The .Net Web Service functionality of Appeon PB is totally the same as that of SAP PB 12.6. Meanwhile, we disconnect to maintain it and it is now obsolete. So we don’t recommend you use it anymore. 

The subsequent Appeon PB versions will support C# functionality. Please refer to the below roadmap for more details:
https://www.appeon.com/developers/roadmap 


Regards,
Ken
Chris Pollach @Appeon 11 April, 2019
#14
Hi Mario;

    Thank you for that extra information and your patience on this issue! I will now transfer this ticket over to the main Support/Engineering team to see if they have ever seen this issue and can give you further advise on this problem.

    Also, please feel free to also post this question on the Appeon Community forum where other PB developers may have encountered this issue and found the cause.

FYI:  https://community.appeon.com

Regards ... Chris
Marco Cimaroli 11 April, 2019
#13
(In reply to Chris Pollach from comment #12)
Hi Marco;

  I have had a few weird "No Go" issues with IIS Web Services in the past
with a couple of Appeon PB customers. Never about a "w3wp.exe un-managed
exception" though .. very strange!

  The few other weird IIS customer issues I had last year were solved by
them installing the PB2017Rx IDE on the IIS server. That seemed to fix the
IIS issue (we have no idea what). Once their Web Services started to work
though, they could uninstall the IDE and just leave the PB.Net MSI
installation around to "run the show" so to speak.

Food for thought as a workaround to try & get you going.

Regards ... Chris
Hi Chris, thanks for your support but i already have PB2017R3 IDE on the same IIS computer. Marco
Chris Pollach @Appeon 11 April, 2019
#12
Hi Marco;

  I have had a few weird "No Go" issues with IIS Web Services in the past with a couple of Appeon PB customers. Never about a "w3wp.exe un-managed exception" though .. very strange!

  The few other weird IIS customer issues I had last year were solved by them installing the PB2017Rx IDE on the IIS server. That seemed to fix the IIS issue (we have no idea what). Once their Web Services started to work though, they could uninstall the IDE and just leave the PB.Net MSI installation around to "run the show" so to speak.

Food for thought as a workaround to try & get you going.

Regards ... Chris
Marco Cimaroli 11 April, 2019
#11
(In reply to Chris Pollach from comment #10)
Ahhh ... OK - Please proceed as follows:

1) Create a "PBPack.ini" file via your text editor.
2) Add the following to the new INI ...
   [Packager]
   DotNetComponents=1
3) Copy the "PBPack.ini" file to the PB "Shared" folder
4) Restart the PB Packager Utility
5) The missing PB.Net section should now appear
PB 2017 R3 .Net Runtime installed but i continue to have the issue: w3wp.exe unmanaged excpetion etc.. Marco
Chris Pollach @Appeon 11 April, 2019
#10
Ahhh ... OK - Please proceed as follows:

1) Create a "PBPack.ini" file via your text editor.
2) Add the following to the new INI ...
   [Packager]
   DotNetComponents=1
3) Copy the "PBPack.ini" file to the PB "Shared" folder
4) Restart the PB Packager Utility
5) The missing PB.Net section should now appear
Marco Cimaroli 11 April, 2019
#9
mypbpack.PNG (36KB)

(In reply to Chris Pollach from comment #7)
Just another thought ...

Did you run the PB Packager from PB2017R3 for *PB.Net*? IIS needs these
DLL's and the MSI will register certain DLL's in the GAC for you. See
attached
Hi Chris, i think this is the problem, i have no PB .Net choice on my pbpack17.exe, see the attached file Thanks
Chris Pollach @Appeon 11 April, 2019
#8
PB.Net MSI
Chris Pollach @Appeon 11 April, 2019
#7
Just another thought ...

Did you run the PB Packager from PB2017R3 for *PB.Net*? IIS needs these DLL's and the MSI will register certain DLL's in the GAC for you. See attached
Chris Pollach @Appeon 11 April, 2019
#6
Hi Marco;

   Thank you for that extra information!

FYI: I am successfully utilizing PB web services built from PB2017R3 and PB2019 Beta#2 without issue on my W10 PC's using IIS v10. However, these Mobile & Web application are connecting to ASE, SA, PostGreSQL & SS using either ODBC or a native DB driver - not ADO.net.

  I will now transfer this ticket over to the main Support/Engineering team to see if they can supply any more insights into using ADO.Net within IIS.

Regards ... Chris
Marco Cimaroli 11 April, 2019
#5
(In reply to Chris Pollach from comment #4)
 Hi Marco;

  Yes, this is really streange if the same PB 12.5.x Web Service with
ADO.Net is working 100% on the *same* IIS server instance. The only
difference would be the PB run-time DLL's, there accessibility from II and
their some DLL registrations thereof in the GAC.

Regards ... Chris
Hi Chris, yes i think the problem is on GAC or other similar registration of PB 2017 runtime, i also executed pbruntime.msi (located under ...\DONET\pbiu\BootStrapper\Packages\1-PBRuntime) but i continue to have the issue. I made another test changing db server using a Postgres server, it works fine under Pb 12.5.2 but not with Pb 2017 R3 !!!!! Marco
Chris Pollach @Appeon 10 April, 2019
#4
 Hi Marco;

  Yes, this is really streange if the same PB 12.5.x Web Service with ADO.Net is working 100% on the *same* IIS server instance. The only difference would be the PB run-time DLL's, there accessibility from II and their some DLL registrations thereof in the GAC.

Regards ... Chris
Marco Cimaroli 10 April, 2019
#3
(In reply to Chris Pollach from comment #2)
Hi Marco;
 
  A "w3wp.exe" error typically points to an issue with the Web Services
"Application Pool" within IIS. This could also be related to your ADO.net
configuration as defined within IIS itself.

FYI: 
https://docs.microsoft.com/en-us/iis/application-frameworks/scenario-build-
an-aspnet-website-on-iis/configuring-step-3-configure-data-source-settings

Regards ... Chris
Chris, in IIS manager/Connections string i only find SqlServer config options. I don't thing what to do. Why Powerbuilder 12.5.2 web service, with the same code, works fine ? Thanks
Chris Pollach @Appeon 10 April, 2019
#2
Hi Marco;
 
  A "w3wp.exe" error typically points to an issue with the Web Services "Application Pool" within IIS. This could also be related to your ADO.net configuration as defined within IIS itself.

FYI:  https://docs.microsoft.com/en-us/iis/application-frameworks/scenario-build-an-aspnet-website-on-iis/configuring-step-3-configure-data-source-settings

Regards ... Chris
Marco Cimaroli 10 April, 2019
#1
ws_error.PNG (19KB)

I deployed a very simple .net web service on localhost IIS, it has a method to connect to ASA 12 Server local connection using Ado.Net [hstudio12ws is a System DSN (see the script below)

String ls_ret

SQLCA.DBMS = "ADO.Net"
SQLCA.AutoCommit = False
SQLCA.DBParm = "Namespace='iAnywhere.Data.SQLAnywhere',DataSource='hstudio12ws'"

CONNECT ;

IF SQLCA.SQLCODE=0 THEN
 	ls_ret = 'Connect OK'
ELSE
	ls_ret= 'Connect KO ' +SQLCA.sqlerrtext
END IF
RETURN ls_ret

I get the following error: w3wp.exe [15636] and others visual studio JIT errors

The same web service deployed using PowerBuilder 12.5.2 works fine !!!

Thanks
OS:
Windows 10
Platform:
32-bit
Database Type:
SAP SQL Anywhere
Database Version:
12