EDN Admin
Well-known member
Hey,
im having an problem, with dateTime, getting this error:
<a>
<div style="border:1px solid black; width:951px; height:748px
<title>The DateTime represented by the string is not supported in calendar System.Globalization.GregorianCalendar.</title><style>body {font-family:"Verdana";font-weight:normal;font-size: .7em;color:black;} p {font-family:"Verdana";font-weight:normal;color:black;margin-
b {font-family:"Verdana";font-weight:bold;color:black;margin- H1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red } H2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon } pre {font-family:"Lucida Console";font-size:
.9em} .marker {font-weight: bold; color: black;text-decoration: none;} .version {color: gray;} .error {margin-bottom: 10px;} .expandable { text-decoration:underline; font-weight:bold; color:navy; cursor:hand; } </style><span>
<h1>Server Error in /OS2DagsordenBackend Application.
<hr size="1" color="silver" width="100%
</h1>
The DateTime represented by the string is not supported in calendar System.Globalization.GregorianCalendar.
<span style=" Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
<br/>
<br/>
Exception Details: System.FormatException: The DateTime represented by the string is not supported in calendar System.Globalization.GregorianCalendar.<br/>
<br/>
Source Error: <br/>
<br/>
<table bgcolor="#ffffcc" width="100%
<tbody>
<tr>
<td>
</td>
</tr>
</tbody>
</table>
<br/>
Stack Trace: <br/>
<br/>
<table bgcolor="#ffffcc" width="100%
<tbody>
<tr>
<td>
[/code]</td>
</tr>
</tbody>
</table>
<br/>
<hr size="1" color="silver" width="100%
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1
but thath not the big problem, simpel formating wil du the trick, the problem is that i only get the problem when i run on a XenApp Citrix client, but not when i run in normaly in windows, even when its the same site on the same server. som end
users will run et at XenApp citrix, and som normaly
the code:
my jquery:
<pre class="prettyprint $(document).ready(function() {
$(.time_h).autocomplete({
source: <%=source_Times_h %>,
delay:0
});
$(.time_m).autocomplete({
source: <%=source_Times_m %>,
delay:0
});
$(#ctl00_ContentPlaceHolder1_ddlFarve).children().each(function(e) {
if ($.browser.webkit || $.browser.msie) {
$(this).css({
"color":"#" + $(this).attr(value).split(_)[0]
});
$(#colorViwer).hide();
}
$(this).mouseenter(function () {
$(#colorViwer).css({
"background-color":"#" + $(this).attr(value).split(_)[0]
});
});
});
$(.datePicker).datepicker();
$(.ddls).searchable();
});[/code]
<br/>
my codebehind:
<pre class="prettyprint protected void btnGem_Click(object sender, EventArgs e)
{
MoedeProp moede = new MoedeProp();
moede.Title = txtTitle.Text.Trim();
moede.GruppeSqlId = ddlGrupe.SelectedValue;
moede.MoedeDato = DateTime.Parse(txtDate.Text);
moede.MoedeStartTid = DateTime.Parse(txtTimeFrom1.Text + ":" + txtTimeFrom2.Text);
moede.MoedeSlutTid = DateTime.Parse(txtTimeTo1.Text + ":" + txtTimeTo2.Text);
moede.SidstAendretDato = DateTime.Now;
moede.SidstEndretAf = "";
moede.FarveSqlID = ddlFarve.SelectedValue.Split(_)[1];
moede.Aflyst = Boolean.Parse(rblAflyst.SelectedValue);
moede.KalenderVisning = Boolean.Parse(rblVisKalender.SelectedValue);
moede.MoedeTitleKort = txtKortTitle.Text;
moede.Deaktiveret = Boolean.Parse(rblDeactiveret.SelectedValue);
if (Request.QueryString.Count > 0)
{
moede.SqlID = Request.QueryString[0].ToString();
moede.Aendret = true;
_objMoede.UpdateMoede(moede);
}
else
{
moede.Aendret = false;
_objMoede.AddMoede(moede);
}
}[/code]
Hope sombody can help.
and sory for my missing langue skills
View the full article
im having an problem, with dateTime, getting this error:
<a>
<div style="border:1px solid black; width:951px; height:748px
<title>The DateTime represented by the string is not supported in calendar System.Globalization.GregorianCalendar.</title><style>body {font-family:"Verdana";font-weight:normal;font-size: .7em;color:black;} p {font-family:"Verdana";font-weight:normal;color:black;margin-
b {font-family:"Verdana";font-weight:bold;color:black;margin- H1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red } H2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon } pre {font-family:"Lucida Console";font-size:
.9em} .marker {font-weight: bold; color: black;text-decoration: none;} .version {color: gray;} .error {margin-bottom: 10px;} .expandable { text-decoration:underline; font-weight:bold; color:navy; cursor:hand; } </style><span>
<h1>Server Error in /OS2DagsordenBackend Application.
<hr size="1" color="silver" width="100%
</h1>
The DateTime represented by the string is not supported in calendar System.Globalization.GregorianCalendar.
<span style=" Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
<br/>
<br/>
Exception Details: System.FormatException: The DateTime represented by the string is not supported in calendar System.Globalization.GregorianCalendar.<br/>
<br/>
Source Error: <br/>
<br/>
<table bgcolor="#ffffcc" width="100%
<tbody>
<tr>
<td>
Code:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
</tr>
</tbody>
</table>
<br/>
Stack Trace: <br/>
<br/>
<table bgcolor="#ffffcc" width="100%
<tbody>
<tr>
<td>
Code:
<pre>
[FormatException: The DateTime represented by the string is not supported in calendar System.Globalization.GregorianCalendar.]
System.DateTime.Parse(String s) +6365138
Edit_editMoeder.btnGem_Click(Object sender, EventArgs e) +328
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +154
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3707
</tr>
</tbody>
</table>
<br/>
<hr size="1" color="silver" width="100%
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1
but thath not the big problem, simpel formating wil du the trick, the problem is that i only get the problem when i run on a XenApp Citrix client, but not when i run in normaly in windows, even when its the same site on the same server. som end
users will run et at XenApp citrix, and som normaly
the code:
my jquery:
<pre class="prettyprint $(document).ready(function() {
$(.time_h).autocomplete({
source: <%=source_Times_h %>,
delay:0
});
$(.time_m).autocomplete({
source: <%=source_Times_m %>,
delay:0
});
$(#ctl00_ContentPlaceHolder1_ddlFarve).children().each(function(e) {
if ($.browser.webkit || $.browser.msie) {
$(this).css({
"color":"#" + $(this).attr(value).split(_)[0]
});
$(#colorViwer).hide();
}
$(this).mouseenter(function () {
$(#colorViwer).css({
"background-color":"#" + $(this).attr(value).split(_)[0]
});
});
});
$(.datePicker).datepicker();
$(.ddls).searchable();
});[/code]
<br/>
my codebehind:
<pre class="prettyprint protected void btnGem_Click(object sender, EventArgs e)
{
MoedeProp moede = new MoedeProp();
moede.Title = txtTitle.Text.Trim();
moede.GruppeSqlId = ddlGrupe.SelectedValue;
moede.MoedeDato = DateTime.Parse(txtDate.Text);
moede.MoedeStartTid = DateTime.Parse(txtTimeFrom1.Text + ":" + txtTimeFrom2.Text);
moede.MoedeSlutTid = DateTime.Parse(txtTimeTo1.Text + ":" + txtTimeTo2.Text);
moede.SidstAendretDato = DateTime.Now;
moede.SidstEndretAf = "";
moede.FarveSqlID = ddlFarve.SelectedValue.Split(_)[1];
moede.Aflyst = Boolean.Parse(rblAflyst.SelectedValue);
moede.KalenderVisning = Boolean.Parse(rblVisKalender.SelectedValue);
moede.MoedeTitleKort = txtKortTitle.Text;
moede.Deaktiveret = Boolean.Parse(rblDeactiveret.SelectedValue);
if (Request.QueryString.Count > 0)
{
moede.SqlID = Request.QueryString[0].ToString();
moede.Aendret = true;
_objMoede.UpdateMoede(moede);
}
else
{
moede.Aendret = false;
_objMoede.AddMoede(moede);
}
}[/code]
Hope sombody can help.
and sory for my missing langue skills

View the full article