连接字符串在本地计算机上有效,在服务器上无效 [英] connection string works on local machine not work on server

查看:76
本文介绍了连接字符串在本地计算机上有效,在服务器上无效的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

web.config中的连接字符串在本地计算机上正常工作.

当我将网站托管在服务器上时,连接字符串不起作用,并显示错误数据库不可用".

在连接字符串中,我正确输入了服务器的用户ID和密码,但仍无法正常工作.

Connection string in web.config works properly on local machine.

When I host the website on server, connection string does not work and gives an error ''Database not available''.

In connection string I give user id & password of server correctly, but still not working.

推荐答案

数据库可能与本地服务器不同.确保服务器上具有服务器凭据的web.config中具有连接字符串.
The database may be different from local to server. Make sure you have the connection string in web.config in server with server credentials.


这篇关于连接字符串在本地计算机上有效,在服务器上无效的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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