C# 我有一个日历控制卡在加载,但只有在生产

C# 我有一个日历控制卡在加载,但只有在生产,c#,asp.net,azure,webforms,C#,Asp.net,Azure,Webforms,我有一个日历控件(来自组件一)在加载时卡住了。。。它不会在VisualStudio中的开发环境中执行此操作,但就在我将其发布到Azure实例时 它看起来像是在一定数量的事件之后破裂的。正如您在下面的链接示例中所看到的 此链接在加载时被卡住: 此链接工作正常,因为我调整了它的参数: 以下是我如何绑定它的代码: Session["C1EvCalSessionUsed"] = true; string sessionDataFileName = "~/

我有一个日历控件(来自组件一)在加载时卡住了。。。它不会在VisualStudio中的开发环境中执行此操作,但就在我将其发布到Azure实例时

它看起来像是在一定数量的事件之后破裂的。正如您在下面的链接示例中所看到的

此链接在加载时被卡住:

此链接工作正常,因为我调整了它的参数:

以下是我如何绑定它的代码:

            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);

            }
Session[“C1EvCalSessionUsed”]=true;
string sessionDataFileName=“~/”+string.Format(“c1evcaldata{0}.xml”,User.Identity.Name+Session.LCID+DateTime.Now.Ticks.ToString()。子字符串(12,6)。替换(“\\”,”);
C1EventsCalendar1.DataStorage.DataFile=sessionDataFileName;
IList_eventspan=新列表();
_eventspan=objeventspan.getEventsBetween Dates(DateTime.Now.AddDays(_startdate),DateTime.Now.AddDays(_enddate),_commid,“”;
事件ev=新事件();
int i=0;
foreach(var\u eventspan中的事件)
{
ev.Id=_event.eventid.Trim();
ev.Color=_背景色;
ev.Start=\u event.eventstartdate.Date+\u 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>

再说一次,这只发生在生产中。我被它难住了。任何关于去哪里看的帮助或活动建议都会很有帮助。组件一在这个问题上的支持并不太好,因为它在开发环境中没有中断

以下是我对ask参数所做的操作:

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
{
}
List key=new List();
列表值=新列表();
字符串_commid=“”;
字符串_backcolor=“”;
int_startdate=10;
int _enddate=60;
尝试
{
//获取包含这些值的初始URL
字符串URL=Request.URL.ToString();
URL=URL+“?cid=ca926097-d632-488a-9cdc-77627a85c0af&color=white&bckcolor=rgb(2107181)&sd=-10&ed=30”;
//拆分URL之前和之后?
string[]StringArray=URL.Split('?');
//将每个键和值拆分为各自的字符串
string[]NameValuePairs=StringArray[1]。拆分('&');
//将每个键和值拆分为单独的字符串
foreach(NameValuePairs中的字符串s)
{
字符串[]KeyAndValue=s.Split('=');
key.Add(KeyAndValue[0]);
添加(键和值[1]);
}
//用身份证做事
_commid=值[0]。ToString();
会话[“颜色”]=值[1]。ToString();
_backcolor=值[2]。ToString();
如果(!string.IsNullOrEmpty(值[3].ToString()))
{
_startdate=Convert.ToInt32(值[3].ToString());
_enddate=Convert.ToInt32(值[4].ToString());
}
}
抓住
{
}

这最终导致我使用的控件出现问题

你能提供代码来说明你在用这些参数做什么吗?是的,这是。这是在加载事件页面中。您是否查看了从
GetEventsBetween Dates
返回的对象?它在20个事件的几个范围内工作不一致。有时是19天,有时是15天,但我将起始日期设置为一个更大的数字。请告诉我您发现了什么。由于它是一个Web应用程序,请尝试打开F12开发人员工具,并检查“控制台”以查看是否有任何错误。@terbubbs我已查看了它。看起来一点也不奇怪。我还将该web服务用于其他用途。我还尝试将web服务切换为simular服务,但控件仍会做出同样的反应。同样,这只在生产环境中发生一次,而不是在开发环境中。