在loacl机器上发布网站时出现异常 [英] exception in publishing web site on loacl machine

查看:84
本文介绍了在loacl机器上发布网站时出现异常的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

朋友们,
我要在IIS 6上发布网站,我的Web配置文件中的连接字符串是

Hi friends,
I am going to publish web site on IIS 6, my connection string in web config file is,

<connectionstrings>
<add name="pvconnstring" connectionstring="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\pv.mdf;Integrated Security=SSPI;Connect Timeout=30;User Instance=True" providername="System.Data.SqlClient" />
</connectionstrings>


我在浏览器中找到了该网站,但是当我执行sql server的任务时,它给出了错误,指出打开连接是
由于无法检索用户的本地应用程序数据路径,因此未能生成SQL Server用户实例.请确保用户在计算机上具有本地用户配置文件.连接将关闭.

请帮助我.


I got the web site in explorer but when I perform the task of sql server it gives error that opening connection is
failed to generate a user instance of SQL Server due to failure in retrieving the user''s local application data path. Please make sure the user has a local user profile on the computer. The connection will be closed.

Please help me.

推荐答案

Hi ,
    on your SQL Management studio in object explorer right click on security create new login >> Search >> advanced >> Find now >> select Name ASPNET then press ok and from combo box select name of your Data Base 
Note :
      sometimes you will not find ASPNET in this case you can select IIS_USERS .


最好的问候
M.Mitwalli


Best Regards
M.Mitwalli


将用户配置文件添加到数据库的安全性"文件夹中,并授予其访问数据库的权限
add user profile inside your database in Security folder and give it permission to access the database


这篇关于在loacl机器上发布网站时出现异常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆