会数据库的高手进 英文高手帮忙翻译一下

来源:百度知道 编辑:UC知道 时间:2024/05/21 19:39:25
Server Error in '/' Application.
--------------------------------------------------------------------------------

Object cannot be cast from DBNull to other types.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.InvalidCastException: Object cannot be cast from DBNull to other types.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[InvalidCastException: Object cannot be cast from DBNull to other types.]
System.DBNull.System.IConvertible.ToInt32(IFormatProvider provider) +54
System.Convert.ToInt32(Object value) +25
RealDa

1、停掉IIS

2、查看IIS 配置数据库密码:

第一步先修改相关文件使查看到的******变为可显示:
在c:\inetpub\adminscripts 找到adsutil.vbs (根据装系统时设定的不同,有的路径可能不一样)
用记事本打开此文件
查找 IsSecureProperty = True (只有一个符合字段,在一个条件语句里面)
将 IsSecureProperty = True 改为 IsSecureProperty = False
保存关闭。

第二步执行查看密码命令:
开始->运行输入cmd回车 打开命令行工具
输入 cd c:\inetpub\adminscripts(进入adminscripts目录,视你机器路径而定)
获取 IWAM 帐户密码命令:cscript.exe adsutil.vbs get w3svc/wamuserpass
你还可以获取 IUSR 帐户密码,我没有用到
命令为:cscript.exe adsutil.vbs get w3svc/anonymoususerpass
输入以上命令,按回车可分别拿到IWAM和IUSR的密码。

3、右键单击 我的电脑->管理,打开计算机管理界面
打开 本地用户和组->用户
右键单击 启动IIS进程帐号 IWAM_**** (注:****一般是计算机名)
点击设置密码,设置为刚才你得到的IWAM密码。

4、更改组件服务中的密码
开始->运行输入cmd回车 打开命令行工具
先输入 cd c:\inetpub\adminscripts
然后输入 cscript.exe synciwam.vbs -v

系统会提示出来一大堆字符,不用管它。关闭窗口然后启动IIS,报错信息应该没有了