You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Installing a new certificate and getting the following compilation error at /letsencrypt/Home/Install
There is no ViewData item of type 'IEnumerable' that has the key 'Hostnames'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.InvalidOperationException: There is no ViewData item of type 'IEnumerable' that has the key 'Hostnames'.
Source Error:
Line 22: @Html.LabelFor(model => model.Hostnames, htmlAttributes: new { @Class = "control-label col-md-2" })
Line 23:
Line 24: @Html.ListBoxFor(model => model.Hostnames, ViewBag.HostNames as IEnumerable, new { htmlAttributes = new { @Class = "form-control" } })
Line 25: @Html.ValidationMessageFor(model => model.Hostnames, "", new { @Class = "text-danger" })
Line 26:
Hi @paulallington
This is a bug - but if you assign a custom hostname to your web site (which you need to do anyway, to get any Let Encrypt certificate issued) then you shouldn't see this error.
Installing a new certificate and getting the following compilation error at /letsencrypt/Home/Install
There is no ViewData item of type 'IEnumerable' that has the key 'Hostnames'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.InvalidOperationException: There is no ViewData item of type 'IEnumerable' that has the key 'Hostnames'.
Source Error:
Line 22: @Html.LabelFor(model => model.Hostnames, htmlAttributes: new { @Class = "control-label col-md-2" })
Line 23:
Line 24: @Html.ListBoxFor(model => model.Hostnames, ViewBag.HostNames as IEnumerable, new { htmlAttributes = new { @Class = "form-control" } })
Line 25: @Html.ValidationMessageFor(model => model.Hostnames, "", new { @Class = "text-danger" })
Line 26:
Source File: D:\home\SiteExtensions\letsencrypt\Views\Home\Install.cshtml Line: 24
The text was updated successfully, but these errors were encountered: