Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6577381
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T15:37:41+00:00 2026-05-25T15:37:41+00:00

This works in my dev machine, but not on my actual production server. I’m

  • 0

This works in my dev machine, but not on my actual production server.

I’m just trying to register a user, but the date of birth has to be formatted dd/mm/yyyy. For example: 28/09/1980.

This works very well on my dev machine, I can register and it’s saving the date of birth correctly.

But when running the exact same code on the product server I get the error:

The value '29/08/1980' is not valid for Fecha de Nacimiento (dd-mm-aaaa):.

What should I be looking for and what could be causing the date to be saved correctl on my dev machine, but refuse to work well on production?

If I switch the values to 09/28/1989 it works fine, but due to way dates are formatted here in Bolivia, I need to use Day then Month, then Year.

Here’s the [HttpPost] Action method that runs when the user clicks the submit button:

[HttpPost]
public ActionResult Register(UserModel model)
{
    EFCityRepository cityRepo = new EFCityRepository();
    model.Cities = new List<SelectListItem>();
    foreach (var city in cityRepo.FindAllCities())
    {
        model.Cities.Add(new SelectListItem { Text = city.Name, Value = city.CityId.ToString(), Selected = true });
    }

    EFGenderRepository genderRepo = new EFGenderRepository();
    model.Genders = new List<SelectListItem>();
    foreach (var gender in genderRepo.FindAllGenders())
    {
        model.Genders.Add(new SelectListItem { Text = gender.Name, Value = gender.GenderId.ToString(), Selected = true });
    }

    if (ModelState.IsValid)
    {
        Domain.User user = Mapper.Map<UserModel, Site.Domain.User>(model);
        user.UserRoleId = 1;
        user.EmailVerificationCode = SecurityHelpers.GenerateRandomToken();
        user.IsActive = true;
        user.LancesSpent = 0;
        user.GoldShopPointsSpent = 0;
        user.LanceCreditBalance = 25;
        user.GoldShopCreditBalance = 0;
        user.DateOfRegistry = DateTime.Now;
        user.LastDateLogin = DateTime.Now;

        var result = userRepo.CreateUser(user);

        if (result == UserCreationResults.Ok)
        {
            SecurityHelpers.SendVerificationEmail(user.Email, user.UserId, user.EmailVerificationCode);
            FormsAuthentication.SetAuthCookie(model.Login, false /* createPersistentCookie */);
            return RedirectToAction("Index", "Home");
        }
        else
        {
            switch (result)
            {
                case UserCreationResults.UsernameExists:
                    ModelState.AddModelError("", "El nombre de usuario ya esta siendo utilizado.");
                    break;
                case UserCreationResults.EmailAlreadyExists:
                    ModelState.AddModelError("", "Ese correo ya esta en uso.");
                    break;
                case UserCreationResults.NicknameAlreadyExists:
                    ModelState.AddModelError("", "El nickname ya esta siendo utilizado.");
                    break;
                case UserCreationResults.UnknownError:
                    ModelState.AddModelError("", "Algo durante el registro. Por favor intente de nuevo.");
                    break;
                default:
                    break;
            }
        }
    }

    // If we got this far, something failed, redisplay form
    return View(model);
}

}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T15:37:42+00:00Added an answer on May 25, 2026 at 3:37 pm

    Set the culture in your web.config:

    <globalization culture="es-BO" uiCulture="es-BO" />
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This works on my dev machine, but not on a production server. I am
I've used NUnit before, but not in a while, and never on this machine.
On my local dev machine this works perfectly: msbuild project.name.csproj /p:DeployOnBuild=true /p:DeployTarget=PipelinePreDeployCopyAllFilesToOneFolder /p:_PackageTempDir=c:\proyectos\folder1\deploy /p:AutoParameterizationWebConfigConnectionStrings=false
Not sure what has happened on my dev machine but I can barely use
This works, but is it the proper way to do it??? I have a
This works just fine: protected void txtTest_Load(object sender, EventArgs e) { if (sender is
This works: Tweener.addTween( [ _fee, _fye, _fum ] , { alpna:1, time:10 }); But
This works: #include <iostream> using namespace std; but this fails: #include <stdio> When is
This works: var.replace(/[^0-9]+/g, ''); That simple snippet will replace anything that is not a
This works : alert(document.getElementById(Container).nodeName); But this doesnt : var CurParent = document.getElementById(Container); alert(CurParent.nodeName); I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.