Web server unavailable

Results 1 to 2 of 2

Thread: Web server unavailable

  1. #1
    Join Date
    Dec 1969

    Default Web server unavailable

    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>I have been try it in another server.Sometimes function well and sometimes say web server unavailable. <BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: Web server unavailable

    you&#039;ve been asking this question over and over for ages now, haven&#039;t you?<BR><BR>can I ask why in the world you&#039;re accessing the registry?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts