将网站设置为仅在域内可用 [英] Setting up website to be available only inside the domain

查看:47
本文介绍了将网站设置为仅在域内可用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

HI,


我在设置网站时遇到问题,因此只有在域内才可以使用

。我们有三台服务器。一个是iis服务器和第二个

一个是内部服务器,第三个是sql server。我已在内部服务器中部署了

Web应用程序。它无法访问另一台服务器上的sql

服务器。如果我在IIS上部署相同的应用程序,那么

工作正常。我应该如何在Internal

服务器中设置Web应用程序?请告诉我。


我尝试连接到sql server时遇到的错误



登录用户''NT AUTHORITY \ ANONYMOUS LOGON''失败。


谢谢,

Sridhar。



I am having problems setting up a website so that it will be available
only inside the domain. We have three servers. One is iis server and second
one is internal server and the third one is sql server. I have deployed the
web application in the internal server. It is not able to access the sql
server that is on another server. If I deploy the same application on IIS, it
is working fine. How should I set up the web application in the Internal
server? Please let me know.

The error that I am getting when it is trying to connect to sql server
is
Login failed for user ''NT AUTHORITY\ANONYMOUS LOGON''.

Thanks,
Sridhar.

推荐答案

re:

我在尝试连接到sql server时遇到的错误

用户''NT AUTHORITY \ ANONYMOUS LOGON'登录失败。
The error that I am getting when it is trying to connect to sql server
is Login failed for user ''NT AUTHORITY\ANONYMOUS LOGON''.



显然,您正在以该帐户连接,

但该帐户在SQL Server中没有数据库权限。 />

可能,ASP.NET在IIS服务器上运行的帐户对SQL Server数据库具有

适当的权限,而ASP.NET的帐户

正在内部服务器上运行(NT AUTHORITY \ ANONYMOUS LOGON)没有。


是否所有机器都在同一个域上?


如果是这样,解决方案就像在内部服务器上运行ASP.NET一样简单,就像NT AUTHORITY \ ANONYMOUS LOGON一样。


如果你不能这样做......


您是在IIS服务器还是在内部服务器中冒充ASP.NET? />

如果您不是,您可以设置域帐户,在您的内部服务器上运行ASP.NET模拟

该帐户,并授予该帐户访问权限到SQL Server。


Juan T. Llibre,asp.net MVP

aspnetfaq.com: http://www.aspnetfaq.com/

asp.net faq: http://asp.net.do/faq/

foros de asp.net,en espa?ol:< a rel =nofollowhref =http://asp.net.do/foros/target =_ blank> http://asp.net.do/foros/

===================================

" Sridhar" < Sr ***** @ discussion.microsoft.com写信息

新闻:F2 *********************** *********** @ microsof t.com ...

Apparently, you are connecting as that account,
but that account doesn''t have database permissions in the SQL Server.

Probably, the account which ASP.NET is running as on the IIS server has the
appropiate permissions to the SQL Server DB, while the account which ASP.NET
is running as on the internal server (NT AUTHORITY\ANONYMOUS LOGON) doesn''t.

Are all the machines on the same domain ?

If so, the solution could be as easy as running ASP.NET,
on the internal server, as NT AUTHORITY\ANONYMOUS LOGON.

If you can''t do that...

Are you impersonating ASP.NET in either the IIS Server or the internal server ?

If you aren''t, you could setup a domain account, run ASP.NET impersonating
that account on your internal server, and grant that account access right to te SQL Server.

Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en espa?ol : http://asp.net.do/foros/
===================================
"Sridhar" <Sr*****@discussions.microsoft.comwrote in message
news:F2**********************************@microsof t.com...


HI,


I我在设置网站时遇到问题,以便只在域内使用

。我们有三台服务器。一个是iis服务器和第二个

一个是内部服务器,第三个是sql server。我已在内部服务器中部署了

Web应用程序。它无法访问另一台服务器上的sql

服务器。如果我在IIS上部署相同的应用程序,那么

工作正常。我应该如何在Internal

服务器中设置Web应用程序?请告诉我。


我尝试连接到sql server时遇到的错误



登录用户NT AUTHORITY \ ANONYMOUS LOGON失败。


谢谢,

Sridhar。


I am having problems setting up a website so that it will be available
only inside the domain. We have three servers. One is iis server and second
one is internal server and the third one is sql server. I have deployed the
web application in the internal server. It is not able to access the sql
server that is on another server. If I deploy the same application on IIS, it
is working fine. How should I set up the web application in the Internal
server? Please let me know.

The error that I am getting when it is trying to connect to sql server
is
Login failed for user ''NT AUTHORITY\ANONYMOUS LOGON''.

Thanks,
Sridhar.






我们有一个可以连接到sql server的域帐户。我们是

冒充该帐户连接到sql server。在我们的内部服务器中,

我启用了匿名登录并设置了我们拥有的

域帐户的用户名和密码。但它仍然无法正常工作。在IIS服务器中,我们

使用相同的用户名和密码,它工作正常。如果有什么我遗失的话,请告诉

.


谢谢,

Sridhar。


" Juan T. Llibre"写道:
Hi,

We have a domain account which can connect to the sql server. We are
impersonating that account to connect to sql server. In our internal server,
I have enabled the Anonymous login and set the user name and password of the
domain account that we have. But still it is not working. In IIS server, we
are using the same username and password and it is working fine. Please let
me know if there is anything I am missing.

Thanks,
Sridhar.

"Juan T. Llibre" wrote:

re:
re:

我在尝试连接到sql时遇到的错误服务器

登录失败,用户''NT AUTHORITY \ ANONYMOUS LOGON''。
The error that I am getting when it is trying to connect to sql server
is Login failed for user ''NT AUTHORITY\ANONYMOUS LOGON''.



显然,您正在以该帐户连接,

但该帐户在SQL Server中没有数据库权限。 />

可能,ASP.NET在IIS服务器上运行的帐户对SQL Server数据库具有

适当的权限,而ASP.NET的帐户

正在内部服务器上运行(NT AUTHORITY \ ANONYMOUS LOGON)没有。


是否所有机器都在同一个域上?


如果是这样,解决方案就像在内部服务器上运行ASP.NET一样简单,就像NT AUTHORITY \ ANONYMOUS LOGON一样。


如果你不能这样做......


您是在IIS服务器还是在内部服务器中冒充ASP.NET? />

如果您不是,您可以设置域帐户,在您的内部服务器上运行ASP.NET模拟

该帐户,并授予该帐户访问权限到SQL Server。
< br $>
Juan T. Llibre,asp.net MVP

aspnetfaq.com: http://www.aspnetfaq.com/

asp.net faq: http://asp.net.do/faq/

foros de asp.net,en espa?±ol: http://asp.net.do/foros/

===================================

" Sridhar" < Sr ***** @ discussion.microsoft.com写信息

新闻:F2 *********************** *********** @ microsof t.com ...


Apparently, you are connecting as that account,
but that account doesn''t have database permissions in the SQL Server.

Probably, the account which ASP.NET is running as on the IIS server has the
appropiate permissions to the SQL Server DB, while the account which ASP.NET
is running as on the internal server (NT AUTHORITY\ANONYMOUS LOGON) doesn''t.

Are all the machines on the same domain ?

If so, the solution could be as easy as running ASP.NET,
on the internal server, as NT AUTHORITY\ANONYMOUS LOGON.

If you can''t do that...

Are you impersonating ASP.NET in either the IIS Server or the internal server ?

If you aren''t, you could setup a domain account, run ASP.NET impersonating
that account on your internal server, and grant that account access right to te SQL Server.

Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en espa?±ol : http://asp.net.do/foros/
===================================
"Sridhar" <Sr*****@discussions.microsoft.comwrote in message
news:F2**********************************@microsof t.com...


HI,


I我在设置网站时遇到问题,以便只在域内使用

。我们有三台服务器。一个是iis服务器和第二个

一个是内部服务器,第三个是sql server。我已在内部服务器中部署了

Web应用程序。它无法访问另一台服务器上的sql

服务器。如果我在IIS上部署相同的应用程序,那么

工作正常。我应该如何在Internal

服务器中设置Web应用程序?请告诉我。


我尝试连接到sql server时遇到的错误



登录用户NT AUTHORITY \ ANONYMOUS LOGON失败。


谢谢,

Sridhar。


I am having problems setting up a website so that it will be available
only inside the domain. We have three servers. One is iis server and second
one is internal server and the third one is sql server. I have deployed the
web application in the internal server. It is not able to access the sql
server that is on another server. If I deploy the same application on IIS, it
is working fine. How should I set up the web application in the Internal
server? Please let me know.

The error that I am getting when it is trying to connect to sql server
is
Login failed for user ''NT AUTHORITY\ANONYMOUS LOGON''.

Thanks,
Sridhar.






re:

We有一个域帐户,可以连接到SQL服务器。我们是

冒充该帐户连接到sql server。

在我们的内部服务器中,我启用了匿名登录并设置了

用户我们拥有的域帐户的名称和密码。
We have a domain account which can connect to the sql server. We are
impersonating that account to connect to sql server.
In our internal server, I have enabled the Anonymous login and set the
user name and password of the domain account that we have.



请在内部服务器上运行此脚本:


identity.aspx:

- ------------

<%@ Page Language =" VB" %>

<%@ Import NameSpace = System.Security.Principal%>

< script runat =" server">

Sub Page_Load()

Dim tmp As String = WindowsIdentity.GetCurrent.Name()

Label1.Text = tmp

End Sub

< / script>

< html>

< head>

< title>谁ASP.NET运行为?< / title>

< / head>

< body>

< form id = " form1的" runat =" server">

< div>

< asp:Label ID =" Label1" RUNAT = QUOT;服务器" Text =" Label">< / asp:Label>

< / div>

< / form>

< ; / body>

< / html>

---------


然后,提供访问权限SQL Server数据库的权限,以及脚本返回的帐户名。


应该解决所有问题。请告诉我们你的工作方式。


Juan T. Llibre,asp.net MVP

aspnetfaq.com: http://www.aspnetfaq.com/

asp.net faq: http://asp.net.do/faq/

foros de asp.net,en espa?ol: http://asp.net.do/foros/

===================================

" Sridhar" < Sr ***** @ discuss.microsoft.com写信息

新闻:5C *********************** *********** @ microsof t.com ...

Please run this script on the internal server :

identity.aspx:
-------------
<%@ Page Language="VB" %>
<%@ Import NameSpace = System.Security.Principal %>
<script runat="server">
Sub Page_Load()
Dim tmp As String = WindowsIdentity.GetCurrent.Name()
Label1.Text = tmp
End Sub
</script>
<html>
<head>
<title>Who is ASP.NET running as ?</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:Label ID="Label1" Runat="server" Text="Label"></asp:Label>
</div>
</form>
</body>
</html>
---------

Then, give access permissions to the SQL Server DB, to the account name which the script returns.

That should fix everything. Please let us know how you do.

Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en espa?ol : http://asp.net.do/foros/
===================================
"Sridhar" <Sr*****@discussions.microsoft.comwrote in message
news:5C**********************************@microsof t.com...





我们有一个域帐户,可以连接到SQL服务器。我们是

冒充该帐户连接到sql server。在我们的内部服务器中,

我启用了匿名登录并设置了我们拥有的

域帐户的用户名和密码。但它仍然无法正常工作。在IIS服务器中,我们

使用相同的用户名和密码,它工作正常。如果有什么我遗失的话,请告诉

.


谢谢,

Sridhar。


" Juan T. Llibre"写道:
Hi,

We have a domain account which can connect to the sql server. We are
impersonating that account to connect to sql server. In our internal server,
I have enabled the Anonymous login and set the user name and password of the
domain account that we have. But still it is not working. In IIS server, we
are using the same username and password and it is working fine. Please let
me know if there is anything I am missing.

Thanks,
Sridhar.

"Juan T. Llibre" wrote:

> re:
>re:

我在尝试连接时遇到的错误到sql server

登录失败,用户''NT AUTHORITY \ ANONYMOUS LOGON''。
The error that I am getting when it is trying to connect to sql server
is Login failed for user ''NT AUTHORITY\ANONYMOUS LOGON''.


显然,您正在以该帐户连接,
但该帐户在SQL Server中没有数据库权限。

可能, ASP.NET在IIS服务器上运行的帐户具有对SQL Server数据库的适当权限,而ASP.NET
正在内部服务器上运行的帐户(NT AUTHORITY \ ANONYMOUS LOGON)不是。

所有机器都在同一个域上吗?
如果是这样,解决方案可以像运行ASP.NET一样简单,
如果你不能这样做......

你是否冒充ASP.NET IIS服务器或内部服务器?

如果您不是,您可以设置域帐户,在内部服务器上运行ASP.NET模拟该帐户,并授予该帐户对SQL Server的访问权限。

Juan T. Llibre,asp.net MVP
aspnetfaq.com: http://www.aspnetfaq.com/
asp.net faq: http://asp.net.do/faq/
foros de asp.net,en espa ?ol: http://asp.net.do/foros/
===================================
Sridhar < Sr ***** @ discuss.microsoft.com写信息
新闻:F2 *************************** ******* @ microso ft.com ...


Apparently, you are connecting as that account,
but that account doesn''t have database permissions in the SQL Server.

Probably, the account which ASP.NET is running as on the IIS server has the
appropiate permissions to the SQL Server DB, while the account which ASP.NET
is running as on the internal server (NT AUTHORITY\ANONYMOUS LOGON) doesn''t.

Are all the machines on the same domain ?

If so, the solution could be as easy as running ASP.NET,
on the internal server, as NT AUTHORITY\ANONYMOUS LOGON.

If you can''t do that...

Are you impersonating ASP.NET in either the IIS Server or the internal server ?

If you aren''t, you could setup a domain account, run ASP.NET impersonating
that account on your internal server, and grant that account access right to te SQL Server.

Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en espa?ol : http://asp.net.do/foros/
===================================
"Sridhar" <Sr*****@discussions.microsoft.comwrote in message
news:F2**********************************@microso ft.com...


HI,


我在设置时遇到问题建立一个网站,以便它只在域内使用

。我们有三台服务器。一个是iis服务器和第二个

一个是内部服务器,第三个是sql server。我已在内部服务器中部署了

Web应用程序。它无法访问另一台服务器上的sql

服务器。如果我在IIS上部署相同的应用程序,那么

工作正常。我应该如何在Internal

服务器中设置Web应用程序?请告诉我。


我尝试连接到sql server时遇到的错误



登录用户NT AUTHORITY \ ANONYMOUS LOGON失败。


谢谢,

Sridhar。


I am having problems setting up a website so that it will be available
only inside the domain. We have three servers. One is iis server and second
one is internal server and the third one is sql server. I have deployed the
web application in the internal server. It is not able to access the sql
server that is on another server. If I deploy the same application on IIS, it
is working fine. How should I set up the web application in the Internal
server? Please let me know.

The error that I am getting when it is trying to connect to sql server
is
Login failed for user ''NT AUTHORITY\ANONYMOUS LOGON''.

Thanks,
Sridhar.







这篇关于将网站设置为仅在域内可用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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