Web Connection
Managing errors in REST app
Gravatar is a globally recognized avatar based on your email address. Managing errors in REST app
  Michele
  All
  Jun 21, 2022 @ 02:48am

We have a REST project and i need to know how to manage situations where the app has a program error and i want my app isn't stopped waiting for user interaction..... Which is the best solution in this case ? is there some document to help us to solve this situation ?

Thanks

Gravatar is a globally recognized avatar based on your email address. re: Managing errors in REST app
  Rick Strahl
  Michele
  Jun 21, 2022 @ 10:31am

Not sure what you're asking... Why would an API stop for user interaction?

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: Managing errors in REST app
  Michele
  Rick Strahl
  Jun 21, 2022 @ 12:30pm

I try to better explain my question. My app is not perfect; there can be errors.... Errors in programming or situations where i receive parameters not correct or other situations where the program hangs... So we have an error, a foxpro error, (Cancel, ignore). Ok with Sys(2335,1) i can disable UI access when running in COM mode..., but i need to log what is happened.... I need to know if web connection already has a function that let me to be sure that in case of error, this is logged and the app is restarted.. I see similar thing with foxincloud and i think it uses web connection function to do this

Thanks

Gravatar is a globally recognized avatar based on your email address. re: Managing errors in REST app
  Rick Strahl
  Michele
  Jun 21, 2022 @ 01:48pm

Hopefully you are running in COM mode?

You need to make sure:

  • DebugMode=off
  • You enable UnattendedMode=on

in your MyApp.ini.

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: Managing errors in REST app
  Michele
  Rick Strahl
  Jun 21, 2022 @ 01:55pm

While we were developing our app we used it in file mode.... Now we are beginning to use it in COM mode..... I think i'll need support in next days...

Thanks

Gravatar is a globally recognized avatar based on your email address. re: Managing errors in REST app
  Michele
  Rick Strahl
  Jun 22, 2022 @ 06:10am

I read the document you suggested and I went through every step, except the part about creating a virtual machine, and everything seems to work. Both in file mode and in COM mode. I had problems running myApp.EXE CONFIG. Here i have an error "Couldn't create virtual" and application cannot start. If, instead, i execute WebConnectionWebServer.EXE CONFIG (from weconnectionwebserver folder) my app works fine. Where is the problem ? I tried also to leave Virtual valeu empyt in myApp.ini file, but nothing changes. How can i solve the problem ? Another question: but i always have to run this file? If I don't run it, nothing works .... If it's not needed, I made a mistake, if needed, how can I make it always run automatically? The machine on which the application works is not normally accessible to anyone ... Thank you

Here is when i run myapp.exe CONFIG

And here when i run webconnectionwebserver.exe CONFIG

Gravatar is a globally recognized avatar based on your email address. re: Managing errors in REST app
  Rick Strahl
  Michele
  Jun 22, 2022 @ 09:19am

A Web Connection server has to be running in some way in order to process requests. If you're running in File Mode the server has to be started or set up for auto-start.

COM mode automatically starts instances as they are accessed.

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: Managing errors in REST app
  Michele
  Rick Strahl
  Jun 22, 2022 @ 09:29am

Ok. I know it... I don't understand why i have to run every time webconnectionwebserver.exe to have responses from my app....

I set my app called acutrest in com mode... If i try to use it it doesn't respond. If from webconnectionwebserver folder i run webconnectionwebserver. exe my app works fine... But i have this programmi working in my dos prompt where i see all requests... Not my app status panel.

Gravatar is a globally recognized avatar based on your email address. re: Managing errors in REST app
  Rick Strahl
  Michele
  Jun 22, 2022 @ 10:13am

If you're running in COM mode you shouldn't need WebConnectionWebServer.exe - that's meant to be a development server.

I recommend for production/COM operation you use the .NET module and IIS/IISExpress to test. If COM mode is set up correctly servers will auto-start. Use the Admin page to see what's going on.

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: Managing errors in REST app
  Michele
  Rick Strahl
  Jun 22, 2022 @ 01:00pm

The problem is that without running WebConnectionWebServer.EXE my app doesn't work both in file or in COM mode... It begins to send responses only after i open WebConnectionWebServer.EXE.... I don't know what to look for... It seems all correct... With mmc comexp.msc /32 i can see the COM object Even in admin page i can't enter without running WebConnectionWebServer.EXE .. All seems to work, but when i exit WebConnectionWebServer.EXE all pages begin to not respond

Suggests ?

Gravatar is a globally recognized avatar based on your email address. re: Managing errors in REST app
  Rick Strahl
  Michele
  Jun 22, 2022 @ 01:05pm

I don't think you understand how this works.

If you use the Web Connection Web Server you have to run that every time - that's the point of a standalone Web Server. It's a standalone executable and it's primarily meant as a development server.

If you want to run fully unattended you have to run in IIS which is always on once installed and started as a service. COM loading then automatically launches your FoxPro servers.

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: Managing errors in REST app
  Michele
  Rick Strahl
  Jun 22, 2022 @ 01:35pm

Ok i understand it.... I don't know why i am in this situation and i don't know what to do to have what you suggested...to work in IIS... I

Gravatar is a globally recognized avatar based on your email address. re: Managing errors in REST app
  Rick Strahl
  Michele
  Jun 22, 2022 @ 01:53pm

You said you read through the deployment section - maybe you should do it again and specifically read the section on setting up and configuring IIS.

You can try this on your local machine so that you can understand how it works before trying to deploy the application to a live server.

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: Managing errors in REST app
  Michele
  Michele
  Jun 22, 2022 @ 01:55pm

Delete all and do it again.... Now it works.....

Thanks for support

I hope you didn't loose to much time with me...................

© 1996-2024