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

  • Home
  • SEARCH
  • 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 6365183
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T00:15:40+00:00 2026-05-25T00:15:40+00:00

I have a problem with an validation error that only appears on Windows Azure,

  • 0

I have a problem with an validation error that only appears on Windows Azure, but not on the local Azure Emulator.

In my model I have a class with an attribute “Start” and a DisplayFormat for the German date format:

[Required]
[DisplayFormat(DataFormatString = "{0:dd.MM.yyyy}", ApplyFormatInEditMode = true)]
[Display(Name = "Beginn")]
public DateTime Start { get; set; }

On my local machine, everything is fine, but when I try to save the field on a Windows Azure instance I get this validation message:

The value ‘22.08.2011’ is not valid for Beginn.

Both (local and cloud) using the same database (Azure SQL).
So, I’m confused. Any idea how to fix this?

  • 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-25T00:15:41+00:00Added an answer on May 25, 2026 at 12:15 am

    The DisplayFormat attribute (as it name suggests) is used only for displaying the property value using the specified format. It has absolutely nothing to do with validation.

    In this case validation is performed by the default model binder when it tries to set the POSTed string to a DateTime property. It uses the default locale which could be specified in your web.config using the globalization element:

    <system.web>
        ...
        <globalization culture="de-DE" uiCulture="de-DE"/>
    </system.web>
    

    The reason your code doesn’t work when you deploy it on the Azure instance is because chances are the server is configured to use the en-US culture for which the date time format is different.

    If you want to use some more specific format you could also write a custom model binder for your view model and inside manually parse the POSTed value using this special custom format.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a problem with validation messages not showing after a redirect, even when
I am using the jQuery form validation plugin. The problem I have is that
I have a problem where an :if clause within an ActiveRecord validation is not
i have a problem in my code. I have an ajax validation that calls
I have a JQuery (using JQuery 1.4.2) problem that exhibits only in IE8 in
I have a problem with the Microsoft EnterpriseLibrary validation framework. Let's say we have
I have a strange problem with the validation I am writing on a form.
I have problem in some JavaScript that I am writing where the Switch statement
I have an HTML5 form that uses JavaScript for the client side validation. If
I have a viewmodel class for a create view that consists of 2 properties

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.