SQL Databse未在iis 7.5上连接 [英] SQL Databse not connecting on iis 7.5

查看:56
本文介绍了SQL Databse未在iis 7.5上连接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,



在iis 7.5上托管网络应用程序,它工作正常,但我无法从sql访问数据库,我在我的网络中使用此连接字符串.config



,我该怎么办? ,Web应用程序需要登录,这是在数据库中,我无法访问它,请帮助



hello ,

am hosting web application on iis 7.5 and it work fine , but i cant access the database from sql , am using this connection string in my web.config

, what should i do else ? , the web application require login which is in database and i cant access to it , please help

<remove name="LocalSqlServer" />
    <add name="LocalSqlServer" connectionString="Data Source=Ahmad-PC\SQLExpress;Initial Catalog=abad;Integrated Security=True" 



providerName="System.Data.SqlClient" />
    <add name="ABADConnectionString" connectionString="Data Source=Ahmad-PC\SQLExpress;Initial Catalog=abad;Integrated Security=True" 



providerName="System.Data.SqlClient" />
    <add name="ABADConnectionString1" connectionString="Data Source=Ahmad-PC\SQLExpress;Initial Catalog=abad;Integrated Security=True" 



providerName="System.Data.SqlClient" />







我使用的是Windows 7家庭高级版64位,Microsoft SQL Server 2012和IIS 7.5




am using windows 7 home premium 64 bit , Microsoft SQL Server 2012 and IIS 7.5

推荐答案

等一下。

1)IIS没有连接到任何RDBMS,除了存储会话状态 - 它只是你可以在你的应用程序中使用的设置

2)SQL Express默认情况下不启用TCP / IP连接器,您需要启用它 [ ^ ]。

3)为此,你需要特定的端口级访问权限 [ ^ ] - 如果它们不在同一台机器上运行

4)在应用程序池下运行的IIS应用程序中,模拟专用池用户或经过身份验证的客户端用户(如果使用NTLM或Kerberos)。委派需要Kerberos - 如果IIS需要将客户端令牌传递给第三方机器(例如运行SQL服务器)委派,则需要Kerberos。集成安全认证意味着如果应用程序在客户端用户身份下运行则委派。

5)专用池标识或客户端标识 - 集成安全性意味着此用户必须能够访问SQL Server和数据库当然。



所以...检查这些...
Wait a second.
1) IIS does not connect to any RDBMS, except for storing session state - it is only a setting you can use in your application
2) SQL Express does not enable TCP/IP connector by default, you need to enable it[^].
3) For this to work, you need to have specific port level access[^] between the server running IIS and SQL Server - if they do not run on the same machine
4) In IIS applications run under application pools, that impersonate either a dedicated pool user or the authenticated client user (if NTLM or Kerberos is used). Kerberos is needed for delegation - if IIS needs to pass the client token to third party machine (running SQL server for example) delegation, thus Kerberos is needed. Integrated security authentication means delegation if the application is running under client user identity.
5) Either dedicated pool identity or client identity - integrated security implies that this user has to have access to SQL Server and the database of course.

So... check these...


从您的评论中你几乎得到了答案。 />


如果SQL服务器在您的本地开发盒上运行,那么您的服务器无法访问它的可能性很大。您需要关注的是使用您可以访问的单独SQL服务器,或者查看在安装IIS的主机上安装SQL Express。
From your comment you pretty much have your answer.

If SQL server is running on you local development box, then chances are good that your server will not have access to it. What you need to look into is either using a separate SQL server that you host can access or look at installing SQL Express on the host where IIS is installed.


这篇关于SQL Databse未在iis 7.5上连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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