Error executing template "Designs/Kwpn/UserManagement/Login/GeneralLogin.cshtml" System.IO.IOException: The process cannot access the file 'D:\inetpub\wwwroot\www.kwpn.nl\Files\Templates\Designs\Kwpn\Translations.xml' because it is being used by another process. at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share) at Dynamicweb.Rendering.Translation.Source.WriteDocument(XmlDocument document) at Dynamicweb.Rendering.Translation.Source.Save() at Dynamicweb.Rendering.Translation.Source.UpdateTranslationSource(Source source, IEnumerable`1 newKeys, String designName, IEnumerable`1 cultures) at Dynamicweb.Rendering.Template.TranslateText(String text, String defaultValue, String cultureName) at Dynamicweb.Rendering.TemplateBase`1.Translate(String text, String defaultValue) at CompiledRazorTemplates.Dynamic.RazorEngine_06c3f0f871ba46138be0a811112306b9.Execute() in D:\inetpub\wwwroot\www.kwpn.nl\Files\Templates\Designs\Kwpn\UserManagement\Login\GeneralLogin.cshtml:line 201 at RazorEngine.Templating.TemplateBase.RazorEngine.Templating.ITemplate.Run(ExecuteContext context, TextWriter reader) at RazorEngine.Templating.RazorEngineService.RunCompile(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag) at RazorEngine.Templating.RazorEngineServiceExtensions.<>c__DisplayClass16_0.<RunCompile>b__0(TextWriter writer) at RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter) at Dynamicweb.Rendering.RazorTemplateRenderingProvider.Render(Template template) at Dynamicweb.Rendering.TemplateRenderingService.Render(Template template) at Dynamicweb.Rendering.Template.RenderRazorTemplate()
1 @using Kwpn.Repository.Helpers 2 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 3 <div class="background"> 4 @{ 5 string loginAction = GetString("UserManagement:User.Login.Action"); 6 7 if (loginAction.Equals("Recovery")) 8 { 9 10 <form method="post" action='/Default.aspx?id=@GetGlobalValue("Global:Page.ID")' class="login-form" id="recoveryForm"> 11 <input type="hidden" name="ForgotPasswordMailTemplate" value='@GetString("UserManagement:User.Login.EmailTemplate")' /> 12 <input type="hidden" name="ForgotPasswordSenderEmail" value='@GetString("UserManagement:User.Login.EmailSender")' /> 13 <input type="hidden" name="ForgotPasswordMailSubject" value='@GetString("UserManagement:User.Login.EmailSubject")' /> 14 <h3>@Translate("IForgotMyPassword", "I forgot my password")</h3> 15 <div class="member-number-group input-group"> 16 <span class="input-group-addon" id="AccessUserUserNameLabel">@Translate("MembershipNumber", "Membership number")</span> 17 <input type="text" 18 id="AccessUserUserName" 19 name="AccessUserUserName" 20 class="form-control" 21 placeholder='@Translate("YourMembershipNumber", "Your membership number")' 22 aria-describedby="AccessUserUserNameLabel" 23 autocomplete="false" 24 value="" /> 25 </div> 26 <div class="member-number-group input-group"> 27 <span class="input-group-addon" id="AccessUserZipLabel">@Translate("PostalCode", "Postal code")</span> 28 <input type="text" 29 id="AccessUserZip" 30 name="AccessUserZip" 31 class="form-control" 32 placeholder='@Translate("PostalCodePlaceHolder", "NL: 1234 AA / BE: 1234")' 33 aria-describedby="AccessUserZipLabel" 34 autocomplete="false" 35 value="" /> 36 </div> 37 <div class="row"> 38 <div class="col-xs-9 col-xs-offset-3"> 39 <p>@Translate("IForgotMyPasswordIntroText", "Submit your membership number and postal code and we will send you a new password by email")</p> 40 <p><a href="/Default.aspx?id=@GetGlobalValue("Global:Page.ID")">@Translate("GoToLogin", "Go to login")</a></p> 41 </div> 42 </div> 43 <button type="submit" name="LoginAction" value="Recovery" id="recoveryButton">@Translate("SendMeMyPassword", "Send me my password")<i class="fa fa-chevron-right"></i></button> 44 @SnippetStart("JavascriptsBottom") 45 <script> 46 47 $(document).ready(function () { 48 $("#recoveryButton").click(function (e) { 49 e.preventDefault(); 50 PasswordRecoveryValidateZip(); 51 }); 52 }); 53 54 @*check if trimmed zip exists, then use db version in form*@ 55 function PasswordRecoveryValidateZip() { 56 var personCode = $("#AccessUserUserName", "#recoveryForm").val(); 57 var zipInput = $("#AccessUserZip", "#recoveryForm"); 58 var zipCode = zipInput.val(); 59 var cleanZipCodeUrlUrl = "/kwpnwebapi/forms/cleanzipcode/" + personCode + "/" + zipCode; 60 $.getJSON(cleanZipCodeUrlUrl).done(function (cleanZipCode) { 61 if (cleanZipCode != "") { 62 zipInput.val(cleanZipCode); 63 } 64 }).fail(function (jqxhr, textStatus, error) { 65 var err = textStatus + ", " + error; 66 console.error("Request Cleanzipcode Failed: " + err); 67 }).always(function () { 68 $("#recoveryButton", "#recoveryForm").removeAttr("name"); 69 $("#recoveryForm").append("<input type=\"hidden\" name=\"LoginAction\" value=\"Recovery\" />"); 70 $("#recoveryForm").submit(); // submit form 71 }); 72 } 73 74 </script> 75 @SnippetEnd("JavascriptsBottom") 76 @{ 77 string errorMessage = ""; 78 string postAccessUserUserName = System.Web.HttpContext.Current.Request.Form.Get("AccessUserUserName"); 79 string postAccessUserZip = System.Web.HttpContext.Current.Request.Form.Get("AccessUserZip"); 80 if (!string.IsNullOrEmpty(postAccessUserUserName)) 81 { 82 errorMessage = Translate(LoginHelper.GetPasswordResetError(postAccessUserUserName, postAccessUserZip)); 83 <div class="passwordResetErrorMessage"> 84 <span>@errorMessage</span> 85 </div> 86 } 87 } 88 </form> 89 } 90 else if (loginAction.Equals("PasswordSent")) 91 { 92 <h3>@Translate("IForgotMyPassword", "I forgot my password")</h3> 93 94 <div class="row"> 95 <div class="col-xs-12">@Translate("NewPasswordIsSentByEmailText", "<b>Congratulations!</b><br />Check your email, we sent your password to email.")</div> 96 </div> 97 98 <div class="row"> 99 <div class="col-xs-12"><a href="/Default.aspx?id=@GetGlobalValue("Global:Page.ID")">@Translate("GoToLogin", "Go to login")</a></div> 100 </div> 101 } 102 else 103 { 104 string forgotMembershipNumberPageUrl = ""; 105 string forgotMembershipNumberPageId = AreaHelper.GetAreaItemStringValueBySystemName(Kwpn.Models.Constants.StringConstants.PageIdSystemNames.ForgotMembershipNumberPageId); 106 if (!string.IsNullOrEmpty(forgotMembershipNumberPageId)) 107 { 108 forgotMembershipNumberPageUrl = string.Format("/Default.aspx?ID={0}", forgotMembershipNumberPageId); 109 } 110 111 string actionUrl = GetString("DWExtranetAction"); 112 string pageId = GetGlobalValue("Global:Page.ID"); 113 string redirectMessage = ""; 114 115 // check if action is sent 116 string culture = GetGlobalValue("Global:Area.LongLang"); 117 string actionParameter = "action"; 118 if (culture.Equals("nl-nl", StringComparison.InvariantCultureIgnoreCase)) { actionParameter = "actie"; } 119 string action = LoginHelper.GetActionParameter(actionParameter); 120 121 if (!string.IsNullOrEmpty(action)) 122 { 123 // non-members can't REGISTER HORSE TO NAME 124 if (action.Equals(TranslationHelper.Translate("ActionLink_Register_HorseToName", culture), StringComparison.InvariantCultureIgnoreCase)) 125 { 126 redirectMessage = TranslationHelper.Translate("LoginNotification_Register_HorseToName", culture); 127 } 128 129 // non-members can't SIGN UP FOR EVENT 130 if (action.Equals(TranslationHelper.Translate("ActionLink_SignUp_InspectionEvent", culture), StringComparison.InvariantCultureIgnoreCase)) 131 { 132 redirectMessage = TranslationHelper.Translate("LoginNotification_SignUp_InspectionEvent", culture); 133 } 134 135 // non-members can't REPORT A DECEASED HORSE 136 if (action.Equals(TranslationHelper.Translate("ActionLink_Report_HorseDied", culture), StringComparison.InvariantCultureIgnoreCase)) 137 { 138 redirectMessage = TranslationHelper.Translate("LoginNotification_Report_HorseDied", culture); 139 } 140 141 // non-members can't REGISTER A FOAL 142 if (action.Equals(TranslationHelper.Translate("ActionLink_Register_Foal", culture), StringComparison.InvariantCultureIgnoreCase)) 143 { 144 redirectMessage = TranslationHelper.Translate("LoginNotification_Register_Foal", culture); 145 } 146 147 // non-members can't REQUEST A GENOME BREEDING VALUE TEST 148 if (action.Equals(TranslationHelper.Translate("ActionLink_Request_GenomeBreedingValueTest", culture), StringComparison.InvariantCultureIgnoreCase)) 149 { 150 redirectMessage = TranslationHelper.Translate("LoginNotification_Request_GenomeBreedingValueTest", culture); 151 } 152 153 // non-members can't SELL A HORSE VIA MARKETPLACE 154 if (action.Equals(TranslationHelper.Translate("ActionLink_SellViaMarketplace", culture), StringComparison.InvariantCultureIgnoreCase)) 155 { 156 redirectMessage = TranslationHelper.Translate("LoginNotification_SellViaMarketplace", culture); 157 } 158 159 // non-members can't GET A STALLION ADVICE 160 if (action.Equals(TranslationHelper.Translate("ActionLink_Get_StallionAdvice", culture), StringComparison.InvariantCultureIgnoreCase)) 161 { 162 redirectMessage = TranslationHelper.Translate("LoginNotification_StallionAdvices", culture); 163 } 164 165 166 // add more notifications if nessecary 167 ///... 168 } 169 170 if (!string.IsNullOrEmpty(redirectMessage)) 171 { 172 <div class="row"> 173 <div class="col-xs-12"> 174 <div class="notification loginnotification"> 175 @redirectMessage 176 </div> 177 </div> 178 </div> 179 } 180 181 <form method="POST" action='@actionUrl' class="login-form"> 182 <input type="hidden" name="ID" value='@pageId' /> 183 <input type="hidden" name="Login" value="True" /> 184 <input type="hidden" name="DWExtranetUsernameRemember" value="True" /> 185 <input type="hidden" name="DWExtranetPasswordRemember" value="True" /> 186 <h3>@Translate("LogIn", "Log in")</h3> 187 <div class="member-number-group input-group"> 188 <span class="input-group-addon" id="member-number-general">@Translate("MembershipNumber", "Membership number")</span> 189 <input type="text" id="login-username-general" name="username" class="form-control" placeholder='@Translate("YourMembershipNumber", "Your membership number")' aria-describedby="member-number-general" autocomplete="false" value='' /> 190 </div> 191 <div class="password-group input-group"> 192 <span class="input-group-addon" id="member-password-general">@Translate("Password2", "Password")</span> 193 <input type="password" class="form-control" id="login-password-general" name="password" placeholder='@Translate("YourPassword", "Your password")' aria-describedby="member-password-general" autocomplete="false" value='' /> 194 </div> 195 <div class="row"> 196 <div class="col-xs-6"> 197 <input type="checkbox" name="Autologin" id="Autologin-general" value="True" /> 198 <label class="loginSubContent" for="Autologin-general">@Translate("KeepMeLoggedIn", "Keep me logged in")</label> 199 </div> 200 <div class="col-xs-6 text-right"> 201 <a class="loginSubContent" href='@string.Format("{0}&LoginAction=Recovery", GetString("DWExtranetAction"))'><small>@Translate("ForgotYourPassword", "Forgot your password?")</small></a>@if (!string.IsNullOrEmpty(forgotMembershipNumberPageUrl)) 202 {<br /><a class="loginSubContent" href='@forgotMembershipNumberPageUrl'><small>@Translate("ForgotMembershipNumber", "Forgot your membership nr?")</small></a>} 203 </div> 204 </div> 205 <button type="submit" name="LoginAction">@Translate("LogIn", "Log in")<i class="fa fa-chevron-right"></i></button> 206 <div class="loginErrorMessage"> 207 <span style="display: none;"></span> 208 </div> 209 </form> 210 211 } 212 213 } 214 </div> 215
Dan is JongKWPN vast en zeker iets voor jou! JongKWPN biedt een gevarieerd programma.
Word nu lid