Recent

Author Topic: [SOLVED] fcl-web Duplicate name Lazarus 1.8.0  (Read 3335 times)

Mladen

  • New Member
  • *
  • Posts: 30
[SOLVED] fcl-web Duplicate name Lazarus 1.8.0
« on: December 11, 2017, 09:21:03 am »
Hello, I am in need of some help.

My project is HTTP Server application.
After updating to Lazarus 1.8.0 (fpc 3.0.4) I have began to experience some strange behavior.
When for example after sending the first request to my application I get a response without error.
But after I have sent the same request a 2nd time I get an error with a message  " Duplicate name: A component named "FPMobile" already exists ".

I have tried to create a new HTTP Server application with one module and one action that returns simple text and I still get the same error after 2nd request.
I didn't and still don't have this issue with Lazarus 1.6.4 fpc 3.0.2.

Thank you all!
« Last Edit: December 11, 2017, 10:57:11 am by Mladen »
Using Lazarus 2.0.12 with FPC 3.2.2 on Linux Mint 20.2 Xfce

howardpc

  • Hero Member
  • *****
  • Posts: 4144
Re: fcl-web Duplicate name Lazarus 1.8.0
« Reply #1 on: December 11, 2017, 10:12:10 am »
In a similar message on the mailing list, M VanCanneyt wrote that you should set the TCustomHTTPModule descendant's Kind property to wkOneShot, so you could try that.

nummer8

  • Full Member
  • ***
  • Posts: 106
Re: fcl-web Duplicate name Lazarus 1.8.0
« Reply #2 on: December 11, 2017, 10:42:24 am »
Just to be sure.
Did you set
Application.LegacyRouting:= True
So the application doesnot use the new routing system and handles the modules in the old fashioned way

Jos

molly

  • Hero Member
  • *****
  • Posts: 2330
Re: fcl-web Duplicate name Lazarus 1.8.0
« Reply #3 on: December 11, 2017, 10:51:03 am »
Oh, my.

Thank you very much for that note nummer8.

I still use legacy compiler/units for production and seem to have missed that completely . More information here.

Mladen

  • New Member
  • *
  • Posts: 30
Re: fcl-web Duplicate name Lazarus 1.8.0
« Reply #4 on: December 11, 2017, 10:56:17 am »

Application.LegacyRouting:= True


This fixed the issue !!!
Thank you so much!!
Using Lazarus 2.0.12 with FPC 3.2.2 on Linux Mint 20.2 Xfce

PascalDragon

  • Hero Member
  • *****
  • Posts: 5444
  • Compiler Developer
Re: [SOLVED] fcl-web Duplicate name Lazarus 1.8.0
« Reply #5 on: January 13, 2018, 08:33:02 pm »
But after I have sent the same request a 2nd time I get an error with a message  " Duplicate name: A component named "FPMobile" already exists ".

Just for completeness sake: this is now fixed in trunk. See this bug report of mine as I had encountered the same problem.

 

TinyPortal © 2005-2018