1、其中实现数据访问接口的一个类如下:
public class Account
{
public static BookShop.IDAL.IAccount Create()
{ /// Look up the DAL implementation we should be using
string path = System.Configuration.ConfigurationSettings.AppSettings["WebDAL"];
string className = path + ".Account"; // Using the evidence given in the config file load the appropriate assembly and class
return (BookShop.IDAL.IAccount) Assembly.Load(path).CreateInstance(className); }
}在Web.Config中的部份代码如下:
  <appSettings>
    <add key="SQLConnString1" value="Persist Security Info=False;Data Source=127.0.0.1;Initial Catalog=BookShop;User ID=sa;Password=222111;" />
    <add key="SQLConnString2" value="Persist Security Info=False;Data Source=127.0.0.1;Initial Catalog=BookShop;User ID=sa;Password=222111;" />
    <add key="SQLConnString3" value="Persist Security Info=False;Data Source=127.0.0.1;Initial Catalog=BookShopOrders;User ID=sa;Password=222111;" />
    <add key="WebDAL" value="BookShop.SQLServerDAL" />
    <add key="OrdersDAL" value="BookShop.SQLServerDAL" />
    <add key="Event Log Source" value="Book Shop" />
  </appSettings>现在每调试到接口引用的时候,就出现这个错误
异常详细信息: System.InvalidCastException: 指定的转换无效。源错误: 
行 18: 
行 19:  // Using the evidence given in the config file load the appropriate assembly and class
行 20:  return (BookShop.IDAL.IAccount) Assembly.Load(path).CreateInstance(className);
行 21: 
行 22:  }
 
请问一下是什么问题呢