【发布时间】:2012-09-21 14:54:23
【问题描述】:
我们有一个 asmx Web 服务,可以在 32 位 Windows Server 2008 上正常运行,但是当它托管在 64 位服务器 2008 r2 机器上时,它会给出“索引超出数组范围”。尝试访问服务的 javascript 文件时:
http://www.site.com/Service.asmx/js 输出“索引超出了数组的范围。”仅当托管在 64 位时
服务代码如下所示:
[WebService(Namespace = "http://www.company.com")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[ToolboxItem(false)]
[ScriptService]
public class Saver : WebService
{
/// <summary>A web service to save a set of ScheduleEntryProperties objects.</summary>
[WebMethod]
public string SaveEntries(Entry[] entries, object start, object end, string assignmentIDs, string deptID, string useCodes)
{
...
}
还有Entry对象:
[Serializable]
public class Entry
{
public Entry()
{
}
public Entry(object assignmentID, object date, object hours, object text)
{
AssignmentID = assignmentID;
Date = date;
Hours = hours;
Text = text;
}
public object Date;
public object AssignmentID;
public object Text;
public object Hours;
}
有什么想法吗?
【问题讨论】:
标签: web-services asmx windows-server-2008-r2