我有一个日历控件卡在加载中,但仅在生产中
I have a calender control stuck on loading, but only in production
我有一个日历控件(来自组件一)卡在加载中...它在我 visual studio 的开发环境中不会执行此操作,但就在我将其发布到我们的 Azure 实例时执行此操作.
它似乎在经历了一定数量的事件后崩溃了。正如您在下面的 link 示例中看到的那样。
这个link工作正常,因为我调整了它的参数:http://seraphimmobile.com/calendar2.aspx?cid=ca926097-d632-488a-9cdc-77627a85c0af&color=white&bckcolor=rgb%282%2c107%2c181%29&sd=-1&ed=10
下面是我如何绑定它的代码:
Session["C1EvCalSessionUsed"] = true;
string sessionDataFileName = "~/" + String.Format("c1evcaldata{0}.xml", User.Identity.Name + Session.LCID + DateTime.Now.Ticks.ToString().Substring(12, 6).Replace("\", ""));
C1EventsCalendar1.DataStorage.DataFile = sessionDataFileName;
IList<RemoteClimbingGetEventsBetweenDates.EventByDays> _eventspan = new List<RemoteClimbingGetEventsBetweenDates.EventByDays>();
_eventspan = objeventspan.GetEventsBetweenDates(DateTime.Now.AddDays(_startdate), DateTime.Now.AddDays(_enddate), _commid, "");
Event ev = new Event();
int i = 0;
foreach (var _event in _eventspan)
{
ev.Id = _event.eventid.Trim();
ev.Color = _backcolor;
ev.Start = _event.eventstartdate.Date + _event.eventstarttime.TimeOfDay;
ev.End = _event.eventenddate.Date + _event.eventendtime.TimeOfDay;
ev.Description = _event.eventdesc.Replace(@"/", "").Trim();
ev.Subject = _event.eventname.Replace(@"/", "").Trim();
C1EventsCalendar1.DataStorage.AddEvent(ev);
}
这是我的 asp 代码:
<cc1:C1EventsCalendar ID="C1EventsCalendar1" runat="server" Width="100%" Height="800px" >
</cc1:C1EventsCalendar>
同样,这只发生在生产环境中。 我很困惑。任何有关查找位置的帮助或活动建议都会有所帮助。 Component One 在这个问题上的支持不是很好,因为它不会在开发环境中中断。
下面是我对参数的要求:
List<string> Keys = new List<string>();
List<string> Values = new List<string>();
string _commid = "";
string _backcolor = "";
int _startdate = 10;
int _enddate = 60;
try
{
//Gets the Intial URL with the values
string URL = Request.Url.ToString();
URL = URL + "?cid=ca926097-d632-488a-9cdc-77627a85c0af&color=white&bckcolor=rgb(2,107,181)&sd=-10&ed=30";
//Splits the URL before and after the ?
string[] StringArray = URL.Split('?');
//splits each key and value into their own string
string[] NameValuePairs = StringArray[1].Split('&');
//split each key and value into separate strings
foreach (string s in NameValuePairs)
{
string[] KeyAndValue = s.Split('=');
Keys.Add(KeyAndValue[0]);
Values.Add(KeyAndValue[1]);
}
//Do stuff with the ids
_commid = Values[0].ToString();
Session["COLOR"] = Values[1].ToString();
_backcolor = Values[2].ToString();
if (!string.IsNullOrEmpty(Values[3].ToString()))
{
_startdate = Convert.ToInt32(Values[3].ToString());
_enddate = Convert.ToInt32(Values[4].ToString());
}
}
catch
{
}
这最终成为我使用的控件的问题...
我有一个日历控件(来自组件一)卡在加载中...它在我 visual studio 的开发环境中不会执行此操作,但就在我将其发布到我们的 Azure 实例时执行此操作.
它似乎在经历了一定数量的事件后崩溃了。正如您在下面的 link 示例中看到的那样。
这个link工作正常,因为我调整了它的参数:http://seraphimmobile.com/calendar2.aspx?cid=ca926097-d632-488a-9cdc-77627a85c0af&color=white&bckcolor=rgb%282%2c107%2c181%29&sd=-1&ed=10
下面是我如何绑定它的代码:
Session["C1EvCalSessionUsed"] = true;
string sessionDataFileName = "~/" + String.Format("c1evcaldata{0}.xml", User.Identity.Name + Session.LCID + DateTime.Now.Ticks.ToString().Substring(12, 6).Replace("\", ""));
C1EventsCalendar1.DataStorage.DataFile = sessionDataFileName;
IList<RemoteClimbingGetEventsBetweenDates.EventByDays> _eventspan = new List<RemoteClimbingGetEventsBetweenDates.EventByDays>();
_eventspan = objeventspan.GetEventsBetweenDates(DateTime.Now.AddDays(_startdate), DateTime.Now.AddDays(_enddate), _commid, "");
Event ev = new Event();
int i = 0;
foreach (var _event in _eventspan)
{
ev.Id = _event.eventid.Trim();
ev.Color = _backcolor;
ev.Start = _event.eventstartdate.Date + _event.eventstarttime.TimeOfDay;
ev.End = _event.eventenddate.Date + _event.eventendtime.TimeOfDay;
ev.Description = _event.eventdesc.Replace(@"/", "").Trim();
ev.Subject = _event.eventname.Replace(@"/", "").Trim();
C1EventsCalendar1.DataStorage.AddEvent(ev);
}
这是我的 asp 代码:
<cc1:C1EventsCalendar ID="C1EventsCalendar1" runat="server" Width="100%" Height="800px" >
</cc1:C1EventsCalendar>
同样,这只发生在生产环境中。 我很困惑。任何有关查找位置的帮助或活动建议都会有所帮助。 Component One 在这个问题上的支持不是很好,因为它不会在开发环境中中断。
下面是我对参数的要求:
List<string> Keys = new List<string>();
List<string> Values = new List<string>();
string _commid = "";
string _backcolor = "";
int _startdate = 10;
int _enddate = 60;
try
{
//Gets the Intial URL with the values
string URL = Request.Url.ToString();
URL = URL + "?cid=ca926097-d632-488a-9cdc-77627a85c0af&color=white&bckcolor=rgb(2,107,181)&sd=-10&ed=30";
//Splits the URL before and after the ?
string[] StringArray = URL.Split('?');
//splits each key and value into their own string
string[] NameValuePairs = StringArray[1].Split('&');
//split each key and value into separate strings
foreach (string s in NameValuePairs)
{
string[] KeyAndValue = s.Split('=');
Keys.Add(KeyAndValue[0]);
Values.Add(KeyAndValue[1]);
}
//Do stuff with the ids
_commid = Values[0].ToString();
Session["COLOR"] = Values[1].ToString();
_backcolor = Values[2].ToString();
if (!string.IsNullOrEmpty(Values[3].ToString()))
{
_startdate = Convert.ToInt32(Values[3].ToString());
_enddate = Convert.ToInt32(Values[4].ToString());
}
}
catch
{
}
这最终成为我使用的控件的问题...