Click here to Skip to main content
15,922,584 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
when I am trying to upload some of video or audio file.

OnClick on the upload button its redirect me to "This webpage is not available"

C#
OnClick function :
Label1.Text = FileUpload1.FileName;


anyone know why and how to solve it
Posted
Updated 26-Feb-15 19:38pm
v2
Comments
FinickyCoder 27-Feb-15 1:40am    
do you wish to redirect to some other page after uploading that file or want to stay on current page??

1 solution

This issue comes when you try to upload large File.
Refer - ASP.NET Web Page Not Available[^].
Quote:
My friend helped me figure it out. It was because ASP.NET only allowed uploads of 4MB sizes. I had to go into the web.config or the machine.config file and change the value of MaxRequestLength to be larger than 4096. This solved it.
So, you need to define the max size in Web Config.
 
Share this answer
 
Comments
ENG.Samy Sammour 27-Feb-15 3:28am    
Thx its worked
Awesome. Most welcome. :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900