When i want to open or save the download file using the dialogue box, sometimes prompt out error message say Server anavailable and pls view the event log. <BR>Is that the event log located at event viewer in administrator tools? <BR>The error in the event log is <BR>aspnet_wp.exe (PID: 2104) stopped unexpectedly <BR>Sometimes, the PID is different. <BR>But sometimes, my code functions well.Can anyone give me some advice how to fix this problem.My code is as below.<BR><BR>************************************ *********************** <BR>Dim fileTarget As String = Server.MapPath("Upload/") <BR><BR>fileTarget &= obj("FileName") &#039;obj is sqldatareader <BR>Dim Capability As FileInfo = New FileInfo(fileTarget) <BR>If File.Exists(Capability.ToString) Then <BR>Response.Clear() <BR>Response.AppendHeader("Content-Disposition", "attachment; filename=" + Capability.Name) <BR>Response.ContentType = getContentType(Capability.Extension) <BR>Response.WriteFile(Capability.FullName) <BR>Response.End() <BR><BR>&#039; function to return content type <BR>Function getContentType(ByVal extension As String) As String <BR>Dim regKey As RegistryKey = Registry.ClassesRoot.OpenSubKey(extension) <BR> Try <BR> Return regKey.GetValue("Content Type", "application/octet-stream").ToString() <BR> Catch ex As Exception <BR> Return "application/octet-stream" <BR> End Try <BR>End Function <BR><BR><BR>************************************** *********************** <BR><BR>One more question: Can anyone tell me the difference between <BR>a)Dim fileTarget As String = Server.MapPath("Upload/") <BR>b)Dim fileTarget As String = Server.MapPath("Upload\")<BR> <BR>