I have a utility to upload files to my web site. I actually have two chunks of code I'm testing with, one which calls WebClient.UploadFile and the other which uses one of the WebRequest approaches to upload the file bytes. We utilize WebClient and NetworkCredential, so the System.Net namespace is required. Then, we just supply credentials. Recently, I was working on a solution which required a scheduled download of a hosted file. There are a few samples. The file is downloaded asynchronously using thread resources that are automatically allocated from the thread pool. To receive notification when the file is available, add an event handler to the DownloadFileCompleted event. With a smaller file (say, 50k'ish) either approach works just fine. With a somewhat larger file (say, 400k'ish) I'll get timeout errors. I'm unlikely to be uploading anything larger than half a Meg. The WebRequest code is very similar to stuff you've all seen; open the fileStream and read/write 4k chunks to the requestStream. If I set a breakpoint inside the read/write loop, I see it consistently makes it to just over 20%. Then the next write attempt 'hangs' for a while, and then I'll get a timeout exception. UploadFile doesn't give any progress events, but seems to take about as long to throw the exception. What might I be doing wrong? I've tried setting WebRequest.Timeout to an extremely high number, but it just takes that much longer to throw the exception. So I don't think it's *really* as simple as a timeout. The ASP.NET or ASP page time out could have been set to a very lower value. This is different from the client side time out. To really understand this we need to know. 1) THE ASP/ASP.NET page time out. Typically is 90 seconds for ASP.NET but that could have been changed. 2) There is a max upload size setting for ASP.NEt. The default is 4M. Please verify that the current max upload size value 2) It is easy to install a network monitor on the client machine. Just install ethereal and get the network trace or use Microsoft network monitor. I suspect that the ASP/ASP.NET timeout is set to a low value. I'll have to ask my host whether he has anything set at the machine.config level (I assume that's where it'd be) related to timeout and max upload size. I know the web.config has no such settings (it's pretty much default). Short of logging a Support request with the host, is there an easy way for me to determine what those settings are from inside an ASP.NET app (I have some simple logging code implemented already). I've played with ethereal once or twice. I'll poke at it again tomorrow. Pokemon Black - Special Palace Edition 1 By Mb Hacks (Red Hack) ROM Download for Gameboy Color. Pokemon Black Special Palace Edition 1 Red Hack Cheats For Clash This is the second boss in this hack of pokemon red.This boss is way to overpowered and is impossible to beat in the beginning. Pokemon black special palace edition gba cheats. Play Pokemon Black Special Palace Edition 1 Red Hack Cheats Video Game Roms Online! Pokemon Black Special Palace Edition 1 Red Hack Cheats Games can be Played in Your. The best place to get cheats, codes, cheat codes, walkthrough, guide, FAQ, unlockables, tricks, and secrets for Pokemon Black for Nintendo DS. I'm guessing from your responses so far that what I'm seeing isn't 'expected' behavior, which in itself is a good sign. It implies there's hope of a solution.:-) Brad. ![]() Just so you don't think I've given up, I'm awaiting a response from my domain host on the timeout/max size settings and my attempts to get a decent network trace have been hampered by my ISP deciding to have a hardware problem which makes all my results unreliable. Hopefully I'll be back to you soon. What I *have* noticed is that every once in a while the upload goes through. Either the upload just blasts up immediately or 'stalls' partway through and then stays stalled until the eventual timeout. I'm beginning to suspect funkiness on the server side, which will likely be outside my control to fix. I'll get back to you soon; Brad.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |