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

Crash when trying to request and install certificate #305

Closed
fkorsa opened this issue Apr 4, 2019 · 5 comments
Closed

Crash when trying to request and install certificate #305

fkorsa opened this issue Apr 4, 2019 · 5 comments

Comments

@fkorsa
Copy link

fkorsa commented Apr 4, 2019

The let's encrypt Azure extension crashed when I clicked on "request and install certificates". Here is the log:

Server Error in '/letsencrypt' Application.
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

Stack Trace:

[InvalidOperationException: There is no ViewData item of type 'IEnumerable' that has the key 'Hostnames'.]
System.Web.Mvc.Html.SelectExtensions.GetSelectData(HtmlHelper htmlHelper, String name) +228
System.Web.Mvc.Html.SelectExtensions.SelectInternal(HtmlHelper htmlHelper, ModelMetadata metadata, String optionLabel, String name, IEnumerable1 selectList, Boolean allowMultiple, IDictionary2 htmlAttributes) +118
System.Web.Mvc.Html.SelectExtensions.ListBoxFor(HtmlHelper1 htmlHelper, Expression1 expression, IEnumerable1 selectList, IDictionary2 htmlAttributes) +93
System.Web.Mvc.Html.SelectExtensions.ListBoxFor(HtmlHelper1 htmlHelper, Expression1 expression, IEnumerable1 selectList, Object htmlAttributes) +69 ASP._Page_Views_Home_Install_cshtml.Execute() in D:\home\SiteExtensions\letsencrypt\Views\Home\Install.cshtml:24 System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +197 System.Web.Mvc.WebViewPage.ExecutePageHierarchy() +105 System.Web.WebPages.StartPage.RunPage() +17 System.Web.WebPages.StartPage.ExecutePageHierarchy() +73 System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +78 System.Web.Mvc.RazorView.RenderView(ViewContext viewContext, TextWriter writer, Object instance) +256 System.Web.Mvc.BuildManagerCompiledView.Render(ViewContext viewContext, TextWriter writer) +107 System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context) +291 System.Web.Mvc.ControllerActionInvoker.InvokeActionResult(ControllerContext controllerContext, ActionResult actionResult) +13 System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +56
System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +420 System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList1 filters, ActionResult actionResult) +52
System.Web.Mvc.Async.<>c__DisplayClass3_6.b__4() +198
System.Web.Mvc.Async.<>c__DisplayClass3_1.b__1(IAsyncResult asyncResult) +100
System.Web.Mvc.Async.WrappedAsyncResult1.CallEndDelegate(IAsyncResult asyncResult) +10 System.Web.Mvc.Async.WrappedAsyncResultBase1.End() +49
System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult asyncResult) +27
System.Web.Mvc.<>c.b__152_1(IAsyncResult asyncResult, ExecuteCoreState innerState) +11
System.Web.Mvc.Async.WrappedAsyncVoid1.CallEndDelegate(IAsyncResult asyncResult) +29 System.Web.Mvc.Async.WrappedAsyncResultBase1.End() +49
System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) +45
System.Web.Mvc.<>c.b__151_2(IAsyncResult asyncResult, Controller controller) +13
System.Web.Mvc.Async.WrappedAsyncVoid1.CallEndDelegate(IAsyncResult asyncResult) +22 System.Web.Mvc.Async.WrappedAsyncResultBase1.End() +49
System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult) +26
System.Web.Mvc.Controller.System.Web.Mvc.Async.IAsyncController.EndExecute(IAsyncResult asyncResult) +10
System.Web.Mvc.<>c.b__20_1(IAsyncResult asyncResult, ProcessRequestState innerState) +28
System.Web.Mvc.Async.WrappedAsyncVoid1.CallEndDelegate(IAsyncResult asyncResult) +29 System.Web.Mvc.Async.WrappedAsyncResultBase1.End() +49
System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +28
System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult result) +9
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +577
System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) +132
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +163

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.7.3282.0

@andr3w
Copy link

andr3w commented Apr 7, 2019

I'm getting the same issue.

sjkp added a commit that referenced this issue Apr 7, 2019
@sjkp
Copy link
Owner

sjkp commented Apr 7, 2019

@andr3w can you try release 0.9.6 and let me know if that fixes it. I cant reproduce the error, so if 0.9.6 doesnt help you have to provide more info.
What is your web app setup like (which region, are you using app service plan and web app in same resource group)

@andr3w
Copy link

andr3w commented Apr 7, 2019 via email

@fkorsa
Copy link
Author

fkorsa commented Apr 8, 2019

Personally it was a one-time issue, unfortunately. I simply refreshed and clicked again and it worked. I just wanted to report it in case the call stack would help you.

For me, region is West Europe, and app service plan and web app are in the same resource group indeed.

@sjkp sjkp closed this as completed Apr 8, 2019
@andr3w
Copy link

andr3w commented Apr 8, 2019 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants