473,770 Members | 4,419 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Missing Web log Entry's for file downloads using ashx

Hi,

I have been using the code (some of it has been removed for simplicity)
below to allow authenticated (using ASP.NET membership database) users to get
a file from their archive area. It seems to work fine, however I noticed
that no web log entry is added when a successful download occurs (normally a
200 HTTP status code, however, if there is an authorization failure, it gets
logged). I have a logging routine that logs a successful download to a
database, but the W3SVC IIS log has nothing. The code below is contained in
an .ashx file. One other thing to note, I have added MADAM to the web
application, to allow for basic authentication (they might use WGET to
download archives, instead of the web forms).

Thanks.

Public Class GetArchive : Implements IHttpHandler
Public Sub ProcessRequest( ByVal context As HttpContext) Implements
IHttpHandler.Pr ocessRequest
Dim strFileName As String = String.Empty
Dim blnTransmitting File As Boolean = False
Try
context.Respons e.Buffer = True
If context.User.Id entity.IsAuthen ticated = True Then
strFileName = context.Request .QueryString("f ile")
If String.IsNullOr Empty(strFileNa me) = False Then
strFileName = System.IO.Path. GetFileName(str FileName)
context.Respons e.Clear()

Dim objFileInfo As New System.IO.FileI nfo(strFileName )
Dim intFileSize As Long = 0

If objFileInfo IsNot Nothing Then
intFileSize = objFileInfo.Len gth
End If

context.Respons e.StatusCode = 200
context.Respons e.ContentType = "applicatio n/zip"
context.Respons e.AddHeader("Co ntent-Disposition",
"attachment ; filename=" + strFileName)
context.Respons e.AddHeader("Co ntent-Length",
intFileSize.ToS tring())

If context.Request .HttpMethod <"HEAD" Then
Dim dtStart As DateTime = Now()
Dim dtFinish As DateTime
Dim tsTimeTaken As TimeSpan
context.Respons e.SuppressConte nt = False
context.Respons e.Buffer = False
context.Respons e.BufferOutput = False
blnTransmitting File = True
context.Respons e.TransmitFile( strFileName, 0, -1)
context.Respons e.Flush()
context.Respons e.Close()
dtFinish = Now()
tsTimeTaken = dtFinish - dtStart
EventLogger.Log DownloadEvent(s trFileName,
strUserName, tsTimeTaken.Tot alSeconds)
End If
Else
context.Respons e.Clear()
context.Respons e.ContentType = "text/plain"
context.Respons e.StatusCode = 404
context.Respons e.Write("File Not Found")
End If
End If

Catch ex As Exception
If blnTransmitting File = False Then
context.Respons e.Clear()
context.Respons e.ClearContent( )
context.Respons e.ClearHeaders( )
context.Respons e.ContentType = "text/plain"
End If
context.Respons e.StatusCode = 403
context.Respons e.Write("Reques t failed [" + ex.ToString() + "]")
EventLogger.Log DownloadEvent(" Failed", ex.ToString())
End Try
End Sub

Public ReadOnly Property IsReusable() As Boolean Implements
IHttpHandler.Is Reusable
Get
Return False
End Get
End Property
End Class

Aug 26 '08 #1
7 2832
Hi,
Based on my understanding you created an HttpHandler to handle the request
to .ashx, check the user's right and send the file back. But I'm not sure
what do you mean by "but the W3SVC IIS log has nothing". Do you mean the
request to .ashx is not logged?
I created a new HttpHandler to test it and it works fine. Here's my code:
In Web.Config:
<httpHandlers >

<add verb="*" path="*.ashx" type="LogCompon ent.MyHandler" />
MyHandler.vb:
Namespace LogComponent

Public Class MyHandler
Implements IHttpHandler
Public Sub ProcessRequest( ByVal ctx As HttpContext)
'do something
response.Write( "Your access is registered in my server !")
End Sub
Public ReadOnly Property IsReusable() As Boolean
Get
Return True
End Get
End Property
End Class
End Namespace

I deployed the web application on IIS 5.1. The log path is
C:\WINDOWS\syst em32\Logfiles. I checked the log file in MSFTPSVC1 folder.
Each time when I access *.ashx there's a new entry added.

Could you check if logging is enabled in IIS and the path is correct? Can
you see the log when you access it in the browser directly instead of using
WGet tool?

If it still doesn't work could you tell me what version of IIS are you
using? It will help me to troubleshoot further.
Regards,
Allen Chen
Microsoft Online Support

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
ms****@microsof t.com.

=============== =============== =============== =====
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

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/subscripti...t/default.aspx.
=============== =============== =============== =====
This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
| Thread-Topic: Missing Web log Entry's for file downloads using ashx
| thread-index: AckHqFrM373Es0n mSI69ThkADoUrnA ==
| X-WBNR-Posting-Host: 207.46.193.207
| From: =?Utf-8?B?QU9UWCBTYW4 gQW50b25pbw==?= <El******@newsg roup.nospam>
| Subject: Missing Web log Entry's for file downloads using ashx
| Date: Tue, 26 Aug 2008 11:20:01 -0700
| Lines: 87
| Message-ID: <69************ *************** *******@microso ft.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.3119
| Newsgroups: microsoft.publi c.dotnet.framew ork.aspnet
| Path: TK2MSFTNGHUB02. phx.gbl
| Xref: TK2MSFTNGHUB02. phx.gbl
microsoft.publi c.dotnet.framew ork.aspnet:7466 1
| NNTP-Posting-Host: tk2msftibfm01.p hx.gbl 10.40.244.149
| X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.aspnet
|
| Hi,
|
| I have been using the code (some of it has been removed for simplicity)
| below to allow authenticated (using ASP.NET membership database) users to
get
| a file from their archive area. It seems to work fine, however I noticed
| that no web log entry is added when a successful download occurs
(normally a
| 200 HTTP status code, however, if there is an authorization failure, it
gets
| logged). I have a logging routine that logs a successful download to a
| database, but the W3SVC IIS log has nothing. The code below is contained
in
| an .ashx file. One other thing to note, I have added MADAM to the web
| application, to allow for basic authentication (they might use WGET to
| download archives, instead of the web forms).
|
| Thanks.
|
| Public Class GetArchive : Implements IHttpHandler
| Public Sub ProcessRequest( ByVal context As HttpContext) Implements
| IHttpHandler.Pr ocessRequest
| Dim strFileName As String = String.Empty
| Dim blnTransmitting File As Boolean = False
| Try
| context.Respons e.Buffer = True
| If context.User.Id entity.IsAuthen ticated = True Then
| strFileName = context.Request .QueryString("f ile")
| If String.IsNullOr Empty(strFileNa me) = False Then
| strFileName = System.IO.Path. GetFileName(str FileName)
| context.Respons e.Clear()
|
| Dim objFileInfo As New System.IO.FileI nfo(strFileName )
| Dim intFileSize As Long = 0
|
| If objFileInfo IsNot Nothing Then
| intFileSize = objFileInfo.Len gth
| End If
|
| context.Respons e.StatusCode = 200
| context.Respons e.ContentType = "applicatio n/zip"
| context.Respons e.AddHeader("Co ntent-Disposition",
| "attachment ; filename=" + strFileName)
| context.Respons e.AddHeader("Co ntent-Length",
| intFileSize.ToS tring())
|
| If context.Request .HttpMethod <"HEAD" Then
| Dim dtStart As DateTime = Now()
| Dim dtFinish As DateTime
| Dim tsTimeTaken As TimeSpan
| context.Respons e.SuppressConte nt = False
| context.Respons e.Buffer = False
| context.Respons e.BufferOutput = False
| blnTransmitting File = True
| context.Respons e.TransmitFile( strFileName, 0, -1)
| context.Respons e.Flush()
| context.Respons e.Close()
| dtFinish = Now()
| tsTimeTaken = dtFinish - dtStart
| EventLogger.Log DownloadEvent(s trFileName,
| strUserName, tsTimeTaken.Tot alSeconds)
| End If
| Else
| context.Respons e.Clear()
| context.Respons e.ContentType = "text/plain"
| context.Respons e.StatusCode = 404
| context.Respons e.Write("File Not Found")
| End If
| End If
|
| Catch ex As Exception
| If blnTransmitting File = False Then
| context.Respons e.Clear()
| context.Respons e.ClearContent( )
| context.Respons e.ClearHeaders( )
| context.Respons e.ContentType = "text/plain"
| End If
| context.Respons e.StatusCode = 403
| context.Respons e.Write("Reques t failed [" + ex.ToString() +
"]")
| EventLogger.Log DownloadEvent(" Failed", ex.ToString())
| End Try
| End Sub
|
| Public ReadOnly Property IsReusable() As Boolean Implements
| IHttpHandler.Is Reusable
| Get
| Return False
| End Get
| End Property
| End Class
|
|

Aug 27 '08 #2
Hi,
I am using IIS6, and you are correct, it is not logging the request to the
..ashx when a file is returned to the user (i.e. good credentials and file
requested exists); this executes the part of the if containing the
transmitfile method call. However, a request IS logged if the user requests
a file that doesn't exist or they provide invalid credentials (basically any
logic path that doesn't include the transmitfile method call). It would
appear that the inherited class doing the logging to the web log isn't when
the transmitfile method is called. It does the same thing whether I use IE
or WGet.
Thanks.
"Allen Chen [MSFT]" wrote:
Hi,
Based on my understanding you created an HttpHandler to handle the request
to .ashx, check the user's right and send the file back. But I'm not sure
what do you mean by "but the W3SVC IIS log has nothing". Do you mean the
request to .ashx is not logged?
I created a new HttpHandler to test it and it works fine. Here's my code:
In Web.Config:
<httpHandlers >

<add verb="*" path="*.ashx" type="LogCompon ent.MyHandler" />
MyHandler.vb:
Namespace LogComponent

Public Class MyHandler
Implements IHttpHandler
Public Sub ProcessRequest( ByVal ctx As HttpContext)
'do something
response.Write( "Your access is registered in my server !")
End Sub
Public ReadOnly Property IsReusable() As Boolean
Get
Return True
End Get
End Property
End Class
End Namespace

I deployed the web application on IIS 5.1. The log path is
C:\WINDOWS\syst em32\Logfiles. I checked the log file in MSFTPSVC1 folder.
Each time when I access *.ashx there's a new entry added.

Could you check if logging is enabled in IIS and the path is correct? Can
you see the log when you access it in the browser directly instead of using
WGet tool?

If it still doesn't work could you tell me what version of IIS are you
using? It will help me to troubleshoot further.
Regards,
Allen Chen
Microsoft Online Support

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
ms****@microsof t.com.

=============== =============== =============== =====
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

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/subscripti...t/default.aspx.
=============== =============== =============== =====
This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
| Thread-Topic: Missing Web log Entry's for file downloads using ashx
| thread-index: AckHqFrM373Es0n mSI69ThkADoUrnA ==
| X-WBNR-Posting-Host: 207.46.193.207
| From: =?Utf-8?B?QU9UWCBTYW4 gQW50b25pbw==?= <El******@newsg roup.nospam>
| Subject: Missing Web log Entry's for file downloads using ashx
| Date: Tue, 26 Aug 2008 11:20:01 -0700
| Lines: 87
| Message-ID: <69************ *************** *******@microso ft.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.3119
| Newsgroups: microsoft.publi c.dotnet.framew ork.aspnet
| Path: TK2MSFTNGHUB02. phx.gbl
| Xref: TK2MSFTNGHUB02. phx.gbl
microsoft.publi c.dotnet.framew ork.aspnet:7466 1
| NNTP-Posting-Host: tk2msftibfm01.p hx.gbl 10.40.244.149
| X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.aspnet
|
| Hi,
|
| I have been using the code (some of it has been removed for simplicity)
| below to allow authenticated (using ASP.NET membership database) users to
get
| a file from their archive area. It seems to work fine, however I noticed
| that no web log entry is added when a successful download occurs
(normally a
| 200 HTTP status code, however, if there is an authorization failure, it
gets
| logged). I have a logging routine that logs a successful download to a
| database, but the W3SVC IIS log has nothing. The code below is contained
in
| an .ashx file. One other thing to note, I have added MADAM to the web
| application, to allow for basic authentication (they might use WGET to
| download archives, instead of the web forms).
|
| Thanks.
|
| Public Class GetArchive : Implements IHttpHandler
| Public Sub ProcessRequest( ByVal context As HttpContext) Implements
| IHttpHandler.Pr ocessRequest
| Dim strFileName As String = String.Empty
| Dim blnTransmitting File As Boolean = False
| Try
| context.Respons e.Buffer = True
| If context.User.Id entity.IsAuthen ticated = True Then
| strFileName = context.Request .QueryString("f ile")
| If String.IsNullOr Empty(strFileNa me) = False Then
| strFileName = System.IO.Path. GetFileName(str FileName)
| context.Respons e.Clear()
|
| Dim objFileInfo As New System.IO.FileI nfo(strFileName )
| Dim intFileSize As Long = 0
|
| If objFileInfo IsNot Nothing Then
| intFileSize = objFileInfo.Len gth
| End If
|
| context.Respons e.StatusCode = 200
| context.Respons e.ContentType = "applicatio n/zip"
| context.Respons e.AddHeader("Co ntent-Disposition",
| "attachment ; filename=" + strFileName)
| context.Respons e.AddHeader("Co ntent-Length",
| intFileSize.ToS tring())
|
| If context.Request .HttpMethod <"HEAD" Then
| Dim dtStart As DateTime = Now()
| Dim dtFinish As DateTime
| Dim tsTimeTaken As TimeSpan
| context.Respons e.SuppressConte nt = False
| context.Respons e.Buffer = False
| context.Respons e.BufferOutput = False
| blnTransmitting File = True
| context.Respons e.TransmitFile( strFileName, 0, -1)
| context.Respons e.Flush()
| context.Respons e.Close()
| dtFinish = Now()
| tsTimeTaken = dtFinish - dtStart
| EventLogger.Log DownloadEvent(s trFileName,
| strUserName, tsTimeTaken.Tot alSeconds)
| End If
| Else
| context.Respons e.Clear()
| context.Respons e.ContentType = "text/plain"
| context.Respons e.StatusCode = 404
| context.Respons e.Write("File Not Found")
| End If
| End If
|
| Catch ex As Exception
| If blnTransmitting File = False Then
| context.Respons e.Clear()
| context.Respons e.ClearContent( )
| context.Respons e.ClearHeaders( )
| context.Respons e.ContentType = "text/plain"
| End If
| context.Respons e.StatusCode = 403
| context.Respons e.Write("Reques t failed [" + ex.ToString() +
"]")
| EventLogger.Log DownloadEvent(" Failed", ex.ToString())
| End Try
| End Sub
|
| Public ReadOnly Property IsReusable() As Boolean Implements
| IHttpHandler.Is Reusable
| Get
| Return False
| End Get
| End Property
| End Class
|
|

Aug 27 '08 #3
Hi,

I cannot reproduce this problem on a Windows 2003 R2 machine with IIS 6
installed. From your description it's caused by the execution of the code
after the user has been authenticated. So I tried this:

Public Class MyHandler
Implements IHttpHandler
Public Sub ProcessRequest( ByVal context As HttpContext)
Dim response As HttpResponse = context.Respons e
Dim strFileName As String = context.Request .QueryString("f ile")
If String.IsNullOr Empty(strFileNa me) = False Then
strFileName = context.Server. MapPath(strFile Name)
Dim fi As FileInfo = New System.IO.FileI nfo(strFileName )
context.Respons e.Clear()

context.Respons e.StatusCode = 200
context.Respons e.ContentType = "applicatio n/zip"
context.Respons e.AddHeader("Co ntent-Disposition", "attachment ;
filename=" & strFileName)
context.Respons e.AddHeader("Co ntent-Length", fi.Length.ToStr ing())
context.Respons e.SuppressConte nt = False
context.Respons e.Buffer = False
context.Respons e.BufferOutput = False

context.Respons e.TransmitFile( strFileName,0,-1)

context.Respons e.Flush()
context.Respons e.Close()

End If
End Sub
Public ReadOnly Property IsReusable() As Boolean
Get
Return False
End Get
End Property
End Class

Basically I used the code in the logic path after the user is
authenticated, including calling TransmitFile method, which as you said, is
the culprit.

However, the log appears as normal when I request something like
http://localhost/.../1.ashx?file=1.zip and the file is successfully
downloaded.

Because I cannot reproduce it I have the following suggestions:

1. Please create a new project and use above code to test. Request the ashx
via IE on the server machine using localhost. Thus we can make sure our
repro steps are same. Can you see the log in this way? If you can see the
log you can add other code blocks one by one until finding the culprit.

2. Please note in IIS 6 the log will not be flushed to the disk
immediately. Considering the performance the log will be buffered and
flushed to disk every 60 seconds by default. Please wait several minutes to
make sure that the log has not been added.

3. If you still cannot see the log using my code please tell me the
operating system you'd using and I'll try to reproduce it again in the same
environment.

Actually, as far as I know, IIS will log all the requests unless a
component in IIS has crashed, which happens uncommonly. I am looking
forward to your test result.

Regards,
Allen Chen
Microsoft Online Support

--------------------
| Thread-Topic: Missing Web log Entry's for file downloads using ashx
| thread-index: AckIWKbuG7vlRWc vRveDaY7wru6RMQ ==
| X-WBNR-Posting-Host: 207.46.192.207
| From: =?Utf-8?B?QU9UWCBTYW4 gQW50b25pbw==?= <El******@newsg roup.nospam>
| References: <69************ *************** *******@microso ft.com>
<Cf************ **@TK2MSFTNGHUB 02.phx.gbl>
| Subject: RE: Missing Web log Entry's for file downloads using ashx
| Date: Wed, 27 Aug 2008 08:22:00 -0700
| Lines: 201
| Message-ID: <85************ *************** *******@microso ft.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.3119
| Newsgroups: microsoft.publi c.dotnet.framew ork.aspnet
| Path: TK2MSFTNGHUB02. phx.gbl
| Xref: TK2MSFTNGHUB02. phx.gbl
microsoft.publi c.dotnet.framew ork.aspnet:7474 7
| NNTP-Posting-Host: tk2msftibfm01.p hx.gbl 10.40.244.149
| X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.aspnet
|
| Hi,
| I am using IIS6, and you are correct, it is not logging the request to
the
| .ashx when a file is returned to the user (i.e. good credentials and file
| requested exists); this executes the part of the if containing the
| transmitfile method call. However, a request IS logged if the user
requests
| a file that doesn't exist or they provide invalid credentials (basically
any
| logic path that doesn't include the transmitfile method call). It would
| appear that the inherited class doing the logging to the web log isn't
when
| the transmitfile method is called. It does the same thing whether I use
IE
| or WGet.
| Thanks.
| "Allen Chen [MSFT]" wrote:
|
| Hi,
| Based on my understanding you created an HttpHandler to handle the
request
| to .ashx, check the user's right and send the file back. But I'm not
sure
| what do you mean by "but the W3SVC IIS log has nothing". Do you mean
the
| request to .ashx is not logged?
| I created a new HttpHandler to test it and it works fine. Here's my
code:
| In Web.Config:
| <httpHandlers >
| >
| <add verb="*" path="*.ashx" type="LogCompon ent.MyHandler" />
| MyHandler.vb:
| Namespace LogComponent
| >
| Public Class MyHandler
| Implements IHttpHandler
| Public Sub ProcessRequest( ByVal ctx As HttpContext)
| 'do something
| response.Write( "Your access is registered in my server !")
| End Sub
| Public ReadOnly Property IsReusable() As Boolean
| Get
| Return True
| End Get
| End Property
| End Class
| >
| >
| End Namespace
| >
| I deployed the web application on IIS 5.1. The log path is
| C:\WINDOWS\syst em32\Logfiles. I checked the log file in MSFTPSVC1
folder.
| Each time when I access *.ashx there's a new entry added.
| >
| Could you check if logging is enabled in IIS and the path is correct?
Can
| you see the log when you access it in the browser directly instead of
using
| WGet tool?
| >
| If it still doesn't work could you tell me what version of IIS are you
| using? It will help me to troubleshoot further.
| Regards,
| Allen Chen
| Microsoft Online Support
| >
| Delighting our customers is our #1 priority. We welcome your comments
and
| suggestions about how we can improve the support we provide to you.
Please
| feel free to let my manager know what you think of the level of service
| provided. You can send feedback directly to my manager at:
| ms****@microsof t.com.
| >
| =============== =============== =============== =====
| Get notification to my posts through email? Please refer to
| >
http://msdn.microsoft.com/subscripti...ult.aspx#notif
| ications.
| >
| 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/subscripti...t/default.aspx.
| =============== =============== =============== =====
| This posting is provided "AS IS" with no warranties, and confers no
rights.
| >
| --------------------
| | Thread-Topic: Missing Web log Entry's for file downloads using ashx
| | thread-index: AckHqFrM373Es0n mSI69ThkADoUrnA ==
| | X-WBNR-Posting-Host: 207.46.193.207
| | From: =?Utf-8?B?QU9UWCBTYW4 gQW50b25pbw==?= <El******@newsg roup.nospam>
| | Subject: Missing Web log Entry's for file downloads using ashx
| | Date: Tue, 26 Aug 2008 11:20:01 -0700
| | Lines: 87
| | Message-ID: <69************ *************** *******@microso ft.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.3119
| | Newsgroups: microsoft.publi c.dotnet.framew ork.aspnet
| | Path: TK2MSFTNGHUB02. phx.gbl
| | Xref: TK2MSFTNGHUB02. phx.gbl
| microsoft.publi c.dotnet.framew ork.aspnet:7466 1
| | NNTP-Posting-Host: tk2msftibfm01.p hx.gbl 10.40.244.149
| | X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.aspnet
| |
| | Hi,
| |
| | I have been using the code (some of it has been removed for
simplicity)
| | below to allow authenticated (using ASP.NET membership database)
users to
| get
| | a file from their archive area. It seems to work fine, however I
noticed
| | that no web log entry is added when a successful download occurs
| (normally a
| | 200 HTTP status code, however, if there is an authorization failure,
it
| gets
| | logged). I have a logging routine that logs a successful download to
a
| | database, but the W3SVC IIS log has nothing. The code below is
contained
| in
| | an .ashx file. One other thing to note, I have added MADAM to the
web
| | application, to allow for basic authentication (they might use WGET
to
| | download archives, instead of the web forms).
| |
| | Thanks.
| |
| | Public Class GetArchive : Implements IHttpHandler
| | Public Sub ProcessRequest( ByVal context As HttpContext)
Implements
| | IHttpHandler.Pr ocessRequest
| | Dim strFileName As String = String.Empty
| | Dim blnTransmitting File As Boolean = False
| | Try
| | context.Respons e.Buffer = True
| | If context.User.Id entity.IsAuthen ticated = True Then
| | strFileName = context.Request .QueryString("f ile")
| | If String.IsNullOr Empty(strFileNa me) = False Then
| | strFileName =
System.IO.Path. GetFileName(str FileName)
| | context.Respons e.Clear()
| |
| | Dim objFileInfo As New
System.IO.FileI nfo(strFileName )
| | Dim intFileSize As Long = 0
| |
| | If objFileInfo IsNot Nothing Then
| | intFileSize = objFileInfo.Len gth
| | End If
| |
| | context.Respons e.StatusCode = 200
| | context.Respons e.ContentType = "applicatio n/zip"
| | context.Respons e.AddHeader("Co ntent-Disposition",
| | "attachment ; filename=" + strFileName)
| | context.Respons e.AddHeader("Co ntent-Length",
| | intFileSize.ToS tring())
| |
| | If context.Request .HttpMethod <"HEAD" Then
| | Dim dtStart As DateTime = Now()
| | Dim dtFinish As DateTime
| | Dim tsTimeTaken As TimeSpan
| | context.Respons e.SuppressConte nt = False
| | context.Respons e.Buffer = False
| | context.Respons e.BufferOutput = False
| | blnTransmitting File = True
| | context.Respons e.TransmitFile( strFileName, 0,
-1)
| | context.Respons e.Flush()
| | context.Respons e.Close()
| | dtFinish = Now()
| | tsTimeTaken = dtFinish - dtStart
| | EventLogger.Log DownloadEvent(s trFileName,
| | strUserName, tsTimeTaken.Tot alSeconds)
| | End If
| | Else
| | context.Respons e.Clear()
| | context.Respons e.ContentType = "text/plain"
| | context.Respons e.StatusCode = 404
| | context.Respons e.Write("File Not Found")
| | End If
| | End If
| |
| | Catch ex As Exception
| | If blnTransmitting File = False Then
| | context.Respons e.Clear()
| | context.Respons e.ClearContent( )
| | context.Respons e.ClearHeaders( )
| | context.Respons e.ContentType = "text/plain"
| | End If
| | context.Respons e.StatusCode = 403
| | context.Respons e.Write("Reques t failed [" + ex.ToString()
+
| "]")
| | EventLogger.Log DownloadEvent(" Failed", ex.ToString())
| | End Try
| | End Sub
| |
| | Public ReadOnly Property IsReusable() As Boolean Implements
| | IHttpHandler.Is Reusable
| | Get
| | Return False
| | End Get
| | End Property
| | End Class
| |
| |
| >
| >
|

Aug 29 '08 #4
Hi,

Thanks for your reply.

After some testing, I found that the culprit was lack of a call
context.Respons e.Close(). In my post there was a call to
context.Respons e.Close(), but in the code I was testing with it was missing
for some reason.

I am not sure why it is necessary to call context.Respons e.Close() after a
call to context.Respons e.TransmitFile( ), but without it, a log entry is not
written. When the call to context.Respons e.TransmitFile( ) is removed, the
call to context.Respons e.Close() is not necessary to write a IIS log entry --
one will be written either way.

Thanks again.
"Allen Chen [MSFT]" wrote:
Hi,

I cannot reproduce this problem on a Windows 2003 R2 machine with IIS 6
installed. From your description it's caused by the execution of the code
after the user has been authenticated. So I tried this:

Public Class MyHandler
Implements IHttpHandler
Public Sub ProcessRequest( ByVal context As HttpContext)
Dim response As HttpResponse = context.Respons e
Dim strFileName As String = context.Request .QueryString("f ile")
If String.IsNullOr Empty(strFileNa me) = False Then
strFileName = context.Server. MapPath(strFile Name)
Dim fi As FileInfo = New System.IO.FileI nfo(strFileName )
context.Respons e.Clear()

context.Respons e.StatusCode = 200
context.Respons e.ContentType = "applicatio n/zip"
context.Respons e.AddHeader("Co ntent-Disposition", "attachment ;
filename=" & strFileName)
context.Respons e.AddHeader("Co ntent-Length", fi.Length.ToStr ing())
context.Respons e.SuppressConte nt = False
context.Respons e.Buffer = False
context.Respons e.BufferOutput = False

context.Respons e.TransmitFile( strFileName,0,-1)

context.Respons e.Flush()
context.Respons e.Close()

End If
End Sub
Public ReadOnly Property IsReusable() As Boolean
Get
Return False
End Get
End Property
End Class

Basically I used the code in the logic path after the user is
authenticated, including calling TransmitFile method, which as you said, is
the culprit.

However, the log appears as normal when I request something like
http://localhost/.../1.ashx?file=1.zip and the file is successfully
downloaded.

Because I cannot reproduce it I have the following suggestions:

1. Please create a new project and use above code to test. Request the ashx
via IE on the server machine using localhost. Thus we can make sure our
repro steps are same. Can you see the log in this way? If you can see the
log you can add other code blocks one by one until finding the culprit.

2. Please note in IIS 6 the log will not be flushed to the disk
immediately. Considering the performance the log will be buffered and
flushed to disk every 60 seconds by default. Please wait several minutes to
make sure that the log has not been added.

3. If you still cannot see the log using my code please tell me the
operating system you'd using and I'll try to reproduce it again in the same
environment.

Actually, as far as I know, IIS will log all the requests unless a
component in IIS has crashed, which happens uncommonly. I am looking
forward to your test result.

Regards,
Allen Chen
Microsoft Online Support
Aug 29 '08 #5
Hi,

I noticed one side-effect of using context.Respons e.Close() is that the
request never finishes. If you monitor the performance counter
'ASP.NET\Reques ts Current' it will increase 1 for every request to the .ashx
page until the application pool is recycled. When the call to
context.Respons e.Close() is removed no web log entry is written, but the
counter 'ASP.NET\Reques ts Current' does not increase with each request .
According to
<http://www.improve.dk/blog/2008/03/29/response-transmitfile-close-will-kill-your-application>
this combination of calls causes the connections to stick in the send-data
state. It would seem in all this there is a bug in the TransmitFile method.
Can you confirm this behavior?

How can I get the request to write entries in the web log AND not increase
the counter 'ASP.NET\Reques ts Current'?

Thanks.
"AOTX San Antonio" wrote:
Hi,

Thanks for your reply.

After some testing, I found that the culprit was lack of a call
context.Respons e.Close(). In my post there was a call to
context.Respons e.Close(), but in the code I was testing with it was missing
for some reason.

I am not sure why it is necessary to call context.Respons e.Close() after a
call to context.Respons e.TransmitFile( ), but without it, a log entry is not
written. When the call to context.Respons e.TransmitFile( ) is removed, the
call to context.Respons e.Close() is not necessary to write a IIS log entry --
one will be written either way.

Thanks again.
"Allen Chen [MSFT]" wrote:
Hi,

I cannot reproduce this problem on a Windows 2003 R2 machine with IIS 6
installed. From your description it's caused by the execution of the code
after the user has been authenticated. So I tried this:

Public Class MyHandler
Implements IHttpHandler
Public Sub ProcessRequest( ByVal context As HttpContext)
Dim response As HttpResponse = context.Respons e
Dim strFileName As String = context.Request .QueryString("f ile")
If String.IsNullOr Empty(strFileNa me) = False Then
strFileName = context.Server. MapPath(strFile Name)
Dim fi As FileInfo = New System.IO.FileI nfo(strFileName )
context.Respons e.Clear()

context.Respons e.StatusCode = 200
context.Respons e.ContentType = "applicatio n/zip"
context.Respons e.AddHeader("Co ntent-Disposition", "attachment ;
filename=" & strFileName)
context.Respons e.AddHeader("Co ntent-Length", fi.Length.ToStr ing())
context.Respons e.SuppressConte nt = False
context.Respons e.Buffer = False
context.Respons e.BufferOutput = False

context.Respons e.TransmitFile( strFileName,0,-1)

context.Respons e.Flush()
context.Respons e.Close()

End If
End Sub
Public ReadOnly Property IsReusable() As Boolean
Get
Return False
End Get
End Property
End Class

Basically I used the code in the logic path after the user is
authenticated, including calling TransmitFile method, which as you said, is
the culprit.

However, the log appears as normal when I request something like
http://localhost/.../1.ashx?file=1.zip and the file is successfully
downloaded.

Because I cannot reproduce it I have the following suggestions:

1. Please create a new project and use above code to test. Request the ashx
via IE on the server machine using localhost. Thus we can make sure our
repro steps are same. Can you see the log in this way? If you can see the
log you can add other code blocks one by one until finding the culprit.

2. Please note in IIS 6 the log will not be flushed to the disk
immediately. Considering the performance the log will be buffered and
flushed to disk every 60 seconds by default. Please wait several minutes to
make sure that the log has not been added.

3. If you still cannot see the log using my code please tell me the
operating system you'd using and I'll try to reproduce it again in the same
environment.

Actually, as far as I know, IIS will log all the requests unless a
component in IIS has crashed, which happens uncommonly. I am looking
forward to your test result.

Regards,
Allen Chen
Microsoft Online Support
Aug 29 '08 #6
Hi,

Thanks for your update. I've reproduced it on my side. Based on my testing
I noticed it's caused by this line:
context.Respons e.AddHeader("Co ntent-Length", intFileSize.ToS tring())

Please try to remove it and don't call context.Respons e.Close(). It will
work fine in this way on my side.

In my opinion, it should not behave like this, though. I'll keep
investigating this issue and get back to you if I find anything valuable.

Regards,
Allen Chen
Microsoft Online Support

--------------------
| Thread-Topic: Missing Web log Entry's for file downloads using ashx
| thread-index: AckKF4yXk+2vWAF fQm2zGnMOB8A1Eg ==
| X-WBNR-Posting-Host: 207.46.19.168
| From: =?Utf-8?B?QU9UWCBTYW4 gQW50b25pbw==?= <El******@newsg roup.nospam>
| References: <69************ *************** *******@microso ft.com>
<Cf************ **@TK2MSFTNGHUB 02.phx.gbl>
<85************ *************** *******@microso ft.com>
<Sc************ **@TK2MSFTNGHUB 02.phx.gbl>
<53************ *************** *******@microso ft.com>
| Subject: RE: Missing Web log Entry's for file downloads using ashx
| Date: Fri, 29 Aug 2008 13:41:01 -0700
| Lines: 111
| Message-ID: <43************ *************** *******@microso ft.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.3119
| Newsgroups: microsoft.publi c.dotnet.framew ork.aspnet
| Path: TK2MSFTNGHUB02. phx.gbl
| Xref: TK2MSFTNGHUB02. phx.gbl
microsoft.publi c.dotnet.framew ork.aspnet:7493 6
| NNTP-Posting-Host: tk2msftibfm01.p hx.gbl 10.40.244.149
| X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.aspnet
|
| Hi,
|
| I noticed one side-effect of using context.Respons e.Close() is that the
| request never finishes. If you monitor the performance counter
| 'ASP.NET\Reques ts Current' it will increase 1 for every request to the
..ashx
| page until the application pool is recycled. When the call to
| context.Respons e.Close() is removed no web log entry is written, but the
| counter 'ASP.NET\Reques ts Current' does not increase with each request .
| According to
|
<http://www.improve.dk/blog/2008/03/2...lose-will-kill
-your-application>
| this combination of calls causes the connections to stick in the
send-data
| state. It would seem in all this there is a bug in the TransmitFile
method.
| Can you confirm this behavior?
|
| How can I get the request to write entries in the web log AND not
increase
| the counter 'ASP.NET\Reques ts Current'?
|
| Thanks.
| "AOTX San Antonio" wrote:
|
| Hi,
| >
| Thanks for your reply.
| >
| After some testing, I found that the culprit was lack of a call
| context.Respons e.Close(). In my post there was a call to
| context.Respons e.Close(), but in the code I was testing with it was
missing
| for some reason.
| >
| I am not sure why it is necessary to call context.Respons e.Close()
after a
| call to context.Respons e.TransmitFile( ), but without it, a log entry is
not
| written. When the call to context.Respons e.TransmitFile( ) is removed,
the
| call to context.Respons e.Close() is not necessary to write a IIS log
entry --
| one will be written either way.
| >
| Thanks again.
| "Allen Chen [MSFT]" wrote:
| >
| Hi,
|
| I cannot reproduce this problem on a Windows 2003 R2 machine with IIS
6
| installed. From your description it's caused by the execution of the
code
| after the user has been authenticated. So I tried this:
|
| Public Class MyHandler
| Implements IHttpHandler
| Public Sub ProcessRequest( ByVal context As HttpContext)
| Dim response As HttpResponse = context.Respons e
| Dim strFileName As String = context.Request .QueryString("f ile")
| If String.IsNullOr Empty(strFileNa me) = False Then
| strFileName = context.Server. MapPath(strFile Name)
| Dim fi As FileInfo = New System.IO.FileI nfo(strFileName )
| context.Respons e.Clear()
|
| context.Respons e.StatusCode = 200
| context.Respons e.ContentType = "applicatio n/zip"
| context.Respons e.AddHeader("Co ntent-Disposition", "attachment ;
| filename=" & strFileName)
| context.Respons e.AddHeader("Co ntent-Length",
fi.Length.ToStr ing())
|
|
| context.Respons e.SuppressConte nt = False
| context.Respons e.Buffer = False
| context.Respons e.BufferOutput = False
|
| context.Respons e.TransmitFile( strFileName,0,-1)
|
| context.Respons e.Flush()
| context.Respons e.Close()
|
| End If
| End Sub
| Public ReadOnly Property IsReusable() As Boolean
| Get
| Return False
| End Get
| End Property
| End Class
|
| Basically I used the code in the logic path after the user is
| authenticated, including calling TransmitFile method, which as you
said, is
| the culprit.
|
| However, the log appears as normal when I request something like
| http://localhost/.../1.ashx?file=1.zip and the file is successfully
| downloaded.
|
| Because I cannot reproduce it I have the following suggestions:
|
| 1. Please create a new project and use above code to test. Request
the ashx
| via IE on the server machine using localhost. Thus we can make sure
our
| repro steps are same. Can you see the log in this way? If you can see
the
| log you can add other code blocks one by one until finding the
culprit.
|
| 2. Please note in IIS 6 the log will not be flushed to the disk
| immediately. Considering the performance the log will be buffered and
| flushed to disk every 60 seconds by default. Please wait several
minutes to
| make sure that the log has not been added.
|
| 3. If you still cannot see the log using my code please tell me the
| operating system you'd using and I'll try to reproduce it again in
the same
| environment.
|
| Actually, as far as I know, IIS will log all the requests unless a
| component in IIS has crashed, which happens uncommonly. I am looking
| forward to your test result.
|
| Regards,
| Allen Chen
| Microsoft Online Support
|
|

Sep 2 '08 #7
Hi,

Based on my research this issue is related to Asp.NET internal mechanism
that somehow hangs the request. You're welcome to submit a feedback on the
connect to notify our development team:
http://connect.microsoft.com/VisualStudio/Feedback

Your valuable feedback will help to improve our products.

Thanks,
Allen Chen
Microsoft Online Support

--------------------
| Thread-Topic: Missing Web log Entry's for file downloads using ashx
| thread-index: AckKF4yXk+2vWAF fQm2zGnMOB8A1Eg ==
| X-WBNR-Posting-Host: 207.46.19.168
| From: =?Utf-8?B?QU9UWCBTYW4 gQW50b25pbw==?= <El******@newsg roup.nospam>
| References: <69************ *************** *******@microso ft.com>
<Cf************ **@TK2MSFTNGHUB 02.phx.gbl>
<85************ *************** *******@microso ft.com>
<Sc************ **@TK2MSFTNGHUB 02.phx.gbl>
<53************ *************** *******@microso ft.com>
| Subject: RE: Missing Web log Entry's for file downloads using ashx
| Date: Fri, 29 Aug 2008 13:41:01 -0700
| Lines: 111
| Message-ID: <43************ *************** *******@microso ft.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.3119
| Newsgroups: microsoft.publi c.dotnet.framew ork.aspnet
| Path: TK2MSFTNGHUB02. phx.gbl
| Xref: TK2MSFTNGHUB02. phx.gbl
microsoft.publi c.dotnet.framew ork.aspnet:7493 6
| NNTP-Posting-Host: tk2msftibfm01.p hx.gbl 10.40.244.149
| X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.aspnet
|
| Hi,
|
| I noticed one side-effect of using context.Respons e.Close() is that the
| request never finishes. If you monitor the performance counter
| 'ASP.NET\Reques ts Current' it will increase 1 for every request to the
ashx
| page until the application pool is recycled. When the call to
| context.Respons e.Close() is removed no web log entry is written, but the
| counter 'ASP.NET\Reques ts Current' does not increase with each request .
| According to
|
<http://www.improve.dk/blog/2008/03/2...lose-will-kill
-your-application>
| this combination of calls causes the connections to stick in the
send-data
| state. It would seem in all this there is a bug in the TransmitFile
method.
| Can you confirm this behavior?
|
| How can I get the request to write entries in the web log AND not
increase
| the counter 'ASP.NET\Reques ts Current'?
|
| Thanks.
| "AOTX San Antonio" wrote:
|
| Hi,
| >
| Thanks for your reply.
| >
| After some testing, I found that the culprit was lack of a call
| context.Respons e.Close(). In my post there was a call to
| context.Respons e.Close(), but in the code I was testing with it was
missing
| for some reason.
| >
| I am not sure why it is necessary to call context.Respons e.Close()
after a
| call to context.Respons e.TransmitFile( ), but without it, a log entry is
not
| written. When the call to context.Respons e.TransmitFile( ) is removed,
the
| call to context.Respons e.Close() is not necessary to write a IIS log
entry --
| one will be written either way.
| >
| Thanks again.
| "Allen Chen [MSFT]" wrote:
| >
| Hi,
|
| I cannot reproduce this problem on a Windows 2003 R2 machine with IIS
6
| installed. From your description it's caused by the execution of the
code
| after the user has been authenticated. So I tried this:
|
| Public Class MyHandler
| Implements IHttpHandler
| Public Sub ProcessRequest( ByVal context As HttpContext)
| Dim response As HttpResponse = context.Respons e
| Dim strFileName As String = context.Request .QueryString("f ile")
| If String.IsNullOr Empty(strFileNa me) = False Then
| strFileName = context.Server. MapPath(strFile Name)
| Dim fi As FileInfo = New System.IO.FileI nfo(strFileName )
| context.Respons e.Clear()
|
| context.Respons e.StatusCode = 200
| context.Respons e.ContentType = "applicatio n/zip"
| context.Respons e.AddHeader("Co ntent-Disposition", "attachment ;
| filename=" & strFileName)
| context.Respons e.AddHeader("Co ntent-Length",
fi.Length.ToStr ing())
|
|
| context.Respons e.SuppressConte nt = False
| context.Respons e.Buffer = False
| context.Respons e.BufferOutput = False
|
| context.Respons e.TransmitFile( strFileName,0,-1)
|
| context.Respons e.Flush()
| context.Respons e.Close()
|
| End If
| End Sub
| Public ReadOnly Property IsReusable() As Boolean
| Get
| Return False
| End Get
| End Property
| End Class
|
| Basically I used the code in the logic path after the user is
| authenticated, including calling TransmitFile method, which as you
said, is
| the culprit.
|
| However, the log appears as normal when I request something like
| http://localhost/.../1.ashx?file=1.zip and the file is successfully
| downloaded.
|
| Because I cannot reproduce it I have the following suggestions:
|
| 1. Please create a new project and use above code to test. Request
the ashx
| via IE on the server machine using localhost. Thus we can make sure
our
| repro steps are same. Can you see the log in this way? If you can see
the
| log you can add other code blocks one by one until finding the
culprit.
|
| 2. Please note in IIS 6 the log will not be flushed to the disk
| immediately. Considering the performance the log will be buffered and
| flushed to disk every 60 seconds by default. Please wait several
minutes to
| make sure that the log has not been added.
|
| 3. If you still cannot see the log using my code please tell me the
| operating system you'd using and I'll try to reproduce it again in
the same
| environment.
|
| Actually, as far as I know, IIS will log all the requests unless a
| component in IIS has crashed, which happens uncommonly. I am looking
| forward to your test result.
|
| Regards,
| Allen Chen
| Microsoft Online Support
|
|

Sep 8 '08 #8

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

Similar topics

0
1281
by: Jason Chan | last post by:
I wanna to create ashx file to generate image on the fly. In VS Add New Item dialog, I cannot find the ashx template. So what I do is create a text file and rename it to .ashx However I cannot debug and use intellisense in developing the file. How you guy do in writing ashx?
1
2370
by: Lloyd Dupont | last post by:
I'm using a newsgroup/blog/mailing list/forums all in one provider. After some negociation they would let me display the web interface of my newsgroup with a special template. This special tempalet could be provided as a dynamic XML file. I'm thinking of using a ".ashx" to generate it, is it a good choice? Anyway .ashx begine with a 'context.Response.ContentType = "my xml mime type"' so.. whatis the XML mimetype?
10
2520
by: JJ | last post by:
How can I get a SiteMapNodeCollection to output as an XML file?
0
1511
by: bill | last post by:
Hi All, I have built an application that allows a user to download a file from the server. I would like to come up with a solution that works with all html standard compliant browsers in addition to IE6 and IE7. I would like to avoid leaving an empty open popup window on the screen, and even though I have a captive user audience that can be required to disable popup blockers and set security settings to trusted sites, I would like to...
2
2352
by: sck10 | last post by:
Hello, I have a java applet that builds a graph using an xml file. I can create the xml with the ashx file, however, the applet doesn't recognize the extension. What I am doing now is streaming the data to text file, which I don't prefer since I am creating files on the server. Is there a way to generate the ashx file using an xml extension or something of this nature? Any suggestions would be appreciated. Thanks, sck10
0
1113
by: =?Utf-8?B?QU9UWCBTYW4gQW50b25pbw==?= | last post by:
Hi, I have been using the code (some of it has been removed for simplicity) below to allow authenticated (using ASP.NET membership database) users to get a file from their archive area. It seems to work fine, however I noticed that no web log entry is added when a successful download occurs (normally a 200 HTTP status code, however, if there is an authorization failure, it gets logged). I have a logging routine that logs a successful...
1
2087
by: mrpetegroups | last post by:
Hi - Problem: The file below has become zero length \winnt\assembly\GAC_MSIL\system.deployment\2.0.0.0_b03f5f7f11d50a3a \system.deployment.dll Details follow ... I've been programming computers for a long, long time, but VB/.NET/ etc. is not my specialty.
0
2375
by: =?Utf-8?B?Um9nZXIgTWFydGlu?= | last post by:
I have a web site under .NET 2.0 that renders videos using the Silverlight media player. The <asp:MediaPlayercontrol only works on .NET 3.5, but I managed to get things working under .NET 2.0 by working with the javascript rather than the server control. The web page looks like this: <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="video5.aspx.cs" Inherits="GalleryServerPro.Web.video5" %>
3
689
by: =?Utf-8?B?Um9nZXIgTWFydGlu?= | last post by:
Note: My apologies for repeating this post from last week, but my nospam alias and profile account were incorrect. I think I have fixed this, so hopefully this post will trigger MS into a response per their MSDN policy. -------------------- I have a web site under .NET 2.0 that renders videos using the Silverlight media player. The web page looks like this: <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="video2.aspx.cs"
0
9602
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10071
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9882
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8905
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6690
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5326
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3987
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3589
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2832
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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

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