连接字符串与Asp.net 4.0和Sql server 2008 R2一起工作ii7 [英] Connection string not working ii7 together with Asp.net 4.0 and Sql server 2008 R2

查看:132
本文介绍了连接字符串与Asp.net 4.0和Sql server 2008 R2一起工作ii7的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我在本地机器上的iis 7上托管了一个网站..



当我们使用visual studio 2010在同一台机器上运行代码时,该网站正常运行。



当我们使用iis7托管放置发布文件时在同一台机器上然后



con.Open()(sql connection faild)在同一台机器上无法使用iis





这里我是asp.net frramework 4.0和sql server 2008 r2



请相同的任何一个帮助..

Hi,

I host a website on iis 7 on my local machine..

That website running proper when we run with code on same machine using visual studio 2010.

but on same machine when we put publish file using iis7 hosting then

con.Open() (sql connection faild) not working on iis on the same machine


here i am asp.net frramework 4.0 and sql server 2008 r2

Please any one help for the same..

推荐答案

试试这个链接


用户IIS登录失败APPPOOL \ ASP.NET v4.0意味着您可能在连接字符串中使用Integrated Security。这意味着,由于您的应用程序在IIS中作为ASP.Net v.40用户运行,因此它没有登录SQL。您需要为它创建一个sql登录,或者最好的选择是创建一个sql帐户并在连接字符串中使用它而不是集成安全性。
Login failed for user IIS APPPOOL\ASP.NET v4.0 means you are likely using Integrated Security in your connection string. This means that since your app is running in IIS as ASP.Net v.40 user it does not have a login to SQL. You either need to create a login to sql for it or the best option is to create a sql account and use that in your connection string instead of integrated security.


这篇关于连接字符串与Asp.net 4.0和Sql server 2008 R2一起工作ii7的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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