473,396 Members | 1,929 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Setting up website to be available only inside the domain

HI,

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.
Aug 7 '06 #1
10 2153
re:
The error that I am getting when it is trying to connect to sql server
is Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'.
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 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.

Aug 7 '06 #2
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:
The error that I am getting when it is trying to connect to sql server
is Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'.

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 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.


Aug 7 '06 #3
re:
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.
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...
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:
The error that I am getting when it is trying to connect to sql server
is Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'.

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,

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.



Aug 7 '06 #4
re:
The only problem I have is that the email is being sent every time the last page is
refreshed. How to disable this? How to check if the page has been refreshed?
If the action is initiated by a submit button you have no way of checking whether
the page has been refreshed or not because the page will always be a Postback.

A refresh *will* re-post all the data sent via the submit button.

One thing you could try is set the @OutputCache directive to "None" ( looking for the page
fields to have to be refilled, since they haven't been cached) but some browsers may cache anyway.

<%@ OutputCache Location="None" %>

You can also use Response.Cache.SetNoStore ();
Here's a simple C# page which doesn't get cached. Test it :

nocache.aspx
--------------
<%@ Page Language="C#" %>
<html>
<body>
<%
Response.Cache.SetNoStore();
Response.Write (DateTime.Now.ToLongTimeString ());
%>
</body>
</html>
---------

Finally, if you are using textboxes to input data, you could clear the textboxes
after submitting the data...and use a validator to insure that the textboxes must
have some data in order to process the Email send.

That way, the page refresh (after the page is submitted)
will result in the controls not being validated.

See which of those techniques works for you and let us know how you did, OK ?

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...
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:
The error that I am getting when it is trying to connect to sql server
is Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'.

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,

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.



Aug 7 '06 #5
Hi,

I have connected to the internal server through remote desktop from my
computer. when I ran the script, it is giving my windows login. But in the
IIS, I set it to another windows account and in the web.config, I set the
impersonate option to true. I am not sure why it is not working.

Thanks,
Sridhar

"Juan T. Llibre" wrote:
re:
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.

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...
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:
The error that I am getting when it is trying to connect to sql server
is Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'.

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 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.


Aug 7 '06 #6
re:
I have connected to the internal server through remote desktop from my
computer. when I ran the script, it is giving my windows login.
That makes sense.
*Everything* will run through your Windows account when you use Remote Desktop.

Can you reach your internal server via http with your browser ?

Run that script *with your browser*...and give the Windows account the
script reports the necessary SQL Server permissions for the database.

Let us know how you make out.


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:36**********************************@microsof t.com...
Hi,

I have connected to the internal server through remote desktop from my
computer. when I ran the script, it is giving my windows login. But in the
IIS, I set it to another windows account and in the web.config, I set the
impersonate option to true. I am not sure why it is not working.

Thanks,
Sridhar

"Juan T. Llibre" wrote:
>re:
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.

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**********************************@microso ft.com...
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:
The error that I am getting when it is trying to connect to sql server
is Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'.

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,

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.



Aug 7 '06 #7
If i ran the same script with in my browser, it is giving the same account
name i.e. my windows account.

"Juan T. Llibre" wrote:
re:
I have connected to the internal server through remote desktop from my
computer. when I ran the script, it is giving my windows login.

That makes sense.
*Everything* will run through your Windows account when you use Remote Desktop.

Can you reach your internal server via http with your browser ?

Run that script *with your browser*...and give the Windows account the
script reports the necessary SQL Server permissions for the database.

Let us know how you make out.


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:36**********************************@microsof t.com...
Hi,

I have connected to the internal server through remote desktop from my
computer. when I ran the script, it is giving my windows login. But in the
IIS, I set it to another windows account and in the web.config, I set the
impersonate option to true. I am not sure why it is not working.

Thanks,
Sridhar

"Juan T. Llibre" wrote:
re:
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.

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...
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:
The error that I am getting when it is trying to connect to sql server
is Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'.

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 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.



Aug 7 '06 #8
re:
If i ran the same script with in my browser, it is giving the same account
name i.e. my windows account.
OK, just to make sure we're on the same page...

You uploaded the file to your internal web server's root directory, or any other directory,
called it from your browser like this : http://internalwebservername/identity.aspx
....and it returned *your* Windows account name ?

If that's the case, you did *not* enable anonymous browsing like you said you did.

What steps did you take to "enable anonymous browsing" ?


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:A4**********************************@microsof t.com...
If i ran the same script with in my browser, it is giving the same account
name i.e. my windows account.

"Juan T. Llibre" wrote:
>re:
I have connected to the internal server through remote desktop from my
computer. when I ran the script, it is giving my windows login.

That makes sense.
*Everything* will run through your Windows account when you use Remote Desktop.

Can you reach your internal server via http with your browser ?

Run that script *with your browser*...and give the Windows account the
script reports the necessary SQL Server permissions for the database.

Let us know how you make out.


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:36**********************************@microso ft.com...
Hi,

I have connected to the internal server through remote desktop from my
computer. when I ran the script, it is giving my windows login. But in the
IIS, I set it to another windows account and in the web.config, I set the
impersonate option to true. I am not sure why it is not working.

Thanks,
Sridhar

"Juan T. Llibre" wrote:

re:
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.

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**********************************@microso ft.com...
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:
The error that I am getting when it is trying to connect to sql server
is Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'.

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,

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.




Aug 7 '06 #9
I have uploaded the files to the root directory i.e. c:\inetpub\wwwroot. I
have enabled the anonymous login using the steps below.

First I went to IIS and right clicked on the virtual directory. Then
selected properties. There I went to Directory Security -Clicked on Edit of
Anonymous Access and Authentication Control. Then I clicked the checkbox
saying Anonymous access and entered the windows username and pwd by clicking
on edit button.
Also I have entered "identity impersonate=true" in web.config file.

Other that that, I haven't done anything. These are the same steps that I
followed when putting the website in IIS server. And it is working fine. But
when I do the same steps in Internal server, it is not working. Do I need to
do anything else?
Please let me know.

Thanks for your patience.

Sridhar.

"Juan T. Llibre" wrote:
re:
If i ran the same script with in my browser, it is giving the same account
name i.e. my windows account.

OK, just to make sure we're on the same page...

You uploaded the file to your internal web server's root directory, or any other directory,
called it from your browser like this : http://internalwebservername/identity.aspx
....and it returned *your* Windows account name ?

If that's the case, you did *not* enable anonymous browsing like you said you did.

What steps did you take to "enable anonymous browsing" ?


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:A4**********************************@microsof t.com...
If i ran the same script with in my browser, it is giving the same account
name i.e. my windows account.

"Juan T. Llibre" wrote:
re:
I have connected to the internal server through remote desktop from my
computer. when I ran the script, it is giving my windows login.

That makes sense.
*Everything* will run through your Windows account when you use Remote Desktop.

Can you reach your internal server via http with your browser ?

Run that script *with your browser*...and give the Windows account the
script reports the necessary SQL Server permissions for the database.

Let us know how you make out.


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:36**********************************@microsof t.com...
Hi,

I have connected to the internal server through remote desktop from my
computer. when I ran the script, it is giving my windows login. But in the
IIS, I set it to another windows account and in the web.config, I set the
impersonate option to true. I am not sure why it is not working.

Thanks,
Sridhar

"Juan T. Llibre" wrote:

re:
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.

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...
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:
The error that I am getting when it is trying to connect to sql server
is Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'.

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 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.




Aug 7 '06 #10
re:
Then I clicked the checkbox saying Anonymous access and entered
the windows username and pwd by clicking on edit button.
Sridhar,

Anonymous access means just that : anonymous access.

If you use a Windows account as your "anonymous access" account,
then *that* account is the one which will be authenticated as the Anonymous account.

That is why *your* account name is being returned.

For anonymous browsing, you should be using the server's IUSR_MachineName account.

If you changed the Anonymous user after clicking on the "Edit" button,
change it back to the server's IUSR_MachineName account and password.

If you don't know or don't remember the password for the Anonymous account,
go to your user manager and change the IUSR_MachineName account's password
to something which you can remember and write when you edit the anonymous account
you want to use in the IIS Manager.

Test the script again after you make the changes outlined above,
and post the results you got.

re:
Also I have entered "identity impersonate=true" in web.config file.
And...which account did you setup as the impersonated account in web.config ?

You should have something like :

<identity impersonate="true" userName="someaccount" password="somepassword" />

Do you ?

If you *do* impersonate here...that's the account which needs permissions to the SQL Server DB.

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:FF**********************************@microsof t.com...
>I have uploaded the files to the root directory i.e. c:\inetpub\wwwroot. I
have enabled the anonymous login using the steps below.

First I went to IIS and right clicked on the virtual directory. Then
selected properties. There I went to Directory Security -Clicked on Edit of
Anonymous Access and Authentication Control. Then I clicked the checkbox
saying Anonymous access and entered the windows username and pwd by clicking
on edit button.
Also I have entered "identity impersonate=true" in web.config file.

Other that that, I haven't done anything. These are the same steps that I
followed when putting the website in IIS server. And it is working fine. But
when I do the same steps in Internal server, it is not working. Do I need to
do anything else?
Please let me know.

Thanks for your patience.

Sridhar.

"Juan T. Llibre" wrote:
>re:
If i ran the same script with in my browser, it is giving the same account
name i.e. my windows account.

OK, just to make sure we're on the same page...

You uploaded the file to your internal web server's root directory, or any other directory,
called it from your browser like this : http://internalwebservername/identity.aspx
....and it returned *your* Windows account name ?

If that's the case, you did *not* enable anonymous browsing like you said you did.

What steps did you take to "enable anonymous browsing" ?


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:A4**********************************@microso ft.com...
If i ran the same script with in my browser, it is giving the same account
name i.e. my windows account.

"Juan T. Llibre" wrote:

re:
I have connected to the internal server through remote desktop from my
computer. when I ran the script, it is giving my windows login.

That makes sense.
*Everything* will run through your Windows account when you use Remote Desktop.

Can you reach your internal server via http with your browser ?

Run that script *with your browser*...and give the Windows account the
script reports the necessary SQL Server permissions for the database.

Let us know how you make out.


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:36**********************************@microso ft.com...
Hi,

I have connected to the internal server through remote desktop from my
computer. when I ran the script, it is giving my windows login. But in the
IIS, I set it to another windows account and in the web.config, I set the
impersonate option to true. I am not sure why it is not working.

Thanks,
Sridhar

"Juan T. Llibre" wrote:

re:
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.

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**********************************@microso ft.com...
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:
The error that I am getting when it is trying to connect to sql server
is Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'.

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,

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.





Aug 8 '06 #11

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Jonathan Wood | last post by:
Greetings, I have extensive programming experience (nearly 20 years) but have yet to write a full-blown Web application. In fact, I have done hardly any server/client/database programming at...
1
by: sck10 | last post by:
Hello, Can you set up a website inside of a website. I have a main website at our company: parentwebsite.web.company.com. In the path are a couple of directories: ...
2
by: Sridhar | last post by:
Hi, I have created a web application using ASP.NET v1.1. I would like to set up this web application so that it would be available only inside the domain. So I copied the web application and put...
1
by: Krustov | last post by:
www.phpwhois.co.uk Although not 100% finished its really just a case of filling in the blanks in some parts of the website to finish it . Apart from a keep checking and email me when a domain...
3
by: Aaron | last post by:
I'm trying to parse a table on a webpage to pull down some data I need. The page is based off of information entered into a form. when you submit the data from the form it displays a...
1
by: selvamcbe | last post by:
sir I have a problem with installtion of phpbb 2 Forum in my website... I am having a website named http://www.clickonlinejobs.com Also i plan to include forum with it.So i have added my forum in...
9
by: DL | last post by:
That is, for an iframe with onload attribute to preset a width and height then depending on the length of its content to auto-expand instead of scrolling. The following URL is quite interesting,...
6
by: Mandar | last post by:
Hi, I have written some code in C# to programmatically create a website and an application pool. Both seems to be getting created alright with whatever settings I have applied. However, when I...
1
by: nicerun | last post by:
I'm using the Application_Start event at Global.asax.cs to invoke thread that do some job. I know that Application_Start event occurs when the very first request to Web Application received. -...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.