G
grimBeast
Hi
I have a problem with the uploading of files larger than 1MB.
My upload code look like this:
If Not fUpload.PostedFile Is Nothing And
fUpload.PostedFile.ContentLength > 0 Then
fn = Path.GetFileName(fUpload.PostedFile.FileName)
SaveLocation = Server.MapPath("hjplusupload") + "\" + fn
Try
fUpload.PostedFile.SaveAs(SaveLocation)
lblMessages.Text = "The file has been uploaded to: " &
SaveLocation
Catch ex As Exception
lblMessages.Text = "Error: " + ex.Message
End Try
Else
lblMessages.Text = "Please enter a file to upload."
End If
And I have added the following to my web.config:
<httpRuntime executionTimeout="3600" maxRequestLength="10000" />
However when I try to upload files above 1MB the server just returns a
standard IIS "Cannot Find Server - page cannot be displayed" error -
no error from .NET.
I have tried adjusting the maxRequestLength - but nothing seems to
work.
The server is a Win2K.
I have a problem with the uploading of files larger than 1MB.
My upload code look like this:
If Not fUpload.PostedFile Is Nothing And
fUpload.PostedFile.ContentLength > 0 Then
fn = Path.GetFileName(fUpload.PostedFile.FileName)
SaveLocation = Server.MapPath("hjplusupload") + "\" + fn
Try
fUpload.PostedFile.SaveAs(SaveLocation)
lblMessages.Text = "The file has been uploaded to: " &
SaveLocation
Catch ex As Exception
lblMessages.Text = "Error: " + ex.Message
End Try
Else
lblMessages.Text = "Please enter a file to upload."
End If
And I have added the following to my web.config:
<httpRuntime executionTimeout="3600" maxRequestLength="10000" />
However when I try to upload files above 1MB the server just returns a
standard IIS "Cannot Find Server - page cannot be displayed" error -
no error from .NET.
I have tried adjusting the maxRequestLength - but nothing seems to
work.
The server is a Win2K.