|
I am uploading 500 MB File on the webserver but it gives message that your file submitted but it does not actually does not upload. How can I increase the time to execute a statement?
|
|
|
|
|
Hi,
Firstly it's not the execution time that is going wrong. ASP.NET websites deliberately restrict the size of file that can be uploaded, and the amount of time the upload takes (really the execution time). You can see how to set these here http://aspnetupload.com/HowTo.aspx#HandleLargerUploadsAndAvoidTimeouts[^]
Secondly these limits are there for a reason: allowing uploads of large files isn't normally a good idea, especially on a public website. You need to have think about whether this is really necessary: its slow for the user, has the potential to fill your disk-space quickly and can be used as part of a DoS attack. You should sanity check what is happening, for example can the file be put onto the server by other means than the web-interface.
Thirdly (assuming you still have the need) you might want to consider a richer upload control. There is one here[^] reference as part of a discussion on large file uploads elsewhere. I haven't used it, and so can't vouch for it, but I've found others helpful in the past.
|
|
|
|
|
The time is not the problem, theres a config setting you need to change in web.config:
http://msdn.microsoft.com/en-us/library/e1f13641(v=vs.100).aspx[^]
the setting is called <httpRuntime>, you need to change the maxRequestLength to the maximum size you will allow for your request.
I'm brazilian and english (well, human languages in general) aren't my best skill, so, sorry by my english. (if you want we can speak in C# or VB.Net =p)
|
|
|
|
|
Network Error (tcp_error)
A communication error occurred: ""
The Web Server may be down, too busy, or experiencing other problems preventing it from responding to requests. You may wish to try again at a later time.
|
|
|
|
|
Dear Friends,
Anyone knows how to download and delete files from FTP and its possible also that the client is uploading it so let them upload?????
|
|
|
|
|
For download and delete check the System.Net.FtpWebRequest[^]class.
Examples for both are down the page.
--
"My software never has bugs. It just develops random features."
|
|
|
|
|
Use a tool like filezilla for uploading or deleting files in ftp.
|
|
|
|
|
So, i've exausted my sources for search without any success.
I currently have a Web Application that works as a quiz engine (i hope that's the correct translation) in where the administrator can enter Questions and options for answers, including predefined ones (that generate a list of radio buttons or checkboxes), calculated ones (no problem here) and free-text ones.
now, the need arraived for a medical quiz that has one question that requires the user to include a file in the answer.
currently, when the page that displays the quiz form is posted, the controller receives the following structure:
Form
-form fields
- question collection
- Question
-question fields
//i neeed the attachment to go here, on the question object
- options collection
there's any way i can get this? as the structure isn't constant (as in i don't even know what types of options will be sent back, their quantities or even if i need a attachment) I can't receive a IEnumerable<HttpPostedFileBase> on the controller, so i don't see any options here....
EDIT: acidentally posted the question while i was writing it, sorry.
I'm brazilian and english (well, human languages in general) aren't my best skill, so, sorry by my english. (if you want we can speak in C# or VB.Net =p)
|
|
|
|
|
I just found that the reason my files aren't being posted is that i was using JQuery Ajax, that formated the response with the wrong content-type. as of my search, there's no way to do this by ajax.
I'm brazilian and english (well, human languages in general) aren't my best skill, so, sorry by my english. (if you want we can speak in C# or VB.Net =p)
|
|
|
|
|
Hello experts..
How can i implement sign in popup like that exist in codeproject.com
Please suggest me the way to implement that using Jquery or Javascript.I also have to show details from the database.
thanks in advance
|
|
|
|
|
Check here[^] to get started with the in-place "popup" form. It isn't exactly like CP but you can easily modify it to fit your needs.
djj55: Nice but may have a permission problem
Pete O'Hanlon: He has my permission to run it.
|
|
|
|
|
I am having problem in Uploading 500 MB File on web server
can anyone help me
Private Function UploadToFTP(ByVal fileToUpload As HttpPostedFile) As Boolean
Try
Dim uploadUrl As String = "ftp://........................."
Dim uploadFileName As String = fileToUpload.FileName
Dim streamObj As Stream = fileToUpload.InputStream
Dim buffer As [Byte]() = New [Byte](fileToUpload.ContentLength - 1) {}
streamObj.Read(buffer, 0, buffer.Length)
streamObj.Close()
streamObj = Nothing
Dim ftpUrl As String = String.Format("{0}/{1}", uploadUrl, uploadFileName)
Dim requestObj As FtpWebRequest = TryCast(FtpWebRequest.Create(ftpUrl), FtpWebRequest)
requestObj.Method = WebRequestMethods.Ftp.UploadFile
requestObj.Credentials = New NetworkCredential("UserID", "Password")
Dim requestStream As Stream = requestObj.GetRequestStream()
requestStream.Write(buffer, 0, buffer.Length)
requestStream.Flush()
requestStream.Close()
requestObj = Nothing
Return True
Catch ex As Exception
Return False
End Try
End Function
|
|
|
|
|
You're missing a call to GetResponse on the FtpWebRequest instance. The request won't be sent until you call GetResponse .
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
|
silentspeaker wrote: what is it
What is what?
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
I dont know how to add it. Need assistance here
|
|
|
|
|
Something like this:
Private Function UploadToFTP(ByVal fileToUpload As HttpPostedFile) As Boolean
Try
Dim uploadUrl As String = "ftp://........................."
Dim uploadFileName As String = fileToUpload.FileName
Using streamObj As Stream = fileToUpload.InputStream
Dim buffer As [Byte]() = New [Byte](fileToUpload.ContentLength - 1) {}
streamObj.Read(buffer, 0, buffer.Length)
End Using
Dim ftpUrl As String = String.Format("{0}/{1}", uploadUrl, uploadFileName)
Dim requestObj As FtpWebRequest = TryCast(FtpWebRequest.Create(ftpUrl), FtpWebRequest)
requestObj.Method = WebRequestMethods.Ftp.UploadFile
requestObj.Credentials = New NetworkCredential("UserID", "Password")
Using requestStream As Stream = requestObj.GetRequestStream()
requestStream.Write(buffer, 0, buffer.Length)
requestStream.Flush()
End Using
Using responseObj As FtpWebResponse = TryCast(requestObj.GetResponse(), FtpWebResponse)
' TODO: Look at responseObj.StatusCode to see if the upload succeeded
End Using
Return True
Catch ex As Exception
Return False
End Try
End Function
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
HTTP Error 404.13 - Not Found
The request filtering module is configured to deny a request that exceeds the request content length.
|
|
|
|
|
|
You need to tell us what web server your using, IIS6 requires the metabase editor to change one of the values, I think max request length, under IIS/Defaults. So you can change the value in Web.config, but the metabase supersedes the web.config overall.
IIS7 was a e bit easier it doesn't use metabase, there's a config file in IISAdmin folder, in system32, that you just edit. After you edit it, I think it changes a more complex structure in the background.
[Edit]
I messed with the upload limit for years, and tried everything, but the limit is the limit. I'm not sure about FTP, I have changed my servers to 1 gig, which is the limit for Server 2003, but you have to login to do it. I ended up using Uploadify, which works pretty good.
The metabase editor is available in the IIS resource kit, an old download from microsoft.
modified 8-Nov-12 1:39am.
|
|
|
|
|
|
How can i get all IP addresses which connected in LAN using ASP.NET
//
Private Function GetIP4Address() As String
Dim IP4Address As String = [String].Empty
For Each IPA As IPAddress In Dns.GetHostAddresses(Dns.GetHostName())
If IPA.AddressFamily.ToString() = "InterNetwork" Then
IP4Address = IPA.ToString()
Exit For
End If
Next
Return IP4Address
End Function
//
I'm using this function but it returns only my IP address.
Please help me...
Thanks in advance...
|
|
|
|
|
The first thing you ought to learn is: differenciate between code executed on the server and code executed on the client (user site).
You say you are using ASP.NET - just think: where is that code executed?
And another thing you ought to learn: there are many security mechanisms when it comes to code (JavaScript etc.) running in a web browser! Why should anyone want to allow you to find out which other IP addresses are used in his local (private) network? Because he wants to make a virus/worm attack easy for some hacker?
|
|
|
|
|
Thank you sir , but i want to know only that IP address which are connected Client site LAN only.Is it possible?
|
|
|
|
|
Dim ipaddress As String = HttpContext.Current.Request.UserHostAddress by using this we can get client ip address
and
Dim ipaddress As String = HttpContext.Current.Request.UserHostName by using this we can get client host name
|
|
|
|