Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation issue on Install.cshtml #303

Closed
paulallington opened this issue Mar 27, 2019 · 2 comments
Closed

Compilation issue on Install.cshtml #303

paulallington opened this issue Mar 27, 2019 · 2 comments
Assignees
Labels

Comments

@paulallington
Copy link

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

@sjkp
Copy link
Owner

sjkp commented Mar 27, 2019

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.

@sjkp sjkp self-assigned this Mar 27, 2019
@sjkp sjkp added the bug label Mar 27, 2019
@paulallington
Copy link
Author

How do you do that in azure? It has a number of custom host names associated with it

sjkp added a commit that referenced this issue Apr 7, 2019
@sjkp sjkp closed this as completed Apr 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants