Error executing template "Designs/Kwpn/UserManagement/Login/login.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_6f43bac93d87482cb27346ebd0f2e8b4.Execute() in D:\inetpub\wwwroot\www.kwpn.nl\Files\Templates\Designs\Kwpn\UserManagement\Login\login.cshtml:line 33 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.Models.Constants 2 @using Kwpn.Repository.Helpers 3 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 4 5 @{ 6 var generalLoginUrl = LoginHelper.GetLoginUrl(); 7 var forgotPasswordUrl = string.Format("{0}&LoginAction=Recovery", generalLoginUrl); 8 var forgotMembershipNumberPageUrl = ""; 9 var forgotMembershipNumberPageId = AreaHelper.GetAreaItemStringValueBySystemName(StringConstants.PageIdSystemNames.ForgotMembershipNumberPageId); 10 if (!string.IsNullOrWhiteSpace(forgotMembershipNumberPageId)) 11 { 12 forgotMembershipNumberPageUrl = string.Format("/Default.aspx?ID={0}", forgotMembershipNumberPageId); 13 } 14 15 var globalPageId = GetGlobalValue("Global:Page.ID"); 16 var homepageId = AreaHelper.GetAreaItemStringValueBySystemName(StringConstants.PageIdSystemNames.HomepageId); 17 var dashboardPageId = AreaHelper.GetAreaItemStringValueBySystemName(StringConstants.PageIdSystemNames.DashboardPageId); 18 var redirectPage = ""; 19 20 if (globalPageId == homepageId) // redirect naar dashboard bij inlog op homepage 21 { 22 redirectPage = string.Format("/Default.aspx?ID={0}", dashboardPageId).UrlEncode(); 23 redirectPage = string.Format("?redirect={0}", redirectPage); 24 } 25 26 <form method="POST" action='@System.Web.HttpContext.Current.Request.Url.PathAndQuery@redirectPage'> 27 <input type="hidden" name="ID" value='@GetGlobalValue("Global:Page.ID")'/> 28 <input type="hidden" name="Login" value="True"/> 29 <input type="hidden" name="DWExtranetUsernameRemember" value="True"/> 30 <input type="hidden" name="DWExtranetPasswordRemember" value="True"/><input type="hidden" name="Autologin" value="True"/> 31 32 33 <h3>@Translate("LogIn", "Log in")</h3> 34 35 <div class="member-number-group input-group"> 36 <span class="input-group-addon" id="member-number">@Translate("MembershipNumber", "Membership number")</span> 37 <input type="text" id="login-username" name="username" class="form-control" placeholder='@Translate("YourMembershipNumber", "Your membership number")' aria-describedby="member-number" autocomplete="false" value='@GetGlobalValue("Global:User.Username")' /> 38 </div> 39 40 <div class="password-group input-group"> 41 <span class="input-group-addon" id="member-password">@Translate("Password", "Password")</span> 42 <input type="password" class="form-control" id="login-password" name="password" placeholder='@Translate("YourPassword", "Your password")' aria-describedby="member-password" autocomplete="false" value='@GetGlobalValue("Global:User.Username")' /> 43 </div> 44 45 <div class="row"> 46 <div class="col-xs-5"> 47 <input type="checkbox" name="Autologin" id="Autologin" value="True" /> 48 <label for="Autologin" class="loginSubContent">@Translate("KeepMeLoggedIn", "Keep me logged in")</label> 49 </div> 50 <div class="col-xs-7 text-right"> 51 <a href='@forgotPasswordUrl' class="loginSubContent"><small>@Translate("ForgotYourPassword", "Forgot your password?")</small></a>@if (!string.IsNullOrWhiteSpace(forgotMembershipNumberPageUrl)){<br/><a href='@forgotMembershipNumberPageUrl' class="loginSubContent"><small>@Translate("ForgotMembershipNumber", "Forgot your membership nr?")</small></a>} 52 </div> 53 </div> 54 55 <button type="submit" name="LoginAction">@Translate("LogIn", "Log in")<i class="fa fa-chevron-right"></i></button> 56 57 <div class="loginErrorMessage"> 58 <span style="display: none;"></span> 59 </div> 60 61 </form> 62 } 63
The KWPN (Studbook of the Royal Dutch Sport Horse) is a Netherlands-based organization specializing in the breeding of jumpers, dressage horses, harness horses, and Gelder horses.
More info