Click here to Skip to main content
15,904,155 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: Folder Permissions Pin
Sathesh Sakthivel14-May-07 16:49
Sathesh Sakthivel14-May-07 16:49 
GeneralRe: Folder Permissions Pin
Rose Rose14-May-07 16:57
Rose Rose14-May-07 16:57 
GeneralRe: Folder Permissions Pin
Sathesh Sakthivel14-May-07 18:00
Sathesh Sakthivel14-May-07 18:00 
QuestionHow to create a custom deployment project? Pin
tcombs0714-May-07 15:38
tcombs0714-May-07 15:38 
AnswerRe: How to create a custom deployment project? Pin
Dave Kreskowiak14-May-07 16:40
mveDave Kreskowiak14-May-07 16:40 
QuestionHow can I get the Microsoft SDK 5.1 Speech Engine to read the current line of text the cursor is on? Pin
josh047614-May-07 14:30
josh047614-May-07 14:30 
AnswerRe: How can I get the Microsoft SDK 5.1 Speech Engine to read the current line of text the cursor is on? Pin
Dave Kreskowiak14-May-07 16:38
mveDave Kreskowiak14-May-07 16:38 
QuestionArray to Datagrid back to array Pin
GregRH14-May-07 10:18
GregRH14-May-07 10:18 
AnswerRe: Array to Datagrid back to array Pin
Dave Kreskowiak15-May-07 3:35
mveDave Kreskowiak15-May-07 3:35 
GeneralRe: Array to Datagrid back to array Pin
GregRH15-May-07 4:28
GregRH15-May-07 4:28 
QuestionNeed help with my service please!!! Pin
tcombs0714-May-07 9:40
tcombs0714-May-07 9:40 
AnswerRe: Need help with my service please!!! Pin
Paul Conrad14-May-07 9:45
professionalPaul Conrad14-May-07 9:45 
AnswerRe: Need help with my service please!!! Pin
SimulationofSai14-May-07 9:52
SimulationofSai14-May-07 9:52 
AnswerRe: Need help with my service please!!! Pin
Dave Kreskowiak14-May-07 9:59
mveDave Kreskowiak14-May-07 9:59 
You'd have to completely redesign this. All of your code was written on the assuption that the request would work and only the occasional error would happen.

Turn it around and design the service so that it assumes that every request to the site will FAIL. For instance, this:
Dim response As HttpWebResponse = CType(request.GetResponse(), HttpWebResponse)
'Close the response request
response.Close()

always assumes that the response returns an object that you can close. Don't call close on an object that you don't know exists. Test for an object first, THEN call close on it if it's legitimate:
Dim response As ...
If response Is Nothing Then
    ' The request obviously failed...
Else
    response.Close()
End If





A guide to posting questions on CodeProject[^]

Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic
     2006, 2007


QuestionSelectedIndexChanged click item listbox database Pin
keninfo14-May-07 9:34
keninfo14-May-07 9:34 
AnswerJust a friendly reminder... Pin
Dave Kreskowiak14-May-07 9:01
mveDave Kreskowiak14-May-07 9:01 
JokeRe: Just a friendly reminder... Pin
Paul Conrad14-May-07 9:14
professionalPaul Conrad14-May-07 9:14 
GeneralRe: Just a friendly reminder... Pin
Dave Kreskowiak14-May-07 9:47
mveDave Kreskowiak14-May-07 9:47 
GeneralRe: Just a friendly reminder... Pin
Paul Conrad14-May-07 9:53
professionalPaul Conrad14-May-07 9:53 
QuestionHow to filter data readed from code bar reader to datagrid Pin
Mr. Wonderful14-May-07 8:14
Mr. Wonderful14-May-07 8:14 
AnswerRe: How to filter data readed from code bar reader to datagrid Pin
Dave Kreskowiak14-May-07 8:50
mveDave Kreskowiak14-May-07 8:50 
GeneralRe: How to filter data readed from code bar reader to datagrid Pin
Mr. Wonderful15-May-07 7:09
Mr. Wonderful15-May-07 7:09 
QuestionHow to see CPU use (%) Pin
Zaegra14-May-07 8:12
Zaegra14-May-07 8:12 
AnswerRe: How to see CPU use (%) Pin
MatrixCoder14-May-07 8:23
MatrixCoder14-May-07 8:23 
GeneralRe: How to see CPU use (%) [modified] Pin
Dave Kreskowiak14-May-07 8:40
mveDave Kreskowiak14-May-07 8:40 

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.