YAFLogo

shide
  • shide
  • 80.6% (Honored)
  • YAF Lover Topic Starter
9 years ago
Hi everyone,

i've been trying to figure out this bug for a day now :
whenever a user clicks on the verification link in the email sent right after he registers,
we get this error :
Could not find a part of the path 'D:\SERVICES\websites\Notrefamille\forum\resources\'.

any idea where this can come from ?

here's the code inside the approve.aspx.cs page :

        public void ValidateKey_Click([NotNull] object sender, [NotNull] EventArgs e)
        {
            DataRow userRow = this.GetRepository<CheckEmail>().Update(this.key.Text).Rows[0];
            string userEmail = userRow["Email"].ToString();

            bool keyVerified = userRow["ProviderUserKey"] != DBNull.Value;

            this.approved.Visible = keyVerified;
            this.error.Visible = !keyVerified;

            if (!keyVerified)
            {
                return;
            }

            // approve and update e-mail in the membership as well...
            MembershipUser user = UserMembershipHelper.GetMembershipUserByKey(userRow["ProviderUserKey"]);
            if (!user.IsApproved)
            {
                user.IsApproved = true;
            }

            // update the email if anything was returned...
            if (user.Email != userEmail && userEmail != string.Empty)
            {
                user.Email = userEmail;
            }

            // tell the provider to update...
            this.Get<MembershipProvider>().UpdateUser(user);

            // now redirect to main site...
            this.PageContext.LoadMessage.AddSession(this.GetText("EMAIL_VERIFIED"), MessageTypes.Information);

            // default redirect -- because if may not want to redirect to login.
            YafBuildLink.Redirect(ForumPages.forum);

it seems to happen whenever a user is on a different session ID, than the one he/she used to subscribe
Sponsor

shide
  • shide
  • 80.6% (Honored)
  • YAF Lover Topic Starter
9 years ago
looks like the exception comes from : "YAF.Providers.utils.ExceptionReporter.cs"
inside

        private static XmlDocument ExceptionXML()
        {
            if (ProviderExceptionFile.IsNotSet())
            {
                throw new ApplicationException("Exceptionfile cannot be null or empty!");
            }

            var exceptionXmlDoc = new XmlDocument();
            exceptionXmlDoc.Load(
                HttpContext.Current.Server.MapPath(
                    "{0}{1}resources/{1}".FormatWith(
                        Config.ServerFileRoot,
                        Config.ServerFileRoot.EndsWith("/") ? string.Empty : "/",
                        ProviderExceptionFile)));

            return exceptionXmlDoc;
        }
the excpetion is raised during the
exceptionXmlDoc.Load()
because it cannot access the path "/resources/".
Any idea how resolve this ?
tha_watcha
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 🤴 YAF Version: 3.0.3
9 years ago
shide
  • shide
  • 80.6% (Honored)
  • YAF Lover Topic Starter
9 years ago
YAF Logo Copyright © YetAnotherForum.NET & Ingo Herbote. All rights reserved
About Us

The YAF.NET is an open source .NET forum project. YAF.NET is supported by an team of international developers who are build community by building community software.

Powered by Resharper Donate with PayPal button