HTTP 401.2 problems when writing data to SQL server

HTTP 401.2 problems when writing data to SQL server

am 27.10.2005 12:23:58 von JP

hi there

we have an Intranet site ( hosted on IIS 6 on Windows 2003 ) that connects
to a SQL DB via an ASP page ( hosted on SQL 2000 on Windows 2000 ). Both
servers are located in the same AD site, and users can use the ASP page with
no problems

However from another AD site ( same domain ) they can connect to the DB and
read data but when they try to write back to the database they are prompted
for a username and password. Nothing entered seems to work and then they
receive either a HTTP 401.2 or HTTP 401.1 error message.

The same user account is used at both AD Sites. Other db's setup this way
work okay?

Any help would be appreciated.

Re: HTTP 401.2 problems when writing data to SQL server

am 27.10.2005 12:33:30 von reb01501

JP wrote:
> hi there
>
> we have an Intranet site ( hosted on IIS 6 on Windows 2003 ) that
> connects to a SQL DB via an ASP page ( hosted on SQL 2000 on Windows
> 2000 ). Both servers are located in the same AD site, and users can
> use the ASP page with no problems
>
> However from another AD site ( same domain ) they can connect to the
> DB and read data but when they try to write back to the database they
> are prompted for a username and password. Nothing entered seems to
> work and then they receive either a HTTP 401.2 or HTTP 401.1 error
> message.
>
> The same user account is used at both AD Sites. Other db's setup
> this way work okay?
>

Hard to say without seeing your connection string (censored of course if it
contains user id and password info)

Are you using Integrated or mixed security for your SQL Server?

Bob Barrows
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"

Re: HTTP 401.2 problems when writing data to SQL server

am 27.10.2005 12:54:03 von JP

hi there

the connection string is

strMainConn = "Provider=SQLOLEDB;Initial Catalog=DBName;Data
Source=SERVERNAME;Trusted_Connection=yes;Integrated Security=SSPI;"

The SQL server is running in mixed mode, and the IIS site is set to
Integrated with anonyomous access unchecked.

JP

"Bob Barrows [MVP]" wrote:

> JP wrote:
> > hi there
> >
> > we have an Intranet site ( hosted on IIS 6 on Windows 2003 ) that
> > connects to a SQL DB via an ASP page ( hosted on SQL 2000 on Windows
> > 2000 ). Both servers are located in the same AD site, and users can
> > use the ASP page with no problems
> >
> > However from another AD site ( same domain ) they can connect to the
> > DB and read data but when they try to write back to the database they
> > are prompted for a username and password. Nothing entered seems to
> > work and then they receive either a HTTP 401.2 or HTTP 401.1 error
> > message.
> >
> > The same user account is used at both AD Sites. Other db's setup
> > this way work okay?
> >
>
> Hard to say without seeing your connection string (censored of course if it
> contains user id and password info)
>
> Are you using Integrated or mixed security for your SQL Server?
>
> Bob Barrows
> --
> Microsoft MVP - ASP/ASP.NET
> Please reply to the newsgroup. This email account is my spam trap so I
> don't check it very often. If you must reply off-line, then remove the
> "NO SPAM"
>
>
>

Re: HTTP 401.2 problems when writing data to SQL server

am 27.10.2005 13:10:04 von reb01501

OK, that means either
a) the Windows credentials are not being passed for some reason.
b) the credentials for the users at one site do not have the same
permissions as those at the other

You said the two sites are in the same domain. I assume the users of both
sites have been granted permissions in the sql server ...

Re. the 401 errors: It's strange that the error does not occur when reading
data. Are data modifications being done on a page outside of the site? Are
you using XMLHTTP, for instance?

JP wrote:
> hi there
>
> the connection string is
>
> strMainConn = "Provider=SQLOLEDB;Initial Catalog=DBName;Data
> Source=SERVERNAME;Trusted_Connection=yes;Integrated Security=SSPI;"
>
> The SQL server is running in mixed mode, and the IIS site is set to
> Integrated with anonyomous access unchecked.
>
> JP
>
> "Bob Barrows [MVP]" wrote:
>
>> JP wrote:
>>> hi there
>>>
>>> we have an Intranet site ( hosted on IIS 6 on Windows 2003 ) that
>>> connects to a SQL DB via an ASP page ( hosted on SQL 2000 on Windows
>>> 2000 ). Both servers are located in the same AD site, and users can
>>> use the ASP page with no problems
>>>
>>> However from another AD site ( same domain ) they can connect to the
>>> DB and read data but when they try to write back to the database
>>> they are prompted for a username and password. Nothing entered
>>> seems to
>>> work and then they receive either a HTTP 401.2 or HTTP 401.1 error
>>> message.
>>>
>>> The same user account is used at both AD Sites. Other db's setup
>>> this way work okay?
>>>
>>
>> Hard to say without seeing your connection string (censored of
>> course if it contains user id and password info)
>>
>> Are you using Integrated or mixed security for your SQL Server?
>>
>> Bob Barrows
>> --
>> Microsoft MVP - ASP/ASP.NET
>> Please reply to the newsgroup. This email account is my spam trap so
>> I don't check it very often. If you must reply off-line, then remove
>> the "NO SPAM"

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"

Re: HTTP 401.2 problems when writing data to SQL server

am 27.10.2005 14:09:01 von JP

thanks for the reply

the user account is a member of an AD group which in turn has DBO
permissions on the SQL server.

All the data mods are from the site. I was wondering if I needed to create
a SQL user and then try connecting with that? as it looks like what you said
about Windows credentials not being passed.

JP
"Bob Barrows [MVP]" wrote:

> OK, that means either
> a) the Windows credentials are not being passed for some reason.
> b) the credentials for the users at one site do not have the same
> permissions as those at the other
>
> You said the two sites are in the same domain. I assume the users of both
> sites have been granted permissions in the sql server ...
>
> Re. the 401 errors: It's strange that the error does not occur when reading
> data. Are data modifications being done on a page outside of the site? Are
> you using XMLHTTP, for instance?
>
> JP wrote:
> > hi there
> >
> > the connection string is
> >
> > strMainConn = "Provider=SQLOLEDB;Initial Catalog=DBName;Data
> > Source=SERVERNAME;Trusted_Connection=yes;Integrated Security=SSPI;"
> >
> > The SQL server is running in mixed mode, and the IIS site is set to
> > Integrated with anonyomous access unchecked.
> >
> > JP
> >
> > "Bob Barrows [MVP]" wrote:
> >
> >> JP wrote:
> >>> hi there
> >>>
> >>> we have an Intranet site ( hosted on IIS 6 on Windows 2003 ) that
> >>> connects to a SQL DB via an ASP page ( hosted on SQL 2000 on Windows
> >>> 2000 ). Both servers are located in the same AD site, and users can
> >>> use the ASP page with no problems
> >>>
> >>> However from another AD site ( same domain ) they can connect to the
> >>> DB and read data but when they try to write back to the database
> >>> they are prompted for a username and password. Nothing entered
> >>> seems to
> >>> work and then they receive either a HTTP 401.2 or HTTP 401.1 error
> >>> message.
> >>>
> >>> The same user account is used at both AD Sites. Other db's setup
> >>> this way work okay?
> >>>
> >>
> >> Hard to say without seeing your connection string (censored of
> >> course if it contains user id and password info)
> >>
> >> Are you using Integrated or mixed security for your SQL Server?
> >>
> >> Bob Barrows
> >> --
> >> Microsoft MVP - ASP/ASP.NET
> >> Please reply to the newsgroup. This email account is my spam trap so
> >> I don't check it very often. If you must reply off-line, then remove
> >> the "NO SPAM"
>
> --
> Microsoft MVP - ASP/ASP.NET
> Please reply to the newsgroup. This email account is my spam trap so I
> don't check it very often. If you must reply off-line, then remove the
> "NO SPAM"
>
>
>

Re: HTTP 401.2 problems when writing data to SQL server

am 27.10.2005 15:00:12 von reb01501

I would start by using SQL Profiler to monitor the logins. Add the Login
Failed event to the trace. Check the NTUserName and LoginName columns for
users for whom the application works and compare to users for whom it
doesn't work.

On the page that does the data modification, I would use Response.Write
"Your user credentials are " & request.servervariables("LOGON_USER") to
verify that the correct credentials are being used (I assume this problem
occurs for you when you attempt to use the application on the problem site,
correct?)

You may want to get the guys over at the .iis group involved in this
discussion. In fact, I'm going to crosspost this reply to that group to see
if anyone there can shed some light.

Bob Barrows
JP wrote:
> thanks for the reply
>
> the user account is a member of an AD group which in turn has DBO
> permissions on the SQL server.
>
> All the data mods are from the site. I was wondering if I needed to
> create a SQL user and then try connecting with that? as it looks like
> what you said about Windows credentials not being passed.
>
> JP
> "Bob Barrows [MVP]" wrote:
>
>> OK, that means either
>> a) the Windows credentials are not being passed for some reason.
>> b) the credentials for the users at one site do not have the same
>> permissions as those at the other
>>
>> You said the two sites are in the same domain. I assume the users of
>> both sites have been granted permissions in the sql server ...
>>
>> Re. the 401 errors: It's strange that the error does not occur when
>> reading data. Are data modifications being done on a page outside of
>> the site? Are you using XMLHTTP, for instance?
>>
>> JP wrote:
>>> hi there
>>>
>>> the connection string is
>>>
>>> strMainConn = "Provider=SQLOLEDB;Initial Catalog=DBName;Data
>>> Source=SERVERNAME;Trusted_Connection=yes;Integrated Security=SSPI;"
>>>
>>> The SQL server is running in mixed mode, and the IIS site is set to
>>> Integrated with anonyomous access unchecked.
>>>
>>> JP
>>>
>>> "Bob Barrows [MVP]" wrote:
>>>
>>>> JP wrote:
>>>>> hi there
>>>>>
>>>>> we have an Intranet site ( hosted on IIS 6 on Windows 2003 ) that
>>>>> connects to a SQL DB via an ASP page ( hosted on SQL 2000 on
>>>>> Windows 2000 ). Both servers are located in the same AD site,
>>>>> and users can use the ASP page with no problems
>>>>>
>>>>> However from another AD site ( same domain ) they can connect to
>>>>> the DB and read data but when they try to write back to the
>>>>> database they are prompted for a username and password. Nothing
>>>>> entered seems to
>>>>> work and then they receive either a HTTP 401.2 or HTTP 401.1 error
>>>>> message.
>>>>>
>>>>> The same user account is used at both AD Sites. Other db's setup
>>>>> this way work okay?
>>>>>
>>>>
>>>> Hard to say without seeing your connection string (censored of
>>>> course if it contains user id and password info)
>>>>
>>>> Are you using Integrated or mixed security for your SQL Server?
>>>>
>>>> Bob Barrows
>>>> --
>>>> Microsoft MVP - ASP/ASP.NET
>>>> Please reply to the newsgroup. This email account is my spam trap
>>>> so I don't check it very often. If you must reply off-line, then
>>>> remove the "NO SPAM"
>>
>> --
>> Microsoft MVP - ASP/ASP.NET
>> Please reply to the newsgroup. This email account is my spam trap so
>> I don't check it very often. If you must reply off-line, then remove
>> the "NO SPAM"

--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.

Re: HTTP 401.2 problems when writing data to SQL server

am 27.10.2005 15:00:12 von reb01501

I would start by using SQL Profiler to monitor the logins. Add the Login
Failed event to the trace. Check the NTUserName and LoginName columns for
users for whom the application works and compare to users for whom it
doesn't work.

On the page that does the data modification, I would use Response.Write
"Your user credentials are " & request.servervariables("LOGON_USER") to
verify that the correct credentials are being used (I assume this problem
occurs for you when you attempt to use the application on the problem site,
correct?)

You may want to get the guys over at the .iis group involved in this
discussion. In fact, I'm going to crosspost this reply to that group to see
if anyone there can shed some light.

Bob Barrows
JP wrote:
> thanks for the reply
>
> the user account is a member of an AD group which in turn has DBO
> permissions on the SQL server.
>
> All the data mods are from the site. I was wondering if I needed to
> create a SQL user and then try connecting with that? as it looks like
> what you said about Windows credentials not being passed.
>
> JP
> "Bob Barrows [MVP]" wrote:
>
>> OK, that means either
>> a) the Windows credentials are not being passed for some reason.
>> b) the credentials for the users at one site do not have the same
>> permissions as those at the other
>>
>> You said the two sites are in the same domain. I assume the users of
>> both sites have been granted permissions in the sql server ...
>>
>> Re. the 401 errors: It's strange that the error does not occur when
>> reading data. Are data modifications being done on a page outside of
>> the site? Are you using XMLHTTP, for instance?
>>
>> JP wrote:
>>> hi there
>>>
>>> the connection string is
>>>
>>> strMainConn = "Provider=SQLOLEDB;Initial Catalog=DBName;Data
>>> Source=SERVERNAME;Trusted_Connection=yes;Integrated Security=SSPI;"
>>>
>>> The SQL server is running in mixed mode, and the IIS site is set to
>>> Integrated with anonyomous access unchecked.
>>>
>>> JP
>>>
>>> "Bob Barrows [MVP]" wrote:
>>>
>>>> JP wrote:
>>>>> hi there
>>>>>
>>>>> we have an Intranet site ( hosted on IIS 6 on Windows 2003 ) that
>>>>> connects to a SQL DB via an ASP page ( hosted on SQL 2000 on
>>>>> Windows 2000 ). Both servers are located in the same AD site,
>>>>> and users can use the ASP page with no problems
>>>>>
>>>>> However from another AD site ( same domain ) they can connect to
>>>>> the DB and read data but when they try to write back to the
>>>>> database they are prompted for a username and password. Nothing
>>>>> entered seems to
>>>>> work and then they receive either a HTTP 401.2 or HTTP 401.1 error
>>>>> message.
>>>>>
>>>>> The same user account is used at both AD Sites. Other db's setup
>>>>> this way work okay?
>>>>>
>>>>
>>>> Hard to say without seeing your connection string (censored of
>>>> course if it contains user id and password info)
>>>>
>>>> Are you using Integrated or mixed security for your SQL Server?
>>>>
>>>> Bob Barrows
>>>> --
>>>> Microsoft MVP - ASP/ASP.NET
>>>> Please reply to the newsgroup. This email account is my spam trap
>>>> so I don't check it very often. If you must reply off-line, then
>>>> remove the "NO SPAM"
>>
>> --
>> Microsoft MVP - ASP/ASP.NET
>> Please reply to the newsgroup. This email account is my spam trap so
>> I don't check it very often. If you must reply off-line, then remove
>> the "NO SPAM"

--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.

Re: HTTP 401.2 problems when writing data to SQL server

am 27.10.2005 15:37:20 von JP

hi again

thanks for the reply. I will start a trace ( and remember to tell the other
SQL admins this time before the worry ) .

and yes your assumption is correct about the problem occuring only on the
other site.

JP

"Bob Barrows [MVP]" wrote:

> I would start by using SQL Profiler to monitor the logins. Add the Login
> Failed event to the trace. Check the NTUserName and LoginName columns for
> users for whom the application works and compare to users for whom it
> doesn't work.
>
> On the page that does the data modification, I would use Response.Write
> "Your user credentials are " & request.servervariables("LOGON_USER") to
> verify that the correct credentials are being used (I assume this problem
> occurs for you when you attempt to use the application on the problem site,
> correct?)
>
> You may want to get the guys over at the .iis group involved in this
> discussion. In fact, I'm going to crosspost this reply to that group to see
> if anyone there can shed some light.
>
> Bob Barrows
> JP wrote:
> > thanks for the reply
> >
> > the user account is a member of an AD group which in turn has DBO
> > permissions on the SQL server.
> >
> > All the data mods are from the site. I was wondering if I needed to
> > create a SQL user and then try connecting with that? as it looks like
> > what you said about Windows credentials not being passed.
> >
> > JP
> > "Bob Barrows [MVP]" wrote:
> >
> >> OK, that means either
> >> a) the Windows credentials are not being passed for some reason.
> >> b) the credentials for the users at one site do not have the same
> >> permissions as those at the other
> >>
> >> You said the two sites are in the same domain. I assume the users of
> >> both sites have been granted permissions in the sql server ...
> >>
> >> Re. the 401 errors: It's strange that the error does not occur when
> >> reading data. Are data modifications being done on a page outside of
> >> the site? Are you using XMLHTTP, for instance?
> >>
> >> JP wrote:
> >>> hi there
> >>>
> >>> the connection string is
> >>>
> >>> strMainConn = "Provider=SQLOLEDB;Initial Catalog=DBName;Data
> >>> Source=SERVERNAME;Trusted_Connection=yes;Integrated Security=SSPI;"
> >>>
> >>> The SQL server is running in mixed mode, and the IIS site is set to
> >>> Integrated with anonyomous access unchecked.
> >>>
> >>> JP
> >>>
> >>> "Bob Barrows [MVP]" wrote:
> >>>
> >>>> JP wrote:
> >>>>> hi there
> >>>>>
> >>>>> we have an Intranet site ( hosted on IIS 6 on Windows 2003 ) that
> >>>>> connects to a SQL DB via an ASP page ( hosted on SQL 2000 on
> >>>>> Windows 2000 ). Both servers are located in the same AD site,
> >>>>> and users can use the ASP page with no problems
> >>>>>
> >>>>> However from another AD site ( same domain ) they can connect to
> >>>>> the DB and read data but when they try to write back to the
> >>>>> database they are prompted for a username and password. Nothing
> >>>>> entered seems to
> >>>>> work and then they receive either a HTTP 401.2 or HTTP 401.1 error
> >>>>> message.
> >>>>>
> >>>>> The same user account is used at both AD Sites. Other db's setup
> >>>>> this way work okay?
> >>>>>
> >>>>
> >>>> Hard to say without seeing your connection string (censored of
> >>>> course if it contains user id and password info)
> >>>>
> >>>> Are you using Integrated or mixed security for your SQL Server?
> >>>>
> >>>> Bob Barrows
> >>>> --
> >>>> Microsoft MVP - ASP/ASP.NET
> >>>> Please reply to the newsgroup. This email account is my spam trap
> >>>> so I don't check it very often. If you must reply off-line, then
> >>>> remove the "NO SPAM"
> >>
> >> --
> >> Microsoft MVP - ASP/ASP.NET
> >> Please reply to the newsgroup. This email account is my spam trap so
> >> I don't check it very often. If you must reply off-line, then remove
> >> the "NO SPAM"
>
> --
> Microsoft MVP -- ASP/ASP.NET
> Please reply to the newsgroup. The email account listed in my From
> header is my spam trap, so I don't check it very often. You will get a
> quicker response by posting to the newsgroup.
>
>
>
>
>

Re: HTTP 401.2 problems when writing data to SQL server

am 27.10.2005 15:37:20 von JP

hi again

thanks for the reply. I will start a trace ( and remember to tell the other
SQL admins this time before the worry ) .

and yes your assumption is correct about the problem occuring only on the
other site.

JP

"Bob Barrows [MVP]" wrote:

> I would start by using SQL Profiler to monitor the logins. Add the Login
> Failed event to the trace. Check the NTUserName and LoginName columns for
> users for whom the application works and compare to users for whom it
> doesn't work.
>
> On the page that does the data modification, I would use Response.Write
> "Your user credentials are " & request.servervariables("LOGON_USER") to
> verify that the correct credentials are being used (I assume this problem
> occurs for you when you attempt to use the application on the problem site,
> correct?)
>
> You may want to get the guys over at the .iis group involved in this
> discussion. In fact, I'm going to crosspost this reply to that group to see
> if anyone there can shed some light.
>
> Bob Barrows
> JP wrote:
> > thanks for the reply
> >
> > the user account is a member of an AD group which in turn has DBO
> > permissions on the SQL server.
> >
> > All the data mods are from the site. I was wondering if I needed to
> > create a SQL user and then try connecting with that? as it looks like
> > what you said about Windows credentials not being passed.
> >
> > JP
> > "Bob Barrows [MVP]" wrote:
> >
> >> OK, that means either
> >> a) the Windows credentials are not being passed for some reason.
> >> b) the credentials for the users at one site do not have the same
> >> permissions as those at the other
> >>
> >> You said the two sites are in the same domain. I assume the users of
> >> both sites have been granted permissions in the sql server ...
> >>
> >> Re. the 401 errors: It's strange that the error does not occur when
> >> reading data. Are data modifications being done on a page outside of
> >> the site? Are you using XMLHTTP, for instance?
> >>
> >> JP wrote:
> >>> hi there
> >>>
> >>> the connection string is
> >>>
> >>> strMainConn = "Provider=SQLOLEDB;Initial Catalog=DBName;Data
> >>> Source=SERVERNAME;Trusted_Connection=yes;Integrated Security=SSPI;"
> >>>
> >>> The SQL server is running in mixed mode, and the IIS site is set to
> >>> Integrated with anonyomous access unchecked.
> >>>
> >>> JP
> >>>
> >>> "Bob Barrows [MVP]" wrote:
> >>>
> >>>> JP wrote:
> >>>>> hi there
> >>>>>
> >>>>> we have an Intranet site ( hosted on IIS 6 on Windows 2003 ) that
> >>>>> connects to a SQL DB via an ASP page ( hosted on SQL 2000 on
> >>>>> Windows 2000 ). Both servers are located in the same AD site,
> >>>>> and users can use the ASP page with no problems
> >>>>>
> >>>>> However from another AD site ( same domain ) they can connect to
> >>>>> the DB and read data but when they try to write back to the
> >>>>> database they are prompted for a username and password. Nothing
> >>>>> entered seems to
> >>>>> work and then they receive either a HTTP 401.2 or HTTP 401.1 error
> >>>>> message.
> >>>>>
> >>>>> The same user account is used at both AD Sites. Other db's setup
> >>>>> this way work okay?
> >>>>>
> >>>>
> >>>> Hard to say without seeing your connection string (censored of
> >>>> course if it contains user id and password info)
> >>>>
> >>>> Are you using Integrated or mixed security for your SQL Server?
> >>>>
> >>>> Bob Barrows
> >>>> --
> >>>> Microsoft MVP - ASP/ASP.NET
> >>>> Please reply to the newsgroup. This email account is my spam trap
> >>>> so I don't check it very often. If you must reply off-line, then
> >>>> remove the "NO SPAM"
> >>
> >> --
> >> Microsoft MVP - ASP/ASP.NET
> >> Please reply to the newsgroup. This email account is my spam trap so
> >> I don't check it very often. If you must reply off-line, then remove
> >> the "NO SPAM"
>
> --
> Microsoft MVP -- ASP/ASP.NET
> Please reply to the newsgroup. The email account listed in my From
> header is my spam trap, so I don't check it very often. You will get a
> quicker response by posting to the newsgroup.
>
>
>
>
>

Re: HTTP 401.2 problems when writing data to SQL server

am 27.10.2005 16:23:43 von reb01501

I was asking if you were able to reproduce the problem youself on the
problem site. Or are only certain users at that site experiencing the
problem?
JP wrote:
> hi again
>
> thanks for the reply. I will start a trace ( and remember to tell
> the other SQL admins this time before the worry ) .
>
> and yes your assumption is correct about the problem occuring only on
> the other site.
>
> JP
>
> "Bob Barrows [MVP]" wrote:
>
>> I would start by using SQL Profiler to monitor the logins. Add the
>> Login Failed event to the trace. Check the NTUserName and LoginName
>> columns for users for whom the application works and compare to
>> users for whom it doesn't work.
>>
>> On the page that does the data modification, I would use
>> Response.Write "Your user credentials are " &
>> request.servervariables("LOGON_USER") to verify that the correct
>> credentials are being used (I assume this problem occurs for you
>> when you attempt to use the application on the problem site,
>> correct?)
>>
>> You may want to get the guys over at the .iis group involved in this
>> discussion. In fact, I'm going to crosspost this reply to that group
>> to see if anyone there can shed some light.
>>
>> Bob Barrows
>> JP wrote:
>>> thanks for the reply
>>>
>>> the user account is a member of an AD group which in turn has DBO
>>> permissions on the SQL server.
>>>
>>> All the data mods are from the site. I was wondering if I needed to
>>> create a SQL user and then try connecting with that? as it looks
>>> like what you said about Windows credentials not being passed.
>>>
>>> JP
>>> "Bob Barrows [MVP]" wrote:
>>>
>>>> OK, that means either
>>>> a) the Windows credentials are not being passed for some reason.
>>>> b) the credentials for the users at one site do not have the same
>>>> permissions as those at the other
>>>>
>>>> You said the two sites are in the same domain. I assume the users
>>>> of both sites have been granted permissions in the sql server ...
>>>>
>>>> Re. the 401 errors: It's strange that the error does not occur when
>>>> reading data. Are data modifications being done on a page outside
>>>> of the site? Are you using XMLHTTP, for instance?
>>>>
>>>> JP wrote:
>>>>> hi there
>>>>>
>>>>> the connection string is
>>>>>
>>>>> strMainConn = "Provider=SQLOLEDB;Initial Catalog=DBName;Data
>>>>> Source=SERVERNAME;Trusted_Connection=yes;Integrated
>>>>> Security=SSPI;"
>>>>>
>>>>> The SQL server is running in mixed mode, and the IIS site is set
>>>>> to Integrated with anonyomous access unchecked.
>>>>>
>>>>> JP
>>>>>
>>>>> "Bob Barrows [MVP]" wrote:
>>>>>
>>>>>> JP wrote:
>>>>>>> hi there
>>>>>>>
>>>>>>> we have an Intranet site ( hosted on IIS 6 on Windows 2003 )
>>>>>>> that connects to a SQL DB via an ASP page ( hosted on SQL 2000
>>>>>>> on Windows 2000 ). Both servers are located in the same AD
>>>>>>> site, and users can use the ASP page with no problems
>>>>>>>
>>>>>>> However from another AD site ( same domain ) they can connect to
>>>>>>> the DB and read data but when they try to write back to the
>>>>>>> database they are prompted for a username and password. Nothing
>>>>>>> entered seems to
>>>>>>> work and then they receive either a HTTP 401.2 or HTTP 401.1
>>>>>>> error message.
>>>>>>>
>>>>>>> The same user account is used at both AD Sites. Other db's
>>>>>>> setup this way work okay?
>>>>>>>
>>>>>>
>>>>>> Hard to say without seeing your connection string (censored of
>>>>>> course if it contains user id and password info)
>>>>>>
>>>>>> Are you using Integrated or mixed security for your SQL Server?
>>>>>>
>>>>>> Bob Barrows
>>>>>> --
>>>>>> Microsoft MVP - ASP/ASP.NET
>>>>>> Please reply to the newsgroup. This email account is my spam trap
>>>>>> so I don't check it very often. If you must reply off-line, then
>>>>>> remove the "NO SPAM"
>>>>
>>>> --
>>>> Microsoft MVP - ASP/ASP.NET
>>>> Please reply to the newsgroup. This email account is my spam trap
>>>> so I don't check it very often. If you must reply off-line, then
>>>> remove the "NO SPAM"
>>
>> --
>> Microsoft MVP -- ASP/ASP.NET
>> Please reply to the newsgroup. The email account listed in my From
>> header is my spam trap, so I don't check it very often. You will get
>> a quicker response by posting to the newsgroup.

--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.

Re: HTTP 401.2 problems when writing data to SQL server

am 27.10.2005 16:23:43 von reb01501

I was asking if you were able to reproduce the problem youself on the
problem site. Or are only certain users at that site experiencing the
problem?
JP wrote:
> hi again
>
> thanks for the reply. I will start a trace ( and remember to tell
> the other SQL admins this time before the worry ) .
>
> and yes your assumption is correct about the problem occuring only on
> the other site.
>
> JP
>
> "Bob Barrows [MVP]" wrote:
>
>> I would start by using SQL Profiler to monitor the logins. Add the
>> Login Failed event to the trace. Check the NTUserName and LoginName
>> columns for users for whom the application works and compare to
>> users for whom it doesn't work.
>>
>> On the page that does the data modification, I would use
>> Response.Write "Your user credentials are " &
>> request.servervariables("LOGON_USER") to verify that the correct
>> credentials are being used (I assume this problem occurs for you
>> when you attempt to use the application on the problem site,
>> correct?)
>>
>> You may want to get the guys over at the .iis group involved in this
>> discussion. In fact, I'm going to crosspost this reply to that group
>> to see if anyone there can shed some light.
>>
>> Bob Barrows
>> JP wrote:
>>> thanks for the reply
>>>
>>> the user account is a member of an AD group which in turn has DBO
>>> permissions on the SQL server.
>>>
>>> All the data mods are from the site. I was wondering if I needed to
>>> create a SQL user and then try connecting with that? as it looks
>>> like what you said about Windows credentials not being passed.
>>>
>>> JP
>>> "Bob Barrows [MVP]" wrote:
>>>
>>>> OK, that means either
>>>> a) the Windows credentials are not being passed for some reason.
>>>> b) the credentials for the users at one site do not have the same
>>>> permissions as those at the other
>>>>
>>>> You said the two sites are in the same domain. I assume the users
>>>> of both sites have been granted permissions in the sql server ...
>>>>
>>>> Re. the 401 errors: It's strange that the error does not occur when
>>>> reading data. Are data modifications being done on a page outside
>>>> of the site? Are you using XMLHTTP, for instance?
>>>>
>>>> JP wrote:
>>>>> hi there
>>>>>
>>>>> the connection string is
>>>>>
>>>>> strMainConn = "Provider=SQLOLEDB;Initial Catalog=DBName;Data
>>>>> Source=SERVERNAME;Trusted_Connection=yes;Integrated
>>>>> Security=SSPI;"
>>>>>
>>>>> The SQL server is running in mixed mode, and the IIS site is set
>>>>> to Integrated with anonyomous access unchecked.
>>>>>
>>>>> JP
>>>>>
>>>>> "Bob Barrows [MVP]" wrote:
>>>>>
>>>>>> JP wrote:
>>>>>>> hi there
>>>>>>>
>>>>>>> we have an Intranet site ( hosted on IIS 6 on Windows 2003 )
>>>>>>> that connects to a SQL DB via an ASP page ( hosted on SQL 2000
>>>>>>> on Windows 2000 ). Both servers are located in the same AD
>>>>>>> site, and users can use the ASP page with no problems
>>>>>>>
>>>>>>> However from another AD site ( same domain ) they can connect to
>>>>>>> the DB and read data but when they try to write back to the
>>>>>>> database they are prompted for a username and password. Nothing
>>>>>>> entered seems to
>>>>>>> work and then they receive either a HTTP 401.2 or HTTP 401.1
>>>>>>> error message.
>>>>>>>
>>>>>>> The same user account is used at both AD Sites. Other db's
>>>>>>> setup this way work okay?
>>>>>>>
>>>>>>
>>>>>> Hard to say without seeing your connection string (censored of
>>>>>> course if it contains user id and password info)
>>>>>>
>>>>>> Are you using Integrated or mixed security for your SQL Server?
>>>>>>
>>>>>> Bob Barrows
>>>>>> --
>>>>>> Microsoft MVP - ASP/ASP.NET
>>>>>> Please reply to the newsgroup. This email account is my spam trap
>>>>>> so I don't check it very often. If you must reply off-line, then
>>>>>> remove the "NO SPAM"
>>>>
>>>> --
>>>> Microsoft MVP - ASP/ASP.NET
>>>> Please reply to the newsgroup. This email account is my spam trap
>>>> so I don't check it very often. If you must reply off-line, then
>>>> remove the "NO SPAM"
>>
>> --
>> Microsoft MVP -- ASP/ASP.NET
>> Please reply to the newsgroup. The email account listed in my From
>> header is my spam trap, so I don't check it very often. You will get
>> a quicker response by posting to the newsgroup.

--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.

Re: HTTP 401.2 problems when writing data to SQL server

am 27.10.2005 17:08:14 von JP

I can reproduce the problem at the problem site with their account. also a
know working account fails when used at the problem site.

"Bob Barrows [MVP]" wrote:

> I was asking if you were able to reproduce the problem youself on the
> problem site. Or are only certain users at that site experiencing the
> problem?
> JP wrote:
> > hi again
> >
> > thanks for the reply. I will start a trace ( and remember to tell
> > the other SQL admins this time before the worry ) .
> >
> > and yes your assumption is correct about the problem occuring only on
> > the other site.
> >
> > JP
> >
> > "Bob Barrows [MVP]" wrote:
> >
> >> I would start by using SQL Profiler to monitor the logins. Add the
> >> Login Failed event to the trace. Check the NTUserName and LoginName
> >> columns for users for whom the application works and compare to
> >> users for whom it doesn't work.
> >>
> >> On the page that does the data modification, I would use
> >> Response.Write "Your user credentials are " &
> >> request.servervariables("LOGON_USER") to verify that the correct
> >> credentials are being used (I assume this problem occurs for you
> >> when you attempt to use the application on the problem site,
> >> correct?)
> >>
> >> You may want to get the guys over at the .iis group involved in this
> >> discussion. In fact, I'm going to crosspost this reply to that group
> >> to see if anyone there can shed some light.
> >>
> >> Bob Barrows
> >> JP wrote:
> >>> thanks for the reply
> >>>
> >>> the user account is a member of an AD group which in turn has DBO
> >>> permissions on the SQL server.
> >>>
> >>> All the data mods are from the site. I was wondering if I needed to
> >>> create a SQL user and then try connecting with that? as it looks
> >>> like what you said about Windows credentials not being passed.
> >>>
> >>> JP
> >>> "Bob Barrows [MVP]" wrote:
> >>>
> >>>> OK, that means either
> >>>> a) the Windows credentials are not being passed for some reason.
> >>>> b) the credentials for the users at one site do not have the same
> >>>> permissions as those at the other
> >>>>
> >>>> You said the two sites are in the same domain. I assume the users
> >>>> of both sites have been granted permissions in the sql server ...
> >>>>
> >>>> Re. the 401 errors: It's strange that the error does not occur when
> >>>> reading data. Are data modifications being done on a page outside
> >>>> of the site? Are you using XMLHTTP, for instance?
> >>>>
> >>>> JP wrote:
> >>>>> hi there
> >>>>>
> >>>>> the connection string is
> >>>>>
> >>>>> strMainConn = "Provider=SQLOLEDB;Initial Catalog=DBName;Data
> >>>>> Source=SERVERNAME;Trusted_Connection=yes;Integrated
> >>>>> Security=SSPI;"
> >>>>>
> >>>>> The SQL server is running in mixed mode, and the IIS site is set
> >>>>> to Integrated with anonyomous access unchecked.
> >>>>>
> >>>>> JP
> >>>>>
> >>>>> "Bob Barrows [MVP]" wrote:
> >>>>>
> >>>>>> JP wrote:
> >>>>>>> hi there
> >>>>>>>
> >>>>>>> we have an Intranet site ( hosted on IIS 6 on Windows 2003 )
> >>>>>>> that connects to a SQL DB via an ASP page ( hosted on SQL 2000
> >>>>>>> on Windows 2000 ). Both servers are located in the same AD
> >>>>>>> site, and users can use the ASP page with no problems
> >>>>>>>
> >>>>>>> However from another AD site ( same domain ) they can connect to
> >>>>>>> the DB and read data but when they try to write back to the
> >>>>>>> database they are prompted for a username and password. Nothing
> >>>>>>> entered seems to
> >>>>>>> work and then they receive either a HTTP 401.2 or HTTP 401.1
> >>>>>>> error message.
> >>>>>>>
> >>>>>>> The same user account is used at both AD Sites. Other db's
> >>>>>>> setup this way work okay?
> >>>>>>>
> >>>>>>
> >>>>>> Hard to say without seeing your connection string (censored of
> >>>>>> course if it contains user id and password info)
> >>>>>>
> >>>>>> Are you using Integrated or mixed security for your SQL Server?
> >>>>>>
> >>>>>> Bob Barrows
> >>>>>> --
> >>>>>> Microsoft MVP - ASP/ASP.NET
> >>>>>> Please reply to the newsgroup. This email account is my spam trap
> >>>>>> so I don't check it very often. If you must reply off-line, then
> >>>>>> remove the "NO SPAM"
> >>>>
> >>>> --
> >>>> Microsoft MVP - ASP/ASP.NET
> >>>> Please reply to the newsgroup. This email account is my spam trap
> >>>> so I don't check it very often. If you must reply off-line, then
> >>>> remove the "NO SPAM"
> >>
> >> --
> >> Microsoft MVP -- ASP/ASP.NET
> >> Please reply to the newsgroup. The email account listed in my From
> >> header is my spam trap, so I don't check it very often. You will get
> >> a quicker response by posting to the newsgroup.
>
> --
> Microsoft MVP -- ASP/ASP.NET
> Please reply to the newsgroup. The email account listed in my From
> header is my spam trap, so I don't check it very often. You will get a
> quicker response by posting to the newsgroup.
>
>
>

Re: HTTP 401.2 problems when writing data to SQL server

am 27.10.2005 17:08:14 von JP

I can reproduce the problem at the problem site with their account. also a
know working account fails when used at the problem site.

"Bob Barrows [MVP]" wrote:

> I was asking if you were able to reproduce the problem youself on the
> problem site. Or are only certain users at that site experiencing the
> problem?
> JP wrote:
> > hi again
> >
> > thanks for the reply. I will start a trace ( and remember to tell
> > the other SQL admins this time before the worry ) .
> >
> > and yes your assumption is correct about the problem occuring only on
> > the other site.
> >
> > JP
> >
> > "Bob Barrows [MVP]" wrote:
> >
> >> I would start by using SQL Profiler to monitor the logins. Add the
> >> Login Failed event to the trace. Check the NTUserName and LoginName
> >> columns for users for whom the application works and compare to
> >> users for whom it doesn't work.
> >>
> >> On the page that does the data modification, I would use
> >> Response.Write "Your user credentials are " &
> >> request.servervariables("LOGON_USER") to verify that the correct
> >> credentials are being used (I assume this problem occurs for you
> >> when you attempt to use the application on the problem site,
> >> correct?)
> >>
> >> You may want to get the guys over at the .iis group involved in this
> >> discussion. In fact, I'm going to crosspost this reply to that group
> >> to see if anyone there can shed some light.
> >>
> >> Bob Barrows
> >> JP wrote:
> >>> thanks for the reply
> >>>
> >>> the user account is a member of an AD group which in turn has DBO
> >>> permissions on the SQL server.
> >>>
> >>> All the data mods are from the site. I was wondering if I needed to
> >>> create a SQL user and then try connecting with that? as it looks
> >>> like what you said about Windows credentials not being passed.
> >>>
> >>> JP
> >>> "Bob Barrows [MVP]" wrote:
> >>>
> >>>> OK, that means either
> >>>> a) the Windows credentials are not being passed for some reason.
> >>>> b) the credentials for the users at one site do not have the same
> >>>> permissions as those at the other
> >>>>
> >>>> You said the two sites are in the same domain. I assume the users
> >>>> of both sites have been granted permissions in the sql server ...
> >>>>
> >>>> Re. the 401 errors: It's strange that the error does not occur when
> >>>> reading data. Are data modifications being done on a page outside
> >>>> of the site? Are you using XMLHTTP, for instance?
> >>>>
> >>>> JP wrote:
> >>>>> hi there
> >>>>>
> >>>>> the connection string is
> >>>>>
> >>>>> strMainConn = "Provider=SQLOLEDB;Initial Catalog=DBName;Data
> >>>>> Source=SERVERNAME;Trusted_Connection=yes;Integrated
> >>>>> Security=SSPI;"
> >>>>>
> >>>>> The SQL server is running in mixed mode, and the IIS site is set
> >>>>> to Integrated with anonyomous access unchecked.
> >>>>>
> >>>>> JP
> >>>>>
> >>>>> "Bob Barrows [MVP]" wrote:
> >>>>>
> >>>>>> JP wrote:
> >>>>>>> hi there
> >>>>>>>
> >>>>>>> we have an Intranet site ( hosted on IIS 6 on Windows 2003 )
> >>>>>>> that connects to a SQL DB via an ASP page ( hosted on SQL 2000
> >>>>>>> on Windows 2000 ). Both servers are located in the same AD
> >>>>>>> site, and users can use the ASP page with no problems
> >>>>>>>
> >>>>>>> However from another AD site ( same domain ) they can connect to
> >>>>>>> the DB and read data but when they try to write back to the
> >>>>>>> database they are prompted for a username and password. Nothing
> >>>>>>> entered seems to
> >>>>>>> work and then they receive either a HTTP 401.2 or HTTP 401.1
> >>>>>>> error message.
> >>>>>>>
> >>>>>>> The same user account is used at both AD Sites. Other db's
> >>>>>>> setup this way work okay?
> >>>>>>>
> >>>>>>
> >>>>>> Hard to say without seeing your connection string (censored of
> >>>>>> course if it contains user id and password info)
> >>>>>>
> >>>>>> Are you using Integrated or mixed security for your SQL Server?
> >>>>>>
> >>>>>> Bob Barrows
> >>>>>> --
> >>>>>> Microsoft MVP - ASP/ASP.NET
> >>>>>> Please reply to the newsgroup. This email account is my spam trap
> >>>>>> so I don't check it very often. If you must reply off-line, then
> >>>>>> remove the "NO SPAM"
> >>>>
> >>>> --
> >>>> Microsoft MVP - ASP/ASP.NET
> >>>> Please reply to the newsgroup. This email account is my spam trap
> >>>> so I don't check it very often. If you must reply off-line, then
> >>>> remove the "NO SPAM"
> >>
> >> --
> >> Microsoft MVP -- ASP/ASP.NET
> >> Please reply to the newsgroup. The email account listed in my From
> >> header is my spam trap, so I don't check it very often. You will get
> >> a quicker response by posting to the newsgroup.
>
> --
> Microsoft MVP -- ASP/ASP.NET
> Please reply to the newsgroup. The email account listed in my From
> header is my spam trap, so I don't check it very often. You will get a
> quicker response by posting to the newsgroup.
>
>
>

Re: HTTP 401.2 problems when writing data to SQL server

am 31.10.2005 12:08:02 von JP

hi

just to update, we have checked several logs and all looks okay , but still
the site can't connect. I am not sure what to do from here, as I have
checked various other newsgroups and they can offer no further help.

thanks

"JP" wrote:

> I can reproduce the problem at the problem site with their account. also a
> know working account fails when used at the problem site.
>
> "Bob Barrows [MVP]" wrote:
>
> > I was asking if you were able to reproduce the problem youself on the
> > problem site. Or are only certain users at that site experiencing the
> > problem?
> > JP wrote:
> > > hi again
> > >
> > > thanks for the reply. I will start a trace ( and remember to tell
> > > the other SQL admins this time before the worry ) .
> > >
> > > and yes your assumption is correct about the problem occuring only on
> > > the other site.
> > >
> > > JP
> > >
> > > "Bob Barrows [MVP]" wrote:
> > >
> > >> I would start by using SQL Profiler to monitor the logins. Add the
> > >> Login Failed event to the trace. Check the NTUserName and LoginName
> > >> columns for users for whom the application works and compare to
> > >> users for whom it doesn't work.
> > >>
> > >> On the page that does the data modification, I would use
> > >> Response.Write "Your user credentials are " &
> > >> request.servervariables("LOGON_USER") to verify that the correct
> > >> credentials are being used (I assume this problem occurs for you
> > >> when you attempt to use the application on the problem site,
> > >> correct?)
> > >>
> > >> You may want to get the guys over at the .iis group involved in this
> > >> discussion. In fact, I'm going to crosspost this reply to that group
> > >> to see if anyone there can shed some light.
> > >>
> > >> Bob Barrows
> > >> JP wrote:
> > >>> thanks for the reply
> > >>>
> > >>> the user account is a member of an AD group which in turn has DBO
> > >>> permissions on the SQL server.
> > >>>
> > >>> All the data mods are from the site. I was wondering if I needed to
> > >>> create a SQL user and then try connecting with that? as it looks
> > >>> like what you said about Windows credentials not being passed.
> > >>>
> > >>> JP
> > >>> "Bob Barrows [MVP]" wrote:
> > >>>
> > >>>> OK, that means either
> > >>>> a) the Windows credentials are not being passed for some reason.
> > >>>> b) the credentials for the users at one site do not have the same
> > >>>> permissions as those at the other
> > >>>>
> > >>>> You said the two sites are in the same domain. I assume the users
> > >>>> of both sites have been granted permissions in the sql server ...
> > >>>>
> > >>>> Re. the 401 errors: It's strange that the error does not occur when
> > >>>> reading data. Are data modifications being done on a page outside
> > >>>> of the site? Are you using XMLHTTP, for instance?
> > >>>>
> > >>>> JP wrote:
> > >>>>> hi there
> > >>>>>
> > >>>>> the connection string is
> > >>>>>
> > >>>>> strMainConn = "Provider=SQLOLEDB;Initial Catalog=DBName;Data
> > >>>>> Source=SERVERNAME;Trusted_Connection=yes;Integrated
> > >>>>> Security=SSPI;"
> > >>>>>
> > >>>>> The SQL server is running in mixed mode, and the IIS site is set
> > >>>>> to Integrated with anonyomous access unchecked.
> > >>>>>
> > >>>>> JP
> > >>>>>
> > >>>>> "Bob Barrows [MVP]" wrote:
> > >>>>>
> > >>>>>> JP wrote:
> > >>>>>>> hi there
> > >>>>>>>
> > >>>>>>> we have an Intranet site ( hosted on IIS 6 on Windows 2003 )
> > >>>>>>> that connects to a SQL DB via an ASP page ( hosted on SQL 2000
> > >>>>>>> on Windows 2000 ). Both servers are located in the same AD
> > >>>>>>> site, and users can use the ASP page with no problems
> > >>>>>>>
> > >>>>>>> However from another AD site ( same domain ) they can connect to
> > >>>>>>> the DB and read data but when they try to write back to the
> > >>>>>>> database they are prompted for a username and password. Nothing
> > >>>>>>> entered seems to
> > >>>>>>> work and then they receive either a HTTP 401.2 or HTTP 401.1
> > >>>>>>> error message.
> > >>>>>>>
> > >>>>>>> The same user account is used at both AD Sites. Other db's
> > >>>>>>> setup this way work okay?
> > >>>>>>>
> > >>>>>>
> > >>>>>> Hard to say without seeing your connection string (censored of
> > >>>>>> course if it contains user id and password info)
> > >>>>>>
> > >>>>>> Are you using Integrated or mixed security for your SQL Server?
> > >>>>>>
> > >>>>>> Bob Barrows
> > >>>>>> --
> > >>>>>> Microsoft MVP - ASP/ASP.NET
> > >>>>>> Please reply to the newsgroup. This email account is my spam trap
> > >>>>>> so I don't check it very often. If you must reply off-line, then
> > >>>>>> remove the "NO SPAM"
> > >>>>
> > >>>> --
> > >>>> Microsoft MVP - ASP/ASP.NET
> > >>>> Please reply to the newsgroup. This email account is my spam trap
> > >>>> so I don't check it very often. If you must reply off-line, then
> > >>>> remove the "NO SPAM"
> > >>
> > >> --
> > >> Microsoft MVP -- ASP/ASP.NET
> > >> Please reply to the newsgroup. The email account listed in my From
> > >> header is my spam trap, so I don't check it very often. You will get
> > >> a quicker response by posting to the newsgroup.
> >
> > --
> > Microsoft MVP -- ASP/ASP.NET
> > Please reply to the newsgroup. The email account listed in my From
> > header is my spam trap, so I don't check it very often. You will get a
> > quicker response by posting to the newsgroup.
> >
> >
> >

Re: HTTP 401.2 problems when writing data to SQL server

am 31.10.2005 12:08:02 von JP

hi

just to update, we have checked several logs and all looks okay , but still
the site can't connect. I am not sure what to do from here, as I have
checked various other newsgroups and they can offer no further help.

thanks

"JP" wrote:

> I can reproduce the problem at the problem site with their account. also a
> know working account fails when used at the problem site.
>
> "Bob Barrows [MVP]" wrote:
>
> > I was asking if you were able to reproduce the problem youself on the
> > problem site. Or are only certain users at that site experiencing the
> > problem?
> > JP wrote:
> > > hi again
> > >
> > > thanks for the reply. I will start a trace ( and remember to tell
> > > the other SQL admins this time before the worry ) .
> > >
> > > and yes your assumption is correct about the problem occuring only on
> > > the other site.
> > >
> > > JP
> > >
> > > "Bob Barrows [MVP]" wrote:
> > >
> > >> I would start by using SQL Profiler to monitor the logins. Add the
> > >> Login Failed event to the trace. Check the NTUserName and LoginName
> > >> columns for users for whom the application works and compare to
> > >> users for whom it doesn't work.
> > >>
> > >> On the page that does the data modification, I would use
> > >> Response.Write "Your user credentials are " &
> > >> request.servervariables("LOGON_USER") to verify that the correct
> > >> credentials are being used (I assume this problem occurs for you
> > >> when you attempt to use the application on the problem site,
> > >> correct?)
> > >>
> > >> You may want to get the guys over at the .iis group involved in this
> > >> discussion. In fact, I'm going to crosspost this reply to that group
> > >> to see if anyone there can shed some light.
> > >>
> > >> Bob Barrows
> > >> JP wrote:
> > >>> thanks for the reply
> > >>>
> > >>> the user account is a member of an AD group which in turn has DBO
> > >>> permissions on the SQL server.
> > >>>
> > >>> All the data mods are from the site. I was wondering if I needed to
> > >>> create a SQL user and then try connecting with that? as it looks
> > >>> like what you said about Windows credentials not being passed.
> > >>>
> > >>> JP
> > >>> "Bob Barrows [MVP]" wrote:
> > >>>
> > >>>> OK, that means either
> > >>>> a) the Windows credentials are not being passed for some reason.
> > >>>> b) the credentials for the users at one site do not have the same
> > >>>> permissions as those at the other
> > >>>>
> > >>>> You said the two sites are in the same domain. I assume the users
> > >>>> of both sites have been granted permissions in the sql server ...
> > >>>>
> > >>>> Re. the 401 errors: It's strange that the error does not occur when
> > >>>> reading data. Are data modifications being done on a page outside
> > >>>> of the site? Are you using XMLHTTP, for instance?
> > >>>>
> > >>>> JP wrote:
> > >>>>> hi there
> > >>>>>
> > >>>>> the connection string is
> > >>>>>
> > >>>>> strMainConn = "Provider=SQLOLEDB;Initial Catalog=DBName;Data
> > >>>>> Source=SERVERNAME;Trusted_Connection=yes;Integrated
> > >>>>> Security=SSPI;"
> > >>>>>
> > >>>>> The SQL server is running in mixed mode, and the IIS site is set
> > >>>>> to Integrated with anonyomous access unchecked.
> > >>>>>
> > >>>>> JP
> > >>>>>
> > >>>>> "Bob Barrows [MVP]" wrote:
> > >>>>>
> > >>>>>> JP wrote:
> > >>>>>>> hi there
> > >>>>>>>
> > >>>>>>> we have an Intranet site ( hosted on IIS 6 on Windows 2003 )
> > >>>>>>> that connects to a SQL DB via an ASP page ( hosted on SQL 2000
> > >>>>>>> on Windows 2000 ). Both servers are located in the same AD
> > >>>>>>> site, and users can use the ASP page with no problems
> > >>>>>>>
> > >>>>>>> However from another AD site ( same domain ) they can connect to
> > >>>>>>> the DB and read data but when they try to write back to the
> > >>>>>>> database they are prompted for a username and password. Nothing
> > >>>>>>> entered seems to
> > >>>>>>> work and then they receive either a HTTP 401.2 or HTTP 401.1
> > >>>>>>> error message.
> > >>>>>>>
> > >>>>>>> The same user account is used at both AD Sites. Other db's
> > >>>>>>> setup this way work okay?
> > >>>>>>>
> > >>>>>>
> > >>>>>> Hard to say without seeing your connection string (censored of
> > >>>>>> course if it contains user id and password info)
> > >>>>>>
> > >>>>>> Are you using Integrated or mixed security for your SQL Server?
> > >>>>>>
> > >>>>>> Bob Barrows
> > >>>>>> --
> > >>>>>> Microsoft MVP - ASP/ASP.NET
> > >>>>>> Please reply to the newsgroup. This email account is my spam trap
> > >>>>>> so I don't check it very often. If you must reply off-line, then
> > >>>>>> remove the "NO SPAM"
> > >>>>
> > >>>> --
> > >>>> Microsoft MVP - ASP/ASP.NET
> > >>>> Please reply to the newsgroup. This email account is my spam trap
> > >>>> so I don't check it very often. If you must reply off-line, then
> > >>>> remove the "NO SPAM"
> > >>
> > >> --
> > >> Microsoft MVP -- ASP/ASP.NET
> > >> Please reply to the newsgroup. The email account listed in my From
> > >> header is my spam trap, so I don't check it very often. You will get
> > >> a quicker response by posting to the newsgroup.
> >
> > --
> > Microsoft MVP -- ASP/ASP.NET
> > Please reply to the newsgroup. The email account listed in my From
> > header is my spam trap, so I don't check it very often. You will get a
> > quicker response by posting to the newsgroup.
> >
> >
> >

Re: HTTP 401.2 problems when writing data to SQL server

am 31.10.2005 12:37:00 von reb01501

Did Response.Write Request.ServerVariables("LOGON_USER") result in the
correct information being displayed?

I am suspicious about this being a "connection to SQL Server" problem.
Failure to establish a connection to SQL Server usually results in an ADO
error, not an HTTP 401.2 page. I assume the machine you are using to test
this issue has "friendly errors" turned off.
However, have you tried using a SQL Server login to connect?

Bob Barrows

JP wrote:
> hi
>
> just to update, we have checked several logs and all looks okay , but
> still the site can't connect. I am not sure what to do from here, as
> I have checked various other newsgroups and they can offer no further
> help.
>
> thanks
>
> "JP" wrote:
>
>> I can reproduce the problem at the problem site with their account.
>> also a know working account fails when used at the problem site.
>>
>> "Bob Barrows [MVP]" wrote:
>>
>>> I was asking if you were able to reproduce the problem youself on
>>> the problem site. Or are only certain users at that site
>>> experiencing the problem?
>>> JP wrote:
>>>> hi again
>>>>
>>>> thanks for the reply. I will start a trace ( and remember to tell
>>>> the other SQL admins this time before the worry ) .
>>>>
>>>> and yes your assumption is correct about the problem occuring only
>>>> on the other site.
>>>>
>>>> JP
>>>>
>>>> "Bob Barrows [MVP]" wrote:
>>>>
>>>>> I would start by using SQL Profiler to monitor the logins. Add the
>>>>> Login Failed event to the trace. Check the NTUserName and
>>>>> LoginName columns for users for whom the application works and
>>>>> compare to
>>>>> users for whom it doesn't work.
>>>>>
>>>>> On the page that does the data modification, I would use
>>>>> Response.Write "Your user credentials are " &
>>>>> request.servervariables("LOGON_USER") to verify that the correct
>>>>> credentials are being used (I assume this problem occurs for you
>>>>> when you attempt to use the application on the problem site,
>>>>> correct?)
>>>>>
>>>>> You may want to get the guys over at the .iis group involved in
>>>>> this discussion. In fact, I'm going to crosspost this reply to
>>>>> that group to see if anyone there can shed some light.
>>>>>
>>>>> Bob Barrows
>>>>> JP wrote:
>>>>>> thanks for the reply
>>>>>>
>>>>>> the user account is a member of an AD group which in turn has DBO
>>>>>> permissions on the SQL server.
>>>>>>
>>>>>> All the data mods are from the site. I was wondering if I
>>>>>> needed to create a SQL user and then try connecting with that?
>>>>>> as it looks like what you said about Windows credentials not
>>>>>> being passed.
>>>>>>
>>>>>> JP
>>>>>> "Bob Barrows [MVP]" wrote:
>>>>>>
>>>>>>> OK, that means either
>>>>>>> a) the Windows credentials are not being passed for some reason.
>>>>>>> b) the credentials for the users at one site do not have the
>>>>>>> same permissions as those at the other
>>>>>>>
>>>>>>> You said the two sites are in the same domain. I assume the
>>>>>>> users of both sites have been granted permissions in the sql
>>>>>>> server ...
>>>>>>>
>>>>>>> Re. the 401 errors: It's strange that the error does not occur
>>>>>>> when reading data. Are data modifications being done on a page
>>>>>>> outside of the site? Are you using XMLHTTP, for instance?
>>>>>>>
>>>>>>> JP wrote:
>>>>>>>> hi there
>>>>>>>>
>>>>>>>> the connection string is
>>>>>>>>
>>>>>>>> strMainConn = "Provider=SQLOLEDB;Initial Catalog=DBName;Data
>>>>>>>> Source=SERVERNAME;Trusted_Connection=yes;Integrated
>>>>>>>> Security=SSPI;"
>>>>>>>>
>>>>>>>> The SQL server is running in mixed mode, and the IIS site is
>>>>>>>> set to Integrated with anonyomous access unchecked.
>>>>>>>>
>>>>>>>> JP
>>>>>>>>
>>>>>>>> "Bob Barrows [MVP]" wrote:
>>>>>>>>
>>>>>>>>> JP wrote:
>>>>>>>>>> hi there
>>>>>>>>>>
>>>>>>>>>> we have an Intranet site ( hosted on IIS 6 on Windows 2003 )
>>>>>>>>>> that connects to a SQL DB via an ASP page ( hosted on SQL
>>>>>>>>>> 2000 on Windows 2000 ). Both servers are located in the
>>>>>>>>>> same AD site, and users can use the ASP page with no problems
>>>>>>>>>>
>>>>>>>>>> However from another AD site ( same domain ) they can
>>>>>>>>>> connect to the DB and read data but when they try to write
>>>>>>>>>> back to the database they are prompted for a username and
>>>>>>>>>> password. Nothing entered seems to
>>>>>>>>>> work and then they receive either a HTTP 401.2 or HTTP 401.1
>>>>>>>>>> error message.
>>>>>>>>>>
>>>>>>>>>> The same user account is used at both AD Sites. Other db's
>>>>>>>>>> setup this way work okay?
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Hard to say without seeing your connection string (censored of
>>>>>>>>> course if it contains user id and password info)
>>>>>>>>>
>>>>>>>>> Are you using Integrated or mixed security for your SQL
>>>>>>>>> Server?
>>>>>>>>>


--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"

Re: HTTP 401.2 problems when writing data to SQL server

am 31.10.2005 12:37:00 von reb01501

Did Response.Write Request.ServerVariables("LOGON_USER") result in the
correct information being displayed?

I am suspicious about this being a "connection to SQL Server" problem.
Failure to establish a connection to SQL Server usually results in an ADO
error, not an HTTP 401.2 page. I assume the machine you are using to test
this issue has "friendly errors" turned off.
However, have you tried using a SQL Server login to connect?

Bob Barrows

JP wrote:
> hi
>
> just to update, we have checked several logs and all looks okay , but
> still the site can't connect. I am not sure what to do from here, as
> I have checked various other newsgroups and they can offer no further
> help.
>
> thanks
>
> "JP" wrote:
>
>> I can reproduce the problem at the problem site with their account.
>> also a know working account fails when used at the problem site.
>>
>> "Bob Barrows [MVP]" wrote:
>>
>>> I was asking if you were able to reproduce the problem youself on
>>> the problem site. Or are only certain users at that site
>>> experiencing the problem?
>>> JP wrote:
>>>> hi again
>>>>
>>>> thanks for the reply. I will start a trace ( and remember to tell
>>>> the other SQL admins this time before the worry ) .
>>>>
>>>> and yes your assumption is correct about the problem occuring only
>>>> on the other site.
>>>>
>>>> JP
>>>>
>>>> "Bob Barrows [MVP]" wrote:
>>>>
>>>>> I would start by using SQL Profiler to monitor the logins. Add the
>>>>> Login Failed event to the trace. Check the NTUserName and
>>>>> LoginName columns for users for whom the application works and
>>>>> compare to
>>>>> users for whom it doesn't work.
>>>>>
>>>>> On the page that does the data modification, I would use
>>>>> Response.Write "Your user credentials are " &
>>>>> request.servervariables("LOGON_USER") to verify that the correct
>>>>> credentials are being used (I assume this problem occurs for you
>>>>> when you attempt to use the application on the problem site,
>>>>> correct?)
>>>>>
>>>>> You may want to get the guys over at the .iis group involved in
>>>>> this discussion. In fact, I'm going to crosspost this reply to
>>>>> that group to see if anyone there can shed some light.
>>>>>
>>>>> Bob Barrows
>>>>> JP wrote:
>>>>>> thanks for the reply
>>>>>>
>>>>>> the user account is a member of an AD group which in turn has DBO
>>>>>> permissions on the SQL server.
>>>>>>
>>>>>> All the data mods are from the site. I was wondering if I
>>>>>> needed to create a SQL user and then try connecting with that?
>>>>>> as it looks like what you said about Windows credentials not
>>>>>> being passed.
>>>>>>
>>>>>> JP
>>>>>> "Bob Barrows [MVP]" wrote:
>>>>>>
>>>>>>> OK, that means either
>>>>>>> a) the Windows credentials are not being passed for some reason.
>>>>>>> b) the credentials for the users at one site do not have the
>>>>>>> same permissions as those at the other
>>>>>>>
>>>>>>> You said the two sites are in the same domain. I assume the
>>>>>>> users of both sites have been granted permissions in the sql
>>>>>>> server ...
>>>>>>>
>>>>>>> Re. the 401 errors: It's strange that the error does not occur
>>>>>>> when reading data. Are data modifications being done on a page
>>>>>>> outside of the site? Are you using XMLHTTP, for instance?
>>>>>>>
>>>>>>> JP wrote:
>>>>>>>> hi there
>>>>>>>>
>>>>>>>> the connection string is
>>>>>>>>
>>>>>>>> strMainConn = "Provider=SQLOLEDB;Initial Catalog=DBName;Data
>>>>>>>> Source=SERVERNAME;Trusted_Connection=yes;Integrated
>>>>>>>> Security=SSPI;"
>>>>>>>>
>>>>>>>> The SQL server is running in mixed mode, and the IIS site is
>>>>>>>> set to Integrated with anonyomous access unchecked.
>>>>>>>>
>>>>>>>> JP
>>>>>>>>
>>>>>>>> "Bob Barrows [MVP]" wrote:
>>>>>>>>
>>>>>>>>> JP wrote:
>>>>>>>>>> hi there
>>>>>>>>>>
>>>>>>>>>> we have an Intranet site ( hosted on IIS 6 on Windows 2003 )
>>>>>>>>>> that connects to a SQL DB via an ASP page ( hosted on SQL
>>>>>>>>>> 2000 on Windows 2000 ). Both servers are located in the
>>>>>>>>>> same AD site, and users can use the ASP page with no problems
>>>>>>>>>>
>>>>>>>>>> However from another AD site ( same domain ) they can
>>>>>>>>>> connect to the DB and read data but when they try to write
>>>>>>>>>> back to the database they are prompted for a username and
>>>>>>>>>> password. Nothing entered seems to
>>>>>>>>>> work and then they receive either a HTTP 401.2 or HTTP 401.1
>>>>>>>>>> error message.
>>>>>>>>>>
>>>>>>>>>> The same user account is used at both AD Sites. Other db's
>>>>>>>>>> setup this way work okay?
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Hard to say without seeing your connection string (censored of
>>>>>>>>> course if it contains user id and password info)
>>>>>>>>>
>>>>>>>>> Are you using Integrated or mixed security for your SQL
>>>>>>>>> Server?
>>>>>>>>>


--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"

Re: HTTP 401.2 problems when writing data to SQL server

am 02.11.2005 13:39:03 von JP

hi there

thanks for your help Bob I have ran some further tests and variables look
okay.

It looks like it isn't a connection to SQL error ( just like you said ) but
an asp application error.

thanks for your assistance.

"Bob Barrows [MVP]" wrote:

> Did Response.Write Request.ServerVariables("LOGON_USER") result in the
> correct information being displayed?
>
> I am suspicious about this being a "connection to SQL Server" problem.
> Failure to establish a connection to SQL Server usually results in an ADO
> error, not an HTTP 401.2 page. I assume the machine you are using to test
> this issue has "friendly errors" turned off.
> However, have you tried using a SQL Server login to connect?
>
> Bob Barrows
>
> JP wrote:
> > hi
> >
> > just to update, we have checked several logs and all looks okay , but
> > still the site can't connect. I am not sure what to do from here, as
> > I have checked various other newsgroups and they can offer no further
> > help.
> >
> > thanks
> >
> > "JP" wrote:
> >
> >> I can reproduce the problem at the problem site with their account.
> >> also a know working account fails when used at the problem site.
> >>
> >> "Bob Barrows [MVP]" wrote:
> >>
> >>> I was asking if you were able to reproduce the problem youself on
> >>> the problem site. Or are only certain users at that site
> >>> experiencing the problem?
> >>> JP wrote:
> >>>> hi again
> >>>>
> >>>> thanks for the reply. I will start a trace ( and remember to tell
> >>>> the other SQL admins this time before the worry ) .
> >>>>
> >>>> and yes your assumption is correct about the problem occuring only
> >>>> on the other site.
> >>>>
> >>>> JP
> >>>>
> >>>> "Bob Barrows [MVP]" wrote:
> >>>>
> >>>>> I would start by using SQL Profiler to monitor the logins. Add the
> >>>>> Login Failed event to the trace. Check the NTUserName and
> >>>>> LoginName columns for users for whom the application works and
> >>>>> compare to
> >>>>> users for whom it doesn't work.
> >>>>>
> >>>>> On the page that does the data modification, I would use
> >>>>> Response.Write "Your user credentials are " &
> >>>>> request.servervariables("LOGON_USER") to verify that the correct
> >>>>> credentials are being used (I assume this problem occurs for you
> >>>>> when you attempt to use the application on the problem site,
> >>>>> correct?)
> >>>>>
> >>>>> You may want to get the guys over at the .iis group involved in
> >>>>> this discussion. In fact, I'm going to crosspost this reply to
> >>>>> that group to see if anyone there can shed some light.
> >>>>>
> >>>>> Bob Barrows
> >>>>> JP wrote:
> >>>>>> thanks for the reply
> >>>>>>
> >>>>>> the user account is a member of an AD group which in turn has DBO
> >>>>>> permissions on the SQL server.
> >>>>>>
> >>>>>> All the data mods are from the site. I was wondering if I
> >>>>>> needed to create a SQL user and then try connecting with that?
> >>>>>> as it looks like what you said about Windows credentials not
> >>>>>> being passed.
> >>>>>>
> >>>>>> JP
> >>>>>> "Bob Barrows [MVP]" wrote:
> >>>>>>
> >>>>>>> OK, that means either
> >>>>>>> a) the Windows credentials are not being passed for some reason.
> >>>>>>> b) the credentials for the users at one site do not have the
> >>>>>>> same permissions as those at the other
> >>>>>>>
> >>>>>>> You said the two sites are in the same domain. I assume the
> >>>>>>> users of both sites have been granted permissions in the sql
> >>>>>>> server ...
> >>>>>>>
> >>>>>>> Re. the 401 errors: It's strange that the error does not occur
> >>>>>>> when reading data. Are data modifications being done on a page
> >>>>>>> outside of the site? Are you using XMLHTTP, for instance?
> >>>>>>>
> >>>>>>> JP wrote:
> >>>>>>>> hi there
> >>>>>>>>
> >>>>>>>> the connection string is
> >>>>>>>>
> >>>>>>>> strMainConn = "Provider=SQLOLEDB;Initial Catalog=DBName;Data
> >>>>>>>> Source=SERVERNAME;Trusted_Connection=yes;Integrated
> >>>>>>>> Security=SSPI;"
> >>>>>>>>
> >>>>>>>> The SQL server is running in mixed mode, and the IIS site is
> >>>>>>>> set to Integrated with anonyomous access unchecked.
> >>>>>>>>
> >>>>>>>> JP
> >>>>>>>>
> >>>>>>>> "Bob Barrows [MVP]" wrote:
> >>>>>>>>
> >>>>>>>>> JP wrote:
> >>>>>>>>>> hi there
> >>>>>>>>>>
> >>>>>>>>>> we have an Intranet site ( hosted on IIS 6 on Windows 2003 )
> >>>>>>>>>> that connects to a SQL DB via an ASP page ( hosted on SQL
> >>>>>>>>>> 2000 on Windows 2000 ). Both servers are located in the
> >>>>>>>>>> same AD site, and users can use the ASP page with no problems
> >>>>>>>>>>
> >>>>>>>>>> However from another AD site ( same domain ) they can
> >>>>>>>>>> connect to the DB and read data but when they try to write
> >>>>>>>>>> back to the database they are prompted for a username and
> >>>>>>>>>> password. Nothing entered seems to
> >>>>>>>>>> work and then they receive either a HTTP 401.2 or HTTP 401.1
> >>>>>>>>>> error message.
> >>>>>>>>>>
> >>>>>>>>>> The same user account is used at both AD Sites. Other db's
> >>>>>>>>>> setup this way work okay?
> >>>>>>>>>>
> >>>>>>>>>
> >>>>>>>>> Hard to say without seeing your connection string (censored of
> >>>>>>>>> course if it contains user id and password info)
> >>>>>>>>>
> >>>>>>>>> Are you using Integrated or mixed security for your SQL
> >>>>>>>>> Server?
> >>>>>>>>>
>
>
> --
> Microsoft MVP - ASP/ASP.NET
> Please reply to the newsgroup. This email account is my spam trap so I
> don't check it very often. If you must reply off-line, then remove the
> "NO SPAM"
>
>
>

Re: HTTP 401.2 problems when writing data to SQL server

am 02.11.2005 13:39:03 von JP

hi there

thanks for your help Bob I have ran some further tests and variables look
okay.

It looks like it isn't a connection to SQL error ( just like you said ) but
an asp application error.

thanks for your assistance.

"Bob Barrows [MVP]" wrote:

> Did Response.Write Request.ServerVariables("LOGON_USER") result in the
> correct information being displayed?
>
> I am suspicious about this being a "connection to SQL Server" problem.
> Failure to establish a connection to SQL Server usually results in an ADO
> error, not an HTTP 401.2 page. I assume the machine you are using to test
> this issue has "friendly errors" turned off.
> However, have you tried using a SQL Server login to connect?
>
> Bob Barrows
>
> JP wrote:
> > hi
> >
> > just to update, we have checked several logs and all looks okay , but
> > still the site can't connect. I am not sure what to do from here, as
> > I have checked various other newsgroups and they can offer no further
> > help.
> >
> > thanks
> >
> > "JP" wrote:
> >
> >> I can reproduce the problem at the problem site with their account.
> >> also a know working account fails when used at the problem site.
> >>
> >> "Bob Barrows [MVP]" wrote:
> >>
> >>> I was asking if you were able to reproduce the problem youself on
> >>> the problem site. Or are only certain users at that site
> >>> experiencing the problem?
> >>> JP wrote:
> >>>> hi again
> >>>>
> >>>> thanks for the reply. I will start a trace ( and remember to tell
> >>>> the other SQL admins this time before the worry ) .
> >>>>
> >>>> and yes your assumption is correct about the problem occuring only
> >>>> on the other site.
> >>>>
> >>>> JP
> >>>>
> >>>> "Bob Barrows [MVP]" wrote:
> >>>>
> >>>>> I would start by using SQL Profiler to monitor the logins. Add the
> >>>>> Login Failed event to the trace. Check the NTUserName and
> >>>>> LoginName columns for users for whom the application works and
> >>>>> compare to
> >>>>> users for whom it doesn't work.
> >>>>>
> >>>>> On the page that does the data modification, I would use
> >>>>> Response.Write "Your user credentials are " &
> >>>>> request.servervariables("LOGON_USER") to verify that the correct
> >>>>> credentials are being used (I assume this problem occurs for you
> >>>>> when you attempt to use the application on the problem site,
> >>>>> correct?)
> >>>>>
> >>>>> You may want to get the guys over at the .iis group involved in
> >>>>> this discussion. In fact, I'm going to crosspost this reply to
> >>>>> that group to see if anyone there can shed some light.
> >>>>>
> >>>>> Bob Barrows
> >>>>> JP wrote:
> >>>>>> thanks for the reply
> >>>>>>
> >>>>>> the user account is a member of an AD group which in turn has DBO
> >>>>>> permissions on the SQL server.
> >>>>>>
> >>>>>> All the data mods are from the site. I was wondering if I
> >>>>>> needed to create a SQL user and then try connecting with that?
> >>>>>> as it looks like what you said about Windows credentials not
> >>>>>> being passed.
> >>>>>>
> >>>>>> JP
> >>>>>> "Bob Barrows [MVP]" wrote:
> >>>>>>
> >>>>>>> OK, that means either
> >>>>>>> a) the Windows credentials are not being passed for some reason.
> >>>>>>> b) the credentials for the users at one site do not have the
> >>>>>>> same permissions as those at the other
> >>>>>>>
> >>>>>>> You said the two sites are in the same domain. I assume the
> >>>>>>> users of both sites have been granted permissions in the sql
> >>>>>>> server ...
> >>>>>>>
> >>>>>>> Re. the 401 errors: It's strange that the error does not occur
> >>>>>>> when reading data. Are data modifications being done on a page
> >>>>>>> outside of the site? Are you using XMLHTTP, for instance?
> >>>>>>>
> >>>>>>> JP wrote:
> >>>>>>>> hi there
> >>>>>>>>
> >>>>>>>> the connection string is
> >>>>>>>>
> >>>>>>>> strMainConn = "Provider=SQLOLEDB;Initial Catalog=DBName;Data
> >>>>>>>> Source=SERVERNAME;Trusted_Connection=yes;Integrated
> >>>>>>>> Security=SSPI;"
> >>>>>>>>
> >>>>>>>> The SQL server is running in mixed mode, and the IIS site is
> >>>>>>>> set to Integrated with anonyomous access unchecked.
> >>>>>>>>
> >>>>>>>> JP
> >>>>>>>>
> >>>>>>>> "Bob Barrows [MVP]" wrote:
> >>>>>>>>
> >>>>>>>>> JP wrote:
> >>>>>>>>>> hi there
> >>>>>>>>>>
> >>>>>>>>>> we have an Intranet site ( hosted on IIS 6 on Windows 2003 )
> >>>>>>>>>> that connects to a SQL DB via an ASP page ( hosted on SQL
> >>>>>>>>>> 2000 on Windows 2000 ). Both servers are located in the
> >>>>>>>>>> same AD site, and users can use the ASP page with no problems
> >>>>>>>>>>
> >>>>>>>>>> However from another AD site ( same domain ) they can
> >>>>>>>>>> connect to the DB and read data but when they try to write
> >>>>>>>>>> back to the database they are prompted for a username and
> >>>>>>>>>> password. Nothing entered seems to
> >>>>>>>>>> work and then they receive either a HTTP 401.2 or HTTP 401.1
> >>>>>>>>>> error message.
> >>>>>>>>>>
> >>>>>>>>>> The same user account is used at both AD Sites. Other db's
> >>>>>>>>>> setup this way work okay?
> >>>>>>>>>>
> >>>>>>>>>
> >>>>>>>>> Hard to say without seeing your connection string (censored of
> >>>>>>>>> course if it contains user id and password info)
> >>>>>>>>>
> >>>>>>>>> Are you using Integrated or mixed security for your SQL
> >>>>>>>>> Server?
> >>>>>>>>>
>
>
> --
> Microsoft MVP - ASP/ASP.NET
> Please reply to the newsgroup. This email account is my spam trap so I
> don't check it very often. If you must reply off-line, then remove the
> "NO SPAM"
>
>
>