Inhalte aufrufen

Profilbild

Invalid operation. The connection is closed Error

browserfehler shop darstellung

  • Bitte melden Sie sich an, um eine Antwort zu verfassen.
3 Antworten zu diesem Thema

#1 netroskop

netroskop

    Member

  • Members
  • PunktPunkt
  • 20 Beiträge

Geschrieben: 09 March 2023 - 17:05

Hello, when I am saving data in a module I have developed, when I do the "Save and Continue" operation twice in a row, I get an "Invalid operation. The connection is closed." error.

 

 

CPU goes to 100%. The application stops and restarts. However, such an error does not occur during the successive saving process on smartstore screens.

 

Where could I be going wrong?



#2 stefanmueller

stefanmueller

    SmartStore AG

  • Administrators
  • 461 Beiträge

Geschrieben: 13 March 2023 - 12:32

Hi netroskop, please provide a full report of this (and your custom module) on   Greetings,Stefan


Stefan


#3 netroskop

netroskop

    Member

  • Members
  • PunktPunkt
  • 20 Beiträge

Geschrieben: 29 March 2023 - 06:07

Hello, I solved this problem. Let me share the details in order to help those who experience similar errors later.

 

Problem; It was happening when I tried to pull data from a database again after await db.SaveChangesAsync() .

 

Since the database connection was disposed after the SaceChanges operation, I was getting the error "Connection could not be established" in the second operation.

 

When I changed the order of the operations, the error went away.



#4 stefanmueller

stefanmueller

    SmartStore AG

  • Administrators
  • 461 Beiträge

Geschrieben: 03 April 2023 - 13:13

Hi netroskop, thanks for your report! Greetings Stefan


Stefan