{"record":{"id":"f6d823ff9949ecd8","repo":"nopSolutions/nopCommerce","slug":"azure-end-point-for-blob-is-not-specified","errorCode":null,"errorMessage":"Azure end point for Blob is not specified","messagePattern":"Azure end point for Blob is not specified","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"src/Plugins/Nop.Plugin.Misc.AzureBlob/Services/AzureThumbService.cs","lineNumber":63,"sourceCode":"\n    #region Utilities\n\n    /// <summary>\n    /// Initialize cloud container\n    /// </summary>\n    private void Init()\n    {\n        if (_isInitialized)\n            return;\n\n        if (string.IsNullOrEmpty(_azureBlobSettings.ConnectionString))\n            throw new Exception(\"Azure connection string for Blob is not specified\");\n\n        if (string.IsNullOrEmpty(_azureBlobSettings.ContainerName))\n            throw new Exception(\"Azure container name for Blob is not specified\");\n\n        if (string.IsNullOrEmpty(_azureBlobSettings.EndPoint))\n            throw new Exception(\"Azure end point for Blob is not specified\");\n\n        lock (_locker)\n        {\n            if (_isInitialized)\n                return;\n\n            _azureBlobStorageAppendContainerName = _azureBlobSettings.AppendContainerName;\n            _azureBlobStorageConnectionString = _azureBlobSettings.ConnectionString;\n            _azureBlobStorageContainerName = _azureBlobSettings.ContainerName.Trim().ToLowerInvariant();\n            _azureBlobStorageEndPoint = _azureBlobSettings.EndPoint.Trim().ToLowerInvariant().TrimEnd('/');\n\n            _blobServiceClient = new BlobServiceClient(_azureBlobStorageConnectionString);\n            _blobContainerClient = _blobServiceClient.GetBlobContainerClient(_azureBlobStorageContainerName);\n\n            _blobContainerClient.CreateIfNotExistsAsync(PublicAccessType.Blob).Wait();\n\n            _isInitialized = true;\n        }","sourceCodeStart":45,"sourceCodeEnd":81,"githubUrl":"https://github.com/nopSolutions/nopCommerce/blob/64bdf2ff08c8b39e65717bcf974fb43dc2ef68f2/src/Plugins/Nop.Plugin.Misc.AzureBlob/Services/AzureThumbService.cs#L45-L81","documentation":"Thrown by AzureThumbService.Init when AzureBlobSettings.EndPoint is null or empty. It is the third sequential config check; the endpoint is used to build blob URLs (Trim().ToLowerInvariant().TrimEnd('/')).","triggerScenarios":"The Azure Blob plugin is configured with connection string and container but the custom endpoint (CDN or custom domain) field is blank. Init runs on first media operation.","commonSituations":"Admin left the endpoint blank; using the default endpoint but the field is required; settings saved to the wrong store scope; migrating configs and dropping the endpoint value.","solutions":["Provide the blob endpoint/base URL in the plugin configuration (e.g. https://<account>.blob.core.windows.net or your CDN domain) and save.","Save the setting for the correct store scope.","Ensure the value is non-empty after trim (not just whitespace)."],"exampleFix":"// before: EndPoint = \"\"\n// after:\nsettings.EndPoint = \"https://mystore.blob.core.windows.net\";\nawait _settingService.SaveSettingAsync(settings, storeScope);","handlingStrategy":"validation","validationCode":"if (string.IsNullOrEmpty(_azureBlobSettings.EndPoint))\n    throw new InvalidOperationException(\"Configure the Azure Blob endpoint before use.\");","typeGuard":"static bool HasEndPoint(AzureBlobSettings s) => !string.IsNullOrWhiteSpace(s.EndPoint);","tryCatchPattern":"try { _azureThumbService.GetThumbUrl(...); }\ncatch (Exception ex) when (ex.Message.Contains(\"end point for Blob\"))\n{ logger.Error(\"Azure Blob endpoint missing.\", ex); }","preventionTips":["Provide the endpoint/CDN base URL in config.","Trim trailing slashes (the code does, but keep it clean).","Validate the full AzureBlobSettings object before enabling the plugin."],"tags":["azure","plugins","blob-storage","config","cdn","media"],"backgroundTag":null,"analyzedSha":"64bdf2ff08c8b39e65717bcf974fb43dc2ef68f2","analyzedAt":"2026-08-13T21:19:38.062Z","schemaVersion":2},"datasetVersion":"2026-08-14T00:17:13.853Z"}