Monday, March 26, 2012
Intermittent 401: Not Authorized
"System.Net.WebException: The request failed with HTTP status 401:
Unauthorized." error. If I try to access it again, I get in without a
problem.
In addition to the "first attempt after the iisreset", which happens
consistently, we also intermittently experience the same error, infrequently.
Any idea what is going on here? Caching of Credentials?
Michael DorfmanHello Michael,
To understand the issue better, I'd like to know the following information:
1. Does the issue only occur with a specific RS report or any RS report
such as sample reports including in RS installation?
2. Do you have anonymous access enabled on Report Manager or Report Server
virtual directories?
Also, this issue might be related to a known issue in .Net framework 1.1
sp1, I suggest that you contact CSS to get 887563 installed hotfix 887563
to see if it helps:
884537 FIX: You may receive a "System.Net.WebException" error message when
you
http://support.microsoft.com/?id=884537
887563 Availability of the .NET Framework 1.1 Post-Service Pack 1 rollup
http://support.microsoft.com/?id=887563
Also, please search if there are multiple copies of security.dll on your
SQL Reporting Services machine. If there are security.dll other than
%windir%\system32 folder, please tempoarily rename them to test the
situation.
Regards,
Peter Yang
MCSE2000/2003, MCSA, MCDBA
Microsoft Online Partner Support
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
=====================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
| Thread-Topic: Intermittent 401: Not Authorized
| thread-index: AcVTuOW2QlsDZxZ1SwW4LqLFvzorxw==| X-WBNR-Posting-Host: 62.97.217.178
| From: =?Utf-8?B?TWljaGFlbCBEb3JmbWFu?= <mercatus2004@.online.nospam>
| Subject: Intermittent 401: Not Authorized
| Date: Sun, 8 May 2005 03:30:04 -0700
| Lines: 11
| Message-ID: <E81A662F-4F37-45EB-8174-9C17787D5295@.microsoft.com>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.sqlserver.reportingsvcs
| NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA03.phx.gbl
| Xref: TK2MSFTNGXA01.phx.gbl microsoft.public.sqlserver.reportingsvcs:43126
| X-Tomcat-NG: microsoft.public.sqlserver.reportingsvcs
|
| The first time I try to access a RS report after an IISreset, I get a
| "System.Net.WebException: The request failed with HTTP status 401:
| Unauthorized." error. If I try to access it again, I get in without a
| problem.
|
| In addition to the "first attempt after the iisreset", which happens
| consistently, we also intermittently experience the same error,
infrequently.
|
| Any idea what is going on here? Caching of Credentials?
|
| Michael Dorfman
||||Are you using 2003 server and applied SP1? If so, I did the following and
solved my same problem:
"create a DWORD entry called DisableLoopbackCheck to
HKLM\System\CurrentControlSet\Control\Lsa. Set this key to a value of 1"
This is an issue which occures after appling SP1 to 2003 server.
I hope, this helps.
Barbaros Saglamtimur
MCDBA, MCAD
"Peter Yang [MSFT]" <petery@.online.microsoft.com> wrote in message
news:wrpXrMFVFHA.2476@.TK2MSFTNGXA01.phx.gbl...
> Hello Michael,
> To understand the issue better, I'd like to know the following
> information:
> 1. Does the issue only occur with a specific RS report or any RS report
> such as sample reports including in RS installation?
> 2. Do you have anonymous access enabled on Report Manager or Report Server
> virtual directories?
> Also, this issue might be related to a known issue in .Net framework 1.1
> sp1, I suggest that you contact CSS to get 887563 installed hotfix 887563
> to see if it helps:
> 884537 FIX: You may receive a "System.Net.WebException" error message when
> you
> http://support.microsoft.com/?id=884537
> 887563 Availability of the .NET Framework 1.1 Post-Service Pack 1 rollup
> http://support.microsoft.com/?id=887563
> Also, please search if there are multiple copies of security.dll on your
> SQL Reporting Services machine. If there are security.dll other than
> %windir%\system32 folder, please tempoarily rename them to test the
> situation.
>
> Regards,
> Peter Yang
> MCSE2000/2003, MCSA, MCDBA
> Microsoft Online Partner Support
> When responding to posts, please "Reply to Group" via your newsreader so
> that others may learn and benefit from your issue.
> =====================================================> This posting is provided "AS IS" with no warranties, and confers no
> rights.
>
>
> --
> | Thread-Topic: Intermittent 401: Not Authorized
> | thread-index: AcVTuOW2QlsDZxZ1SwW4LqLFvzorxw==> | X-WBNR-Posting-Host: 62.97.217.178
> | From: =?Utf-8?B?TWljaGFlbCBEb3JmbWFu?= <mercatus2004@.online.nospam>
> | Subject: Intermittent 401: Not Authorized
> | Date: Sun, 8 May 2005 03:30:04 -0700
> | Lines: 11
> | Message-ID: <E81A662F-4F37-45EB-8174-9C17787D5295@.microsoft.com>
> | MIME-Version: 1.0
> | Content-Type: text/plain;
> | charset="Utf-8"
> | Content-Transfer-Encoding: 7bit
> | X-Newsreader: Microsoft CDO for Windows 2000
> | Content-Class: urn:content-classes:message
> | Importance: normal
> | Priority: normal
> | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
> | Newsgroups: microsoft.public.sqlserver.reportingsvcs
> | NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
> | Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA03.phx.gbl
> | Xref: TK2MSFTNGXA01.phx.gbl
> microsoft.public.sqlserver.reportingsvcs:43126
> | X-Tomcat-NG: microsoft.public.sqlserver.reportingsvcs
> |
> | The first time I try to access a RS report after an IISreset, I get a
> | "System.Net.WebException: The request failed with HTTP status 401:
> | Unauthorized." error. If I try to access it again, I get in without a
> | problem.
> |
> | In addition to the "first attempt after the iisreset", which happens
> | consistently, we also intermittently experience the same error,
> infrequently.
> |
> | Any idea what is going on here? Caching of Credentials?
> |
> | Michael Dorfman
> |
>|||I have 4 different security.dll files...
C:\WINDOWS\system32 - version 5.2.3790.0
C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET
Files\reportserver\28ed0657\f12b7b77\assembly\dl2\d011044e\8fb1f7af_6dc3c401
C:\WINDOWS\system32\dllcache
C:\Program Files\Microsoft SQL Server\MSSQL\Reporting
Services\ReportServer\bin - version 1.0.1770.24267
should I keep the Reporting Services version or the Windows version?
"Peter Yang [MSFT]" wrote:
> Hello Michael,
> To understand the issue better, I'd like to know the following information:
> 1. Does the issue only occur with a specific RS report or any RS report
> such as sample reports including in RS installation?
> 2. Do you have anonymous access enabled on Report Manager or Report Server
> virtual directories?
> Also, this issue might be related to a known issue in .Net framework 1.1
> sp1, I suggest that you contact CSS to get 887563 installed hotfix 887563
> to see if it helps:
> 884537 FIX: You may receive a "System.Net.WebException" error message when
> you
> http://support.microsoft.com/?id=884537
> 887563 Availability of the .NET Framework 1.1 Post-Service Pack 1 rollup
> http://support.microsoft.com/?id=887563
> Also, please search if there are multiple copies of security.dll on your
> SQL Reporting Services machine. If there are security.dll other than
> %windir%\system32 folder, please tempoarily rename them to test the
> situation.
>
> Regards,
> Peter Yang
> MCSE2000/2003, MCSA, MCDBA
> Microsoft Online Partner Support
> When responding to posts, please "Reply to Group" via your newsreader so
> that others may learn and benefit from your issue.
> =====================================================> This posting is provided "AS IS" with no warranties, and confers no rights.
>
>
> --
> | Thread-Topic: Intermittent 401: Not Authorized
> | thread-index: AcVTuOW2QlsDZxZ1SwW4LqLFvzorxw==> | X-WBNR-Posting-Host: 62.97.217.178
> | From: =?Utf-8?B?TWljaGFlbCBEb3JmbWFu?= <mercatus2004@.online.nospam>
> | Subject: Intermittent 401: Not Authorized
> | Date: Sun, 8 May 2005 03:30:04 -0700
> | Lines: 11
> | Message-ID: <E81A662F-4F37-45EB-8174-9C17787D5295@.microsoft.com>
> | MIME-Version: 1.0
> | Content-Type: text/plain;
> | charset="Utf-8"
> | Content-Transfer-Encoding: 7bit
> | X-Newsreader: Microsoft CDO for Windows 2000
> | Content-Class: urn:content-classes:message
> | Importance: normal
> | Priority: normal
> | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
> | Newsgroups: microsoft.public.sqlserver.reportingsvcs
> | NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
> | Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA03.phx.gbl
> | Xref: TK2MSFTNGXA01.phx.gbl microsoft.public.sqlserver.reportingsvcs:43126
> | X-Tomcat-NG: microsoft.public.sqlserver.reportingsvcs
> |
> | The first time I try to access a RS report after an IISreset, I get a
> | "System.Net.WebException: The request failed with HTTP status 401:
> | Unauthorized." error. If I try to access it again, I get in without a
> | problem.
> |
> | In addition to the "first attempt after the iisreset", which happens
> | consistently, we also intermittently experience the same error,
> infrequently.
> |
> | Any idea what is going on here? Caching of Credentials?
> |
> | Michael Dorfman
> |
>
Intermittant SQL Connection Issue
intermittantly;
"A transport-level error has occurred when sending the request to the
server. (provider: TCP Provider, error: 0 - An existing connection was
forcibly closed by the remote host.)"
The SQL Server is a clustered SQL Server 2005 SP1, running on Windows 2003
SP1.
What could be causing this error, and more importantly how do we resolve it?
Regards
Andrew Teece
Technical Architect, eNateHi Andrew,
Per my understanding, the error was intermittantly thrown by your system in
production environment when it was trying to perform a database operation.
If I have misunderstood, please let me know.
From my research, the issue might be caused by various reasons, such as
broken connections in connection pool, hardware failure, network problems
etc. Also, it might be the known issue which is described in this article:
4.1.2 Connections May Be Forcibly Closed When Running on Windows Server
2003 SP1
http://support.microsoft.com/defaul...kb;EN-US;910228
As it mentioned, to resolve this issue, you may use the regedit.exe utility
to add a new DWORD value named SynAttackProtect to the registry key
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControl
Set\Services\Tcpip\Parameters\with
value data of 00000000.
If that is not the problem, I recommend that you check if there is a
connection pool in your system and if the connections in the pool have a
timeout value. If so, please set the active connections in the pool with
infinite timeout value.
Since your environment is complex and the issue occurs intermittantly in
production environment, if this issue persists, immediately and effectively
I recommend that you contact Microsoft Customer Support Services ( CSS )
via telephone so that a dedicated Support Professional can assist you
recover the server in a more efficient manner. Please be advised that
contacting phone support will be a charged call.
To obtain the phone numbers for specific technology request please take a
look at the web site listed below.
http://support.microsoft.com/defaul...US;PHONENUMBERS
If you are outside the US please see http://support.microsoft.com for
regional support phone numbers.
If you have any other questions or concerns, please feel free to let me
know. Have a good day!
Best regards,
Charles Wang
Microsoft Online Community Support
========================================
=============
Get notification to my posts through email? Please refer to:
http://msdn.microsoft.com/subscript...ault.aspx#notif
ications
If you are using Outlook Express, please make sure you clear the check box
"Tools/Options/Read: Get 300 headers at a time" to see your reply promptly.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscript...t/default.aspx.
========================================
==============
When responding to posts, please "Reply to Group" via
your newsreader so that others may learn and benefit
from this issue.
========================================
==============
This posting is provided "AS IS" with no warranties, and confers no rights.
========================================
==============|||On May 21, 9:31 pm, "Andrew Teece" <e...@.nospam.nospam> wrote:
> We currently have a system in production that raises the following error
> intermittantly;
> "A transport-level error has occurred when sending the request to the
> server. (provider: TCP Provider, error: 0 - An existing connection was
> forcibly closed by the remote host.)"
> The SQL Server is a clustered SQL Server 2005 SP1, running on Windows 2003
> SP1.
> What could be causing this error, and more importantly how do we resolve i
t?
> Regards
> Andrew Teece
> Technical Architect, eNate
Check the following
1. Router log for any errors
Routers may support IP Virtual Re-Assembly on all interfaces. It is
turned on by default may cause numerous errors .Disable the option
on all interfaces of routers and try
2. Synattack Registry setting
3. Anti Virus software may be closing the connection
Report back after you solve the problem . It may help others
Thanks
Srinivas|||Thanks for the ideas M A Srinivas
At the moment, I think the most likly is the "2. Synattack Registry setting"
that was also mentioned by Charles Wang.
I think this mostly because we are running on a cluster, and the application
raising the error is running on the same pair of cluster servers. As the
application is running concurrently on both, and is raising the error from
both I doubt a network issue because on at least one of the servers my
understanding is that the connection will go through the tcp/ip layer, but
not onto the physical network.
Obviously I will post back any findings.
Regards
Andrew Teece
"M A Srinivas" <masri999@.gmail.com> wrote in message
news:1179827956.238191.166180@.u36g2000prd.googlegroups.com...
> On May 21, 9:31 pm, "Andrew Teece" <e...@.nospam.nospam> wrote:
> Check the following
> 1. Router log for any errors
> Routers may support IP Virtual Re-Assembly on all interfaces. It is
> turned on by default may cause numerous errors .Disable the option
> on all interfaces of routers and try
> 2. Synattack Registry setting
> 3. Anti Virus software may be closing the connection
> Report back after you solve the problem . It may help others
> Thanks
> Srinivas
>
>
>
Wednesday, March 21, 2012
Interesting case of "Invalid attempt to MetaData when reader is closed."
I was going to post a long message but I found the problem. Yet I do not know how to correct it efficiently.
I have a request to my DB using that kind of code :
With SQL_Commande
valiSqlConnection(True)
' Configure SQL_Commande.
.Connection = SQL_Connection
.CommandText = "_Fonctions_valiUtilInfo"
.CommandType = Data.CommandType.StoredProcedure
.Parameters.Clear()
Dim SQL_Lecteur As SqlDataReader = SQL_Commande.ExecuteReader
If SQL_Lecteur.Read And Not IsDBNull(SQL_Lecteur(0)) Then Return SQL_Lecteur(0) Else Return Nothing
valiSqlConnection(False, SQL_Lecteur)
End With
My problem is that I need use a function within the "With" section, and that function calls a request on the DB then closes the query, and when it gets back at executing the remaining part of the code, it stop saying that the query is closed and cannot be excuted anymore. How can I nest a query within an other one without having this problem?
Adding a more user friendly structure explaination :
SQL Request #1
Function A ( Extracted Value #1 )
Extracted Value #2
Extracted Value #3
Closing SQL Resquest #1
Function A ( Value #1 )
SQL Request #A
Returning Extracted Value #A
Closing SQL Request #A
It closes both request. I need to keep the request open. Of course I could change the order, but that is just by passing the problem. As well I know I could redesign the TSQL request to correct the problem, but for now, I do not have the time to do that since the request is very large and would need close to complete redesign.
Thank you!
|||
Finaly, due to lack of answer I remade the entire SQL request.
Sunday, February 19, 2012
Integrating Reports into existing ASP.NET site/app...
reports through a custom interface NOT the standard SSRS interface. So as
far as I know there are 3 ways of presenting SSRS reports to users:
1) Report Manager
2) Reports through URL
3) SSRS Web Services
1 and 2 are simple, but require that the user experience SSRS look and feel,
including all navigation whereas the Web Services can be used to allow the
user to interact with reports that will have the same look and feel as the
site for which they are being integrated.
Is this a fair assessment? What in your opinion is the best way to integrate
SSRS reports into a site so the user will get to pick report params via web
controls custom to the site but then view the report with the zooming,
paging and exporting
that you get free with Report Manager?
**Note I have looked at and got to run the
Microsoft.Samples.ReportingServices.ReportViewer, and maybe this is the best
way. But can this be used when presenting the user with an alternative way
of providing parameters?
Thanks all in advance.I am using ReportViewer component in my current asp.net web site. You can
find this component in x:\Program Files\Microsoft SQL
Server\MSSQL\Reporting Services\Samples\Applications\ReportViewer. There is
c# and vb.net code available. You need to compile it first. And this link is
also helped me much at the begining;
http://www.odetocode.com/Articles/128.aspx (dont forget to read part two)
Hope this helps,
Regards.
"Terry Mulvany" <terry.mulvany@.rouseservices.com> wrote in message
news:#G#BlW72EHA.3380@.TK2MSFTNGP09.phx.gbl...
> We have been creating reports using SSRS but would like our users to
request
> reports through a custom interface NOT the standard SSRS interface. So as
> far as I know there are 3 ways of presenting SSRS reports to users:
> 1) Report Manager
> 2) Reports through URL
> 3) SSRS Web Services
> 1 and 2 are simple, but require that the user experience SSRS look and
feel,
> including all navigation whereas the Web Services can be used to allow the
> user to interact with reports that will have the same look and feel as the
> site for which they are being integrated.
> Is this a fair assessment? What in your opinion is the best way to
integrate
> SSRS reports into a site so the user will get to pick report params via
web
> controls custom to the site but then view the report with the zooming,
> paging and exporting
> that you get free with Report Manager?
> **Note I have looked at and got to run the
> Microsoft.Samples.ReportingServices.ReportViewer, and maybe this is the
best
> way. But can this be used when presenting the user with an alternative
way
> of providing parameters?
> Thanks all in advance.
>
>