1. John Raghanti
  2. PowerServer
  3. Thursday, 5 September 2024 17:25 PM UTC

Hi. I'm running PB2022 R3 build 3356.

I got one app up and running through PowerServer in both within the IDE and external IIS.

I am working on a second one, which I got functioning within the IDE with a Cache created in the project. Everything was looking good. I went and took the steps to create dynamic caching by using SnapDevelop to modify the files to be exactly the same as the first app, pointing to the cache database.

As soon as I did that, I am getting "Application not found" errors.

I browse out to: http://localhost:5381/api/Application/LoadAll and I get a JSON list, but it only shows the original app. Could someone tell me where this data lives and if I can modify it? If not, is there a trick to deploying multiple apps? Thank you!

[
  {
    "applicationname": "emrmanager_cloud",
    "configuration": {
      "maxspcache": 50,
      "runmode": 0,
      "session": {
        "timeout": 10800
      },
      "request": {
        "timeout": 10800
      },
      "transaction": {
        "timeout": 3600,
        "transactionexception": true
      },
      "cloudtransactions": {

      }
    }
  }
]
Accepted Answer
John Raghanti Accepted Answer Pending Moderation
  1. Tuesday, 10 September 2024 11:03 AM UTC
  2. PowerServer
  3. # Permalink

I had to add the new application to the PowerServer_ApplicationConfig table that was created in the Cache database. Then it worked as expected.

Comment
There are no comments made yet.
Logan Liu @Appeon Accepted Answer Pending Moderation
  1. Tuesday, 10 September 2024 02:40 AM UTC
  2. PowerServer
  3. # 1

Hi John,

It is not recommended to build and deploy multiple apps within a single Web API C# solution. Instead, create a separate C# solution for each app. This approach ensures that maintaining the applications in the future will not cause deployment conflicts.

However, if you insist on deploying multiple apps within the same C# solution, please ensure the second app’s name is included in the Applications.json file. Otherwise, you will see the "Application not found" error.

For example, if you create a new PowerServer project in PB IDE with the app name salesdemo_cloud2, after deploying it to the C# solution generated by the salesdemo_cloud app, you should see salesdemo_cloud2 listed in the Applications.json file.

{
  "Applications": {
    "salesdemo_cloud2": {
      "CloudTransactions": {
        "sqlca": {
          "CacheName": "sales"
        }
      },
      "Transaction": {
        "Timeout": 120,
        "TransactionException": true
      },
      "Session": {
        "Timeout": 3600
      },
      "Request": {
        "Timeout": 3600
      },
      "RunMode": 0,
      "MaxSPCache": 50
    },
    "salesdemo_cloud": {
      "CloudTransactions": {
        "sqlca": {
          "CacheName": "sales"
        }
      },
      "Transaction": {
        "Timeout": 120,
        "TransactionException": true
      },
      "Session": {
        "Timeout": 3600
      },
      "Request": {
        "Timeout": 3600
      },
      "RunMode": 0,
      "MaxSPCache": 50
    }
  },
  "Connections": {
    "Default": {
      "sales": {
        "ConnectionType": "XXX",
        "OdbcName": "PB Demo DB V2022R3",
        "OdbcDriver": "XXX",
        "UserID": "dba",
        "Password": "XXX",
        "CommandTimeout": 30,
        "SecurityOptions": null,
        "OtherOptions": null,
        "DynamicConnection": false
      }
    }
  }
}

Regards, Logan

Comment
There are no comments made yet.
Francisco Martinez @Appeon Accepted Answer Pending Moderation
  1. Thursday, 5 September 2024 17:55 PM UTC
  2. PowerServer
  3. # 2

Hi John,

Do you by any chance have just recently run the manager app? Make sure that any CMD windows that were opened by PB are closed. This CMD window is what's serving the application, so if you kept the previous one open it's serving the previous application (the manager). You need to close this and then run the client from from IDE, this will open another CMD but this time serving the client's Web API.

 

Regards,
Francisco

Comment
  1. John Raghanti
  2. Friday, 6 September 2024 17:26 PM UTC
Here it is. I checked it without dynamic caching and with it. It didn't change.



{

"Applications": {

"emrclient_cloud": {

"CloudTransactions": {

"SQLCA": {

"CacheName": "Dev211"

}

},

"Transaction": {

"Timeout": 3600,

"TransactionException": true

},

"Session": {

"Timeout": 10800

},

"Request": {

"Timeout": 10800

},

"RunMode": 0,

"MaxSPCache": 50

}

},

"Connections": {

"Default": {

"Dev211": {

"ConnectionType": "SqlServer",

"Database": "MicroMD",

"Host": "10.22.20.111\\v210",

"Port": null,

"UserID": null,

"Password": null,

"EnablePooling": true,

"MinPoolSize": 0,

"MaxPoolSize": 100,

"ConnectionLifetime": 0,

"ConnectionTimeout": 15,

"CommandTimeout": 30,

"SecurityOptions": "encrypt=False",

"OtherOptions": null,

"DynamicConnection": true

},

"Ref205": {

"ConnectionType": "SqlServer",

"Database": "MicromdEmrRef",

"Host": "10.22.20.111\\v210",

"Port": null,

"UserID": null,

"Password": null,

"EnablePooling": true,

"MinPoolSize": 0,

"MaxPoolSize": 100,

"ConnectionLifetime": 0,

"ConnectionTimeout": 15,

"CommandTimeout": 30,

"SecurityOptions": "encrypt=False",

"OtherOptions": null,

"DynamicConnection": true

}

}

}

}
  1. Helpful
  1. Francisco Martinez @Appeon
  2. Monday, 9 September 2024 15:31 PM UTC
There's no reason why the Web APIs are giving you a value different from that of the files. Are the Web APIs using DB-backed configuration?
  1. Helpful
  1. Francisco Martinez @Appeon
  2. Monday, 9 September 2024 15:32 PM UTC
Where are you setting Dynamic Caching?
  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.