SSPI连接.NET 2.0中的Web服务 [英] SSPI Connection in .Net 2.0 Web Service
问题描述
我想测试我在C#中创建一个.net 2.0的Web服务。我们的一个服务器在Windows 2000和目前只能支持NET 2.0。我可以局部进行测试,以我的机器,它工作正常,但是当我将它移动到目标服务器的生产会产生错误。
I'm trying to test a .Net 2.0 Web Service I created in C#. One of our servers is on windows 2000 and can currently only support .Net 2.0 . I can test it local to my machine and it works fine but when I move it to the target server for production it produces an error.
我想它使用Windows身份验证,并将其定义为这样在web.config
I want it to use Windows authentication, and have it defined as such in the web.config
我收到的错误是:
System.Data.SqlClient.SqlException:在 用户登录失败'。用户是 与可信SQL相关联 服务器连接。
System.Data.SqlClient.SqlException: Login failed for user ''. The user is not associated with a trusted SQL Server connection.
这时候我尝试测试目标服务器上的这个Web服务(在该服务器上本地运行)状态。
This occurs when I try to test this web service on the target server (running locally on that server).
我怎样才能在Active Directory的用户名与服务器/位置Web服务正在运行联系起来(我认为这就是我需要做什么?)
How can I associate an active directory username with the server/location the web service is running (I think that's what I need to do?)
此服务器可以通过传统的ASP和ColdFusion目前连接MSSQL 2005。
This server can currently connect to MSSQL 2005 via classic ASP and ColdFusion.
推荐答案
我相信你设置了一个网站(或服务)的应用程序池承载网站的用户。
I believe you setup the user for a web-site (or service) in the App Pool that hosts the site.
打开COMPMGMT.MSC,去服务和应用程序 - > Internet信息服务(IIS)
Open compmgmt.msc, and go Services and Applications -> Internet Information Services (IIS)
您可以添加新的应用程序池在这里,有一个身份。然后,您可以通过右键点击你的网站相关联的Web服务站点的应用程序池 - >主目录,并选择应用程序池底部
You can add a new App Pool here, which has an identity. You can then associate your web service site with the App Pool by right clicking your site -> Home Directory, and choose the App Pool at the bottom.
可能有一些其他的事情,我忘了,但我认为应该这样做。
There may be some other things I forgot, but I think that should do it.
这篇关于SSPI连接.NET 2.0中的Web服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!