系统之家 - 系统光盘下载网站!

当前位置:系统之家 > 系统教程菜鸟收藏:IIS数据库连接失败的问题

菜鸟收藏:IIS数据库连接失败的问题

时间:2012-05-25 14:18:13 作者:ぺ倒計べ_時 来源:系统之家 1. 扫描二维码随时看资讯 2. 请使用手机浏览器访问: https://m.xitongzhijia.net/xtjc/20120525/9867.html 手机查看 评论

      @echo off 
      echo 正在清除系统垃圾文件,请稍等...... 
      del /f /s /q %systemdrive%\*.tmp 
      del /f /s /q %systemdrive%\*._mp 
      del /f /s /q %systemdrive%\*.log 
      del /f /s /q %systemdrive%\*.gid 
      del /f /s /q %systemdrive%\*.chk 
      del /f /s /q %systemdrive%\*.old 
      del /f /s /q %systemdrive%\recycled\*.* 
      del /f /s /q %windir%\*.bak 
      del /f /s /q %windir%\prefetch\*.* 
      rd /s /q %windir%\temp & md %windir%\temp 
      del /f /q %userprofile%\cookies\*.* 
      del /f /q %userprofile%\recent\*.* 
      del /f /s /q "%userprofile%\Local Settings\Temporary Internet Files\*.*" 
      del /f /s /q "%userprofile%\Local Settings\Temp\*.*" 
      del /f /s /q "%userprofile%\recent\*.*" 
      echo 清除系统垃圾文件完成! 
      echo. & pause

      以上批处理中有一句是rd /s /q %windir%\temp & md %windir%\temp

      将temp文件夹用RD命令删除,再用MD创建,这样会导致权限问题! 
      怀疑原因可能出在IIS设置上,仔细检查数遍,兼网站目录权限,未发现问题。 
      再在互联网上搜索,发现一案例,因使用批处理命令删除临时文件夹,出现相同症状,恍然大悟,一定是临时文件夹权限问题。

      在NTFS格式下,temp目录的权限肯定会改变,由于数据库操作时需要使用temp目录作缓存进行数据交换,当权限不足时就出现:“数据库连接出错,请检查连接字串。”的错误提示。 修正temp权限后再试,ok了

      找到temp目录:C:\WINDOWS\这里即可找到。 给temp文件夹加上guests组的权限就OK了,我IIS用户是属于GUESTS组的,所以加GUESTS 加上以后,测试,OK.系统之家问题解决完毕。你试试
 

发表评论

0

没有更多评论了

评论就这些咯,让大家也知道你的独特见解

立即评论

以上留言仅代表用户个人观点,不代表系统之家立场

其他版本软件

人气教程排行

相关系统推荐

扫码关注
扫码关注

扫码关注 官方交流群 软件收录