Results 1 to 3 of 3

Thread: upload

  1. #1
    Join Date
    Dec 1969

    Default upload

    i am in process in getting asp upload to work and get this error. has anyone seen this before?<BR><BR>There is no MTS object context <BR>Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. <BR><BR>Exception Details: System.Runtime.InteropServices.COMException: There is no MTS object context <BR><BR>Source Error: <BR><BR><BR>Line 44: <BR>Line 45: Upload = Server.CreateObject("Persits.Upload.1") <BR>Line 46: Upload.SaveVirtual("/upload/")<BR>Line 47: <BR><BR> <BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: upload

    errr... surely this is in the wrong group? it&#039;s a &#039;normal&#039; ASP question (or perhaps one for the components forum)

  3. #3
    Join Date
    Dec 1969

    Default It's built into ASP.NET

    It looks like you are trying to use a 3rd-party ASP upload component with ASP.NET. Stop. ASP.NET has built-in components and it&#039;s EASY to get going, you can do it with just few lines of code! And don&#039;t forget to set your form to enctype="multipart/form-data" ...a newbie mistake.<BR><BR>Dim postedFile = fiPhotoUpload.PostedFile<BR>Dim filename As String = strPhotoFile<BR>Dim contentType As String = postedFile.ContentType<BR>Dim contentLength As Integer = postedFile.ContentLength<BR><BR>postedFile.SaveAs( savePath & strPhotoFile)<BR>message.Text = postedFile.Filename & " UPLOADED<BR>" & _<BR>"<BR>content type: " & contentType & _<BR>"<BR>content length: " & contentLength.ToString()

Posting Permissions

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