Click here to Skip to main content
15,879,474 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
AnswerRe: Faster file access Pin
PIEBALDconsult11-Oct-11 2:58
mvePIEBALDconsult11-Oct-11 2:58 
GeneralRe: Faster file access Pin
Mehdi Gholam11-Oct-11 3:06
Mehdi Gholam11-Oct-11 3:06 
GeneralRe: Faster file access Pin
Dave Kreskowiak11-Oct-11 3:30
mveDave Kreskowiak11-Oct-11 3:30 
AnswerRe: Faster file access Pin
Luc Pattyn11-Oct-11 3:39
sitebuilderLuc Pattyn11-Oct-11 3:39 
GeneralRe: Faster file access Pin
Mehdi Gholam11-Oct-11 3:43
Mehdi Gholam11-Oct-11 3:43 
GeneralRe: Faster file access Pin
Luc Pattyn11-Oct-11 4:45
sitebuilderLuc Pattyn11-Oct-11 4:45 
GeneralRe: Faster file access Pin
Mehdi Gholam11-Oct-11 5:15
Mehdi Gholam11-Oct-11 5:15 
QuestionChecking validity of a URL Pin
PIEBALDconsult10-Oct-11 16:35
mvePIEBALDconsult10-Oct-11 16:35 
At work I've been tasked with checking the validity of some URLs that are stored in the database. Some of the files they are supposed to point to have since been deleted and some have disallowed characters -- ampersand (&) and tilde (~) in particular.

Last week I quickly whipped up a method that uses a WebRequest and GetResponse which works just fine. But because it has to download the content of the file before it returns, it takes rather longer than necessary to simply know that the URL is good and the file exists. Today I was experimenting with using BeginGetResponse and Abort in an effort to Abort the download once I know that the file exists, but it seems unreliable (and klugey).

Does anyone here have a better way to determine whether or not a URL points to an existing fie without downloading the file?
AnswerRe: Checking validity of a URL Pin
Mehdi Gholam10-Oct-11 19:21
Mehdi Gholam10-Oct-11 19:21 
GeneralRe: Checking validity of a URL Pin
PIEBALDconsult11-Oct-11 2:40
mvePIEBALDconsult11-Oct-11 2:40 
GeneralRe: Checking validity of a URL Pin
AspDotNetDev10-Oct-11 20:12
protectorAspDotNetDev10-Oct-11 20:12 
AnswerRe: Checking validity of a URL Pin
Pete O'Hanlon11-Oct-11 3:10
mvePete O'Hanlon11-Oct-11 3:10 
GeneralRe: Checking validity of a URL Pin
Mehdi Gholam11-Oct-11 3:50
Mehdi Gholam11-Oct-11 3:50 
GeneralRe: Checking validity of a URL Pin
PIEBALDconsult11-Oct-11 4:31
mvePIEBALDconsult11-Oct-11 4:31 
QuestionRead from excel file and download Pin
Member 76985969-Oct-11 22:07
Member 76985969-Oct-11 22:07 
AnswerRe: Read from excel file and download Pin
Dave Kreskowiak10-Oct-11 1:21
mveDave Kreskowiak10-Oct-11 1:21 
GeneralRe: Read from excel file and download Pin
Member 769859611-Oct-11 18:21
Member 769859611-Oct-11 18:21 
QuestionCssSpriteGenerator - help with configuration Pin
IdanShechter5-Oct-11 0:34
IdanShechter5-Oct-11 0:34 
AnswerRe: CssSpriteGenerator - help with configuration Pin
Richard MacCutchan10-Oct-11 4:20
mveRichard MacCutchan10-Oct-11 4:20 
QuestionObscure .net Part 1 : Threads Pin
Mehdi Gholam3-Oct-11 21:06
Mehdi Gholam3-Oct-11 21:06 
AnswerRe: Obscure .net Part 1 : Threads PinPopular
Pete O'Hanlon4-Oct-11 3:57
mvePete O'Hanlon4-Oct-11 3:57 
GeneralRe: Obscure .net Part 1 : Threads Pin
Mehdi Gholam4-Oct-11 4:36
Mehdi Gholam4-Oct-11 4:36 
GeneralRe: Obscure .net Part 1 : Threads Pin
Pete O'Hanlon4-Oct-11 4:45
mvePete O'Hanlon4-Oct-11 4:45 
GeneralRe: Obscure .net Part 1 : Threads Pin
Mehdi Gholam4-Oct-11 4:52
Mehdi Gholam4-Oct-11 4:52 
AnswerRe: Obscure .net Part 1 : Threads Pin
Luc Pattyn4-Oct-11 5:06
sitebuilderLuc Pattyn4-Oct-11 5:06 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.