日期:2014-05-20  浏览次数:20674 次

《.NET企业服务框架》第15章的例子报错,请思归、速马和正在看此书的朋友解答一下吧。ps:提供书中的配套代码,有朋友说书中的网站不能下
我的环境   Win2003+sp1,   VS2005   Team   suite+sp1,   SQL2005+sp1  

1.       我在运行   15   章的例子时WinClient时,   报异常:   无法将类型为 "System.__ComObject "的对象强制转换为类  
型 "System.Collections.ArrayList "  

我查看了代码:  
                                public   CourseManagerForm()  
                                {  
                                                //  
                                                //   Required   for   Windows   Form   Designer   support  
                                                //  
                                                InitializeComponent();  

                                                this.dateTimePickerEndDate.Value   =   DateTime.Today   +  
TimeSpan.FromDays(120);  


                                                try  
                                                {  
                                                                using   (QueryCourseControl   cc   =   new   QueryCourseControl())  
                                                                {  
                                                                                this.categories   =   cc.GetCategories();       <---   这里抛的异常  

                                                                                this.comboBoxCategories.DataSource   =   this.categories;                                                                       }