웹 배포 방법을 사용하여 웹 응용 프로그램을 테스트 서버에 배포하려고합니다. 응용 프로그램은 문제없이 정상적으로 빌드되며 로컬 및 테스트 서버에서 올바르게 작동합니다. 배포하는 동안 미리 컴파일 된 설정을 사용하려고 할 때 문제가 발생합니다. 이 과정의 중간에 나는 VerifyCode.cshtml
파일에 많은 오류가 있습니다. 내보기 폴더에 VerifyCode
라는보기가 없다는 것입니다. 문제가 어디에 있습니까? 익명 및 Windows 인증을 병렬로 사용하고 있습니다.미리 컴파일 된 뷰를 사용하여 webapp 배포
예 오류 나는 receiveing :
The name 'ViewBag' does not exist in the current context
The name 'Scripts' does not exist in the current context
The name 'Model' does not exist in the current context
'HtmlHelper' does not contain a definition for 'TextBoxFor' ...
등등 ...
VerifyCode.cshtml
코드 :
@model App.Models.VerifyCodeViewModel
@{
ViewBag.Title = "Verify";
}
<h2>@ViewBag.Title.</h2>
@using (Html.BeginForm("VerifyCode", "Account", new { ReturnUrl = Model.ReturnUrl }, FormMethod.Post, new { @class = "form-horizontal", role = "form" })) {
@Html.AntiForgeryToken()
@Html.Hidden("provider", @Model.Provider)
@Html.Hidden("rememberMe", @Model.RememberMe)
<h4>Enter verification code</h4>
<hr />
@Html.ValidationSummary("", new { @class = "text-danger" })
<div class="form-group">
@Html.LabelFor(m => m.Code, new { @class = "col-md-2 control-label" })
<div class="col-md-10">
@Html.TextBoxFor(m => m.Code, new { @class = "form-control" })
</div>
</div>
<div class="form-group">
<div class="col-md-offset-2 col-md-10">
<div class="checkbox">
@Html.CheckBoxFor(m => m.RememberBrowser)
@Html.LabelFor(m => m.RememberBrowser)
</div>
</div>
</div>
<div class="form-group">
<div class="col-md-offset-2 col-md-10">
<input type="submit" class="btn btn-default" value="Submit" />
</div>
</div>
}
@section Scripts {
@Scripts.Render("~/bundles/jqueryval")
}