Search code examples
bcdynamics-business-central

Business Central copied environment - Could not open the '' company


What I am trying to do is copy a Business Central environment. Done it before without issue but this time it does not allow me to login.

Here's the steps:

  1. In Admin Center / Environments / +New
  2. Selected an environment name: Sandbox3.
  3. Selected Sandbox as Type.
  4. Select to copy the production environment.
  5. Create environment.
  6. Waited until the environment is Active.
  7. Logged into the new environment.
  8. After entering credentials, receive the error message "Could not open the '' company. The request was blocked by the runtime to prevent accidental use of production services.

I am able to log into the production environment without any issues.

Business Central Version: 17.4.21491.21531

Does anybody have any idea what could cause this issue?

Thanks for the assistance.


Solution

  • It might be caused by an extension subscribing to the OnOpenCompany event. If that extension fires a HttpWebRequest, it will be blocked in the sandbox.

    This is because Allow HttpClient Requests is disabled for all extensions, when a production environment is copied.