引发类型为“Thinkment.Data.DataException”的异常。
说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。异常详细信息: Thinkment.Data.DataException: 引发类型为“Thinkment.Data.DataException”的异常。源错误:行 76: , ex.ErrorCode, ex.Message);
行 77: We7.Framework.LogHelper.WriteLog(typeof(ApplicationHelper), msg);
行 78: throw ex;
行 79: }
行 80:
源文件: F:\web7\We7.CMS.Install\ApplicationHelper.cs 行: 78 错误源
public void Build()
{
//typeName=WebEngine2007.AD.Common.AdZone, WebEngine2007.AD.Common
objType = System.Type.GetType(typeName);
if (objType == null)
{
throw new DataException(ErrorCodes.UnkownObject);
}
foreach (PropertyInfo pi in objType.GetProperties())
{
if (propertyDict.ContainsKey(pi.Name))
{
Property p = propertyDict[pi.Name];
p.Info = pi;
}
}
foreach (Property p in propertyDict.Values)
{
if (p.Info == null)
{
string s = String.Format("{0}.{1}", ObjType.ToString(), p.Name);
//throw new DataException(s, ErrorCodes.UnknownProperty);
}
}
}
Ad.xml
<?xml version="1.0" encoding="utf-8" ?>
<Objects>
<Database name="WebEngine2007.AD.Common" driver="Thinkment.Data.SqlDbDriver" connectionString="Server=.;Database=ad;User=sa;Password=yyaccp">
<!--<Database name="WebEngine2007.AD.Common" driver="Thinkment.Data.OleDbDriver" connectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source{$Current}\AD.mdb">-->
<Object type="WebEngine2007.AD.Common.AdZone, WebEngine2007.AD.Common" table="AdZone" primaryKey="ID" identity="">
<Property name="ID" field="ID" size="40" type="String" nullable="false" />
<Property name="ZoneName" field="ZoneName" size="100" type="String"/>
<Property name="ZoneIntro" field="ZoneIntro" size="255" type="String" />
<Property name="ZoneType" field="ZoneType" size="4" type="Int32" />
<Property name="DefaultSetting" field="DefaultSetting" size="4" type="Int32"/>
<Property name="ZoneSetting" field="ZoneSetting" size="65536" type="String"/>
<Property name="ZoneWidth" field="ZoneWidth" size="4" type="Int32" />
<Property name="ZoneHeight" field="ZoneHeight" size="4" type="Int32" />
<Property name="Active" field="Active" size="4" type="Int32"/>
<Property name="ShowType" field="ShowType" size="4" type="Int32" />
<Property name="Created" field="Created" size="4" type="DateTime" />
<Property name="Updated" field="Updated" size="4" type="DateTime" />
<Property name="EnumState" field="EnumState" size="50" type="String"/>
<Property name="SiteID" field="SiteID" size="50" type="String" />
</Object>本地跑这个地方要怎么修改吗???
说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。异常详细信息: Thinkment.Data.DataException: 引发类型为“Thinkment.Data.DataException”的异常。源错误:行 76: , ex.ErrorCode, ex.Message);
行 77: We7.Framework.LogHelper.WriteLog(typeof(ApplicationHelper), msg);
行 78: throw ex;
行 79: }
行 80:
源文件: F:\web7\We7.CMS.Install\ApplicationHelper.cs 行: 78 错误源
public void Build()
{
//typeName=WebEngine2007.AD.Common.AdZone, WebEngine2007.AD.Common
objType = System.Type.GetType(typeName);
if (objType == null)
{
throw new DataException(ErrorCodes.UnkownObject);
}
foreach (PropertyInfo pi in objType.GetProperties())
{
if (propertyDict.ContainsKey(pi.Name))
{
Property p = propertyDict[pi.Name];
p.Info = pi;
}
}
foreach (Property p in propertyDict.Values)
{
if (p.Info == null)
{
string s = String.Format("{0}.{1}", ObjType.ToString(), p.Name);
//throw new DataException(s, ErrorCodes.UnknownProperty);
}
}
}
Ad.xml
<?xml version="1.0" encoding="utf-8" ?>
<Objects>
<Database name="WebEngine2007.AD.Common" driver="Thinkment.Data.SqlDbDriver" connectionString="Server=.;Database=ad;User=sa;Password=yyaccp">
<!--<Database name="WebEngine2007.AD.Common" driver="Thinkment.Data.OleDbDriver" connectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source{$Current}\AD.mdb">-->
<Object type="WebEngine2007.AD.Common.AdZone, WebEngine2007.AD.Common" table="AdZone" primaryKey="ID" identity="">
<Property name="ID" field="ID" size="40" type="String" nullable="false" />
<Property name="ZoneName" field="ZoneName" size="100" type="String"/>
<Property name="ZoneIntro" field="ZoneIntro" size="255" type="String" />
<Property name="ZoneType" field="ZoneType" size="4" type="Int32" />
<Property name="DefaultSetting" field="DefaultSetting" size="4" type="Int32"/>
<Property name="ZoneSetting" field="ZoneSetting" size="65536" type="String"/>
<Property name="ZoneWidth" field="ZoneWidth" size="4" type="Int32" />
<Property name="ZoneHeight" field="ZoneHeight" size="4" type="Int32" />
<Property name="Active" field="Active" size="4" type="Int32"/>
<Property name="ShowType" field="ShowType" size="4" type="Int32" />
<Property name="Created" field="Created" size="4" type="DateTime" />
<Property name="Updated" field="Updated" size="4" type="DateTime" />
<Property name="EnumState" field="EnumState" size="50" type="String"/>
<Property name="SiteID" field="SiteID" size="50" type="String" />
</Object>本地跑这个地方要怎么修改吗???
解决方案 »
- 在web.config中设置了Theme,如果某个页面不需要Theme,怎么办?
- Global.asax 的 Session_Start 问题
- 在visual studio2008中如何自动生成global.aspx.cs文件呢?
- 为什么我添加到webconfig中的sqldatasource没有加入用户名和密码呢?
- 如何调用带有返回值的脚本函数?
- 怎么在没有数据的情况下显示datagrid的标题?
- C#中向C++的函数中 传结构数组..结构数组...
- 采用 CodeBehind的写法,请问怎么在页面里边访问页面类里边的变量
- 网上的“允许更新此预编译站点”描述为何和现实测试不同
- 一个简单的按钮问题!高分请教。
- 各位朋友 帮忙看段代码,
- 请问为什么我的 window.showModalDialog打开的网页没有地址栏状态栏什么的呢?
解决办法是:We7.CMS.Web\App_Data\XML文件夹下有个AD.XML文件,删除了。
只留一个CD.XML文件。
问题的原因:在We7.Share\Thinkment.Data这个目录下的Internal.cs文件里面679行的objType = System.Type.GetType(typeName);这边取不到类型。