Model builder api unable to communicate with server
Hi all,
I am trying to get to grips with the ModelsBuilder in Umbraco but it seems very flaky at best.
I have a version of my website on my local IIS and I am trying to connect to this via a file in my .core project but I keep getting the following errors:
UmbracoModelsBuilder: at Umbraco.ModelsBuilder.Api.ApiClient.EnsureSuccess(HttpResponseMessage result)
at Umbraco.ModelsBuilder.Api.ApiClient.ValidateClientVersion()
at Umbraco.ModelsBuilder.CustomTool.CustomTool.UmbracoModelsBuilder.GenerateRaw(String wszInputFilePath, String wszDefaultNamespace, IntPtr[] rgbOutputFileContents, UInt32& pcbOutput, String& errMsg)
UmbracoModelsBuilder: Starting v3.0.6.97 08/04/2017 16:23:11.
UmbracoModelsBuilder: UmbracoModelsBuilder failed to generate code: Exception: Response status code does not indicate success (Forbidden)
"API server does not want to talk to you."
UmbracoModelsBuilder: at Umbraco.ModelsBuilder.Api.ApiClient.EnsureSuccess(HttpResponseMessage result)
at Umbraco.ModelsBuilder.Api.ApiClient.ValidateClientVersion()
at Umbraco.ModelsBuilder.CustomTool.CustomTool.UmbracoModelsBuilder.GenerateRaw(String wszInputFilePath, String wszDefaultNamespace, IntPtr[] rgbOutputFileContents, UInt32& pcbOutput, String& errMsg)
UmbracoModelsBuilder: Starting v3.0.6.97 08/04/2017 16:23:38.
UmbracoModelsBuilder: UmbracoModelsBuilder failed to generate code: Exception: Response status code does not indicate success (Forbidden)
"API server does not want to talk to you."
UmbracoModelsBuilder: at Umbraco.ModelsBuilder.Api.ApiClient.EnsureSuccess(HttpResponseMessage result)
at Umbraco.ModelsBuilder.Api.ApiClient.ValidateClientVersion()
at Umbraco.ModelsBuilder.CustomTool.CustomTool.UmbracoModelsBuilder.GenerateRaw(String wszInputFilePath, String wszDefaultNamespace, IntPtr[] rgbOutputFileContents, UInt32& pcbOutput, String& errMsg)
UmbracoModelsBuilder: Starting v3.0.6.97 08/04/2017 16:27:30.
UmbracoModelsBuilder: UmbracoModelsBuilder failed to generate code: Exception: Response status code does not indicate success (Forbidden)
"API server does not want to talk to you."
UmbracoModelsBuilder: at Umbraco.ModelsBuilder.Api.ApiClient.EnsureSuccess(HttpResponseMessage result)
at Umbraco.ModelsBuilder.Api.ApiClient.ValidateClientVersion()
at Umbraco.ModelsBuilder.CustomTool.CustomTool.UmbracoModelsBuilder.GenerateRaw(String wszInputFilePath, String wszDefaultNamespace, IntPtr[] rgbOutputFileContents, UInt32& pcbOutput, String& errMsg)
UmbracoModelsBuilder: Starting v3.0.6.97 08/04/2017 16:29:12.
UmbracoModelsBuilder: UmbracoModelsBuilder failed to generate code: Exception: Response status code does not indicate success (Forbidden)
"API server does not want to talk to you."
UmbracoModelsBuilder: at Umbraco.ModelsBuilder.Api.ApiClient.EnsureSuccess(HttpResponseMessage result)
at Umbraco.ModelsBuilder.Api.ApiClient.ValidateClientVersion()
at Umbraco.ModelsBuilder.CustomTool.CustomTool.UmbracoModelsBuilder.GenerateRaw(String wszInputFilePath, String wszDefaultNamespace, IntPtr[] rgbOutputFileContents, UInt32& pcbOutput, String& errMsg)
Ahh thanks, you're right, it needs debug mode set to true. I always forget to do this and have to revisit this page everytime I start a new build!
In case anyone is wondering, hit F5 from Visual Studio to debug the website the first time you run it like this, and Enable Debugging and it will edit it for you...then stop the site and rerun ModelsBuilder.
Model builder api unable to communicate with server
Hi all,
I am trying to get to grips with the ModelsBuilder in Umbraco but it seems very flaky at best.
I have a version of my website on my local IIS and I am trying to connect to this via a file in my .core project but I keep getting the following errors:
UmbracoModelsBuilder: at Umbraco.ModelsBuilder.Api.ApiClient.EnsureSuccess(HttpResponseMessage result) at Umbraco.ModelsBuilder.Api.ApiClient.ValidateClientVersion() at Umbraco.ModelsBuilder.CustomTool.CustomTool.UmbracoModelsBuilder.GenerateRaw(String wszInputFilePath, String wszDefaultNamespace, IntPtr[] rgbOutputFileContents, UInt32& pcbOutput, String& errMsg) UmbracoModelsBuilder: Starting v3.0.6.97 08/04/2017 16:23:11. UmbracoModelsBuilder: UmbracoModelsBuilder failed to generate code: Exception: Response status code does not indicate success (Forbidden) "API server does not want to talk to you." UmbracoModelsBuilder: at Umbraco.ModelsBuilder.Api.ApiClient.EnsureSuccess(HttpResponseMessage result) at Umbraco.ModelsBuilder.Api.ApiClient.ValidateClientVersion() at Umbraco.ModelsBuilder.CustomTool.CustomTool.UmbracoModelsBuilder.GenerateRaw(String wszInputFilePath, String wszDefaultNamespace, IntPtr[] rgbOutputFileContents, UInt32& pcbOutput, String& errMsg) UmbracoModelsBuilder: Starting v3.0.6.97 08/04/2017 16:23:38. UmbracoModelsBuilder: UmbracoModelsBuilder failed to generate code: Exception: Response status code does not indicate success (Forbidden) "API server does not want to talk to you." UmbracoModelsBuilder: at Umbraco.ModelsBuilder.Api.ApiClient.EnsureSuccess(HttpResponseMessage result) at Umbraco.ModelsBuilder.Api.ApiClient.ValidateClientVersion() at Umbraco.ModelsBuilder.CustomTool.CustomTool.UmbracoModelsBuilder.GenerateRaw(String wszInputFilePath, String wszDefaultNamespace, IntPtr[] rgbOutputFileContents, UInt32& pcbOutput, String& errMsg) UmbracoModelsBuilder: Starting v3.0.6.97 08/04/2017 16:27:30. UmbracoModelsBuilder: UmbracoModelsBuilder failed to generate code: Exception: Response status code does not indicate success (Forbidden) "API server does not want to talk to you." UmbracoModelsBuilder: at Umbraco.ModelsBuilder.Api.ApiClient.EnsureSuccess(HttpResponseMessage result) at Umbraco.ModelsBuilder.Api.ApiClient.ValidateClientVersion() at Umbraco.ModelsBuilder.CustomTool.CustomTool.UmbracoModelsBuilder.GenerateRaw(String wszInputFilePath, String wszDefaultNamespace, IntPtr[] rgbOutputFileContents, UInt32& pcbOutput, String& errMsg) UmbracoModelsBuilder: Starting v3.0.6.97 08/04/2017 16:29:12. UmbracoModelsBuilder: UmbracoModelsBuilder failed to generate code: Exception: Response status code does not indicate success (Forbidden) "API server does not want to talk to you." UmbracoModelsBuilder: at Umbraco.ModelsBuilder.Api.ApiClient.EnsureSuccess(HttpResponseMessage result) at Umbraco.ModelsBuilder.Api.ApiClient.ValidateClientVersion() at Umbraco.ModelsBuilder.CustomTool.CustomTool.UmbracoModelsBuilder.GenerateRaw(String wszInputFilePath, String wszDefaultNamespace, IntPtr[] rgbOutputFileContents, UInt32& pcbOutput, String& errMsg)
Any ideas on how to resolve these?
Hi Jason,
Do you have the ModelbsBuilder API installed in your web project ?
If so, can you check your web.config for following settings :
I also believe that the debug attribute on the compilation tag should be set to true.
Dave
Same problem. Using posted code and setting debug to true in webconfig solved it.
Ahh thanks, you're right, it needs debug mode set to true. I always forget to do this and have to revisit this page everytime I start a new build!
In case anyone is wondering, hit F5 from Visual Studio to debug the website the first time you run it like this, and Enable Debugging and it will edit it for you...then stop the site and rerun ModelsBuilder.
Or in your
is working on a reply...