Models Builder Custom Tool Failing with HTTP Status "Redirect"
I am running Models Builder in Umbraco 8.17.1. It is, I believe, in API mode. We have a Models project, in which we use the custom tool in Visual Studio to update the models, which are generated.cs files.
The custom tool has been failing today. The error is:
UmbracoModelsBuilder: Starting v8.0.5 1/31/2023 11:12:15 AM.
UmbracoModelsBuilder: UmbracoModelsBuilder failed to generate code:
Exception: Response status code does not indicate success
(Redirect)
UmbracoModelsBuilder: at
Umbraco.ModelsBuilder.Api.ApiClient.EnsureSuccess(HttpResponseMessage
result) at
Umbraco.ModelsBuilder.Api.ApiClient.GetModels(Dictionary`2 ourFiles,
String modelsNamespace) at
Umbraco.ModelsBuilder.CustomTool.CustomTool.UmbracoModelsBuilder.GenerateRaw(String
wszInputFilePath, String wszDefaultNamespace, IntPtr[]
rgbOutputFileContents, UInt32& pcbOutput, String& errMsg)
Looking through the Models Builder code from GitHub, this seems to indicate that calling the Get Models endpoint in the ModelsBuilderAPI in the Umbraco backoffice returns some type of 300 status code. The Umbraco Website that we have registered with Visual Studio is running and I am able to access the backoffice with no trouble.
Does anyone know what this return value from the API endpoint might indicate?
Thanks for the suggestion. We do have rewrites for alternate URLs on our servers. However, the base web.config, which the local IIS uses, doesn't have any.
As a follow-up: There were issues with the check in of the solution in DevOps. These were cleared up and now the custom tool works perfectly. It must have had something to do with those issues.
Models Builder Custom Tool Failing with HTTP Status "Redirect"
I am running Models Builder in Umbraco 8.17.1. It is, I believe, in API mode. We have a Models project, in which we use the custom tool in Visual Studio to update the models, which are generated.cs files.
Our setup in config is as follows:
The custom tool has been failing today. The error is:
Looking through the Models Builder code from GitHub, this seems to indicate that calling the Get Models endpoint in the ModelsBuilderAPI in the Umbraco backoffice returns some type of 300 status code. The Umbraco Website that we have registered with Visual Studio is running and I am able to access the backoffice with no trouble.
Does anyone know what this return value from the API endpoint might indicate?
Thanks for any help.
Angus
Hi Angus,
Do you have rewrite rules implemented on your website ?
That could be the cause of this.
Dave
Hi Dave,
Thanks for the suggestion. We do have rewrites for alternate URLs on our servers. However, the base web.config, which the local IIS uses, doesn't have any.
As a follow-up: There were issues with the check in of the solution in DevOps. These were cleared up and now the custom tool works perfectly. It must have had something to do with those issues.
Angus
is working on a reply...