如何为我的SharePoint网站创建到SQL Server数据库的全局连接字符串 [英] How to create a Global connectionstring to SQL Server Database for my SharePoint site

查看:79
本文介绍了如何为我的SharePoint网站创建到SQL Server数据库的全局连接字符串的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我的SharePoint网站的web.config中的连接字符串. 它位于SharePoint结束标记下方.

This is my connection string inside my web.config of my SharePoint site. Its sitting just below the closing SharePoint tag.

<connectionStrings>
    <add name="SAMRASConnectionString" connectionString="Data Source=JOHANDEVVM;
        Initial Catalog=samrasDB; User ID=Johan; Password=password; Trusted_Connection=True"
        providerName="System.Data.SqlClient"  />
</connectionStrings>

我必须在哪里放置它以获得全局连接字符串.

Where must i place it in order to get a Global Connectionstring.

原因是:当我转到IIS站点时,属性-> ASP.NET选项卡->编辑全局配置 然后,连接字符串不存在,仅由编辑配置"提供.

Reason be: When i go to my IIS site Properties -> ASP.NET tab -> Edit Global Configuration Then the connection string is not there, its only by the Edit Configuration.

我需要它在那里才能从其他客户端计算机访问它.我需要在我的web.config文件中更改它,并且不想在服务器上手动添加它.

I need it to be there to access it from other client computers. I need to change it in my web.config file and dont want to go add it manually on the Server.

推荐答案

如果有权访问,则在Machine.Config中添加connectionString.

Add the connectionString in Machine.Config if you have access to it.

这篇关于如何为我的SharePoint网站创建到SQL Server数据库的全局连接字符串的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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