Wrox Home  
Search P2P Archive for: Go

  Return to Index  

aspx thread: file upload .tiff


Message #1 by "Rob Taylor - tconsult.com" <rob@t...> on Tue, 4 Mar 2003 00:40:38 -0500
Hi

For whatever reason I cannot upload .tif files.  They go through but they do not appear.
All I get is the blank image square.  I have tried a couple now.  Does anyone know why?
Has anyone encountered this.

I am now thinking it may be best to convert these images to a different format.
Can that be done on the fly in .NET?  

Thanks.....Rob

Message #2 by "Rob Taylor - tconsult.com" <rob@t...> on Tue, 4 Mar 2003 01:23:06 -0500
Here is a little more insight to this problem.  I am absolutely baffled.
The site has 2 user groups - normal users and admins.  When logged in
as a normal user everything uploads fine.  When logged in as an admin
the upload is not working with larger files.  There is nothing in here that
states do this or do that if an admin is logged in so I know it is not that.
I also realize I get this error with try catch

System.Threading.ThreadAbortException: Thread was being aborted.
at System.Threading.Thread.AbortInternal()

Is there any way that I am having a thread problem which is interrupting
upload with larger files?  I am redirecting and I have found documentation
that redirection will throw this error.  Is it also affecting upload?

Thanks for any help that may be offered.

Rob



----- Original Message -----
From: "Rob Taylor - tconsult.com" <rob@t...>
To: "ASP.NET" <aspx@p...>
Sent: Tuesday, March 04, 2003 12:40 AM
Subject: [aspx] file upload .tiff


> Hi
>
> For whatever reason I cannot upload .tif files.  They go through but they
do not appear.
> All I get is the blank image square.  I have tried a couple now.  Does
anyone know why?
> Has anyone encountered this.
>
> I am now thinking it may be best to convert these images to a different
format.
> Can that be done on the fly in .NET?
>
> Thanks.....Rob
>
>
>
>


Message #3 by "Rich K" <rich@r...> on Tue, 4 Mar 2003 01:25:31 -0500
Why are u redirecting??



-----Original Message-----
From: Rob Taylor - tconsult.com [mailto:rob@t...]
Sent: Tuesday, March 04, 2003 1:23 AM
To: ASP.NET
Subject: [aspx] Re: file upload .tiff


Here is a little more insight to this problem.  I am absolutely baffled.
The site has 2 user groups - normal users and admins.  When logged in
as a normal user everything uploads fine.  When logged in as an admin
the upload is not working with larger files.  There is nothing in here that
states do this or do that if an admin is logged in so I know it is not that.
I also realize I get this error with try catch

System.Threading.ThreadAbortException: Thread was being aborted.
at System.Threading.Thread.AbortInternal()

Is there any way that I am having a thread problem which is interrupting
upload with larger files?  I am redirecting and I have found documentation
that redirection will throw this error.  Is it also affecting upload?

Thanks for any help that may be offered.

Rob



----- Original Message -----
From: "Rob Taylor - tconsult.com" <rob@t...>
To: "ASP.NET" <aspx@p...>
Sent: Tuesday, March 04, 2003 12:40 AM
Subject: [aspx] file upload .tiff


> Hi
>
> For whatever reason I cannot upload .tif files.  They go through but they
do not appear.
> All I get is the blank image square.  I have tried a couple now.  Does
anyone know why?
> Has anyone encountered this.
>
> I am now thinking it may be best to convert these images to a different
format.
> Can that be done on the fly in .NET?
>
> Thanks.....Rob
>
>
>
>




Message #4 by "Rob Taylor - tconsult.com" <rob@t...> on Tue, 4 Mar 2003 01:36:12 -0500
It looks like this.  I cannot figure it out.  Sometimes it works.  Others
not.

  Dim filename, zf
  filename=file1.postedfile.filename.Trim()
  zf = Path.GetFileName(filename)
  zf = filename
  If zf <> ""
       filename = ("D:\myfiles\mydir\" & session("PageName") & "\pic\" &
filename)
       file1.postedfile.saveas (filename)
       SQL = "Update Tournaments set Logo = '"& zf &"' where TournyID = "&
session("Listing") &""
       DataConn = new SQLConnection(SQLServer)
       dbCommand = New SQLCommand(SQL,DataConn)
       DataConn.open
       dbCommand.executeNonQuery()
       DataConn.close
       response.redirect("/sponpreview.aspx")
  End If


----- Original Message -----
From: "Rich K" <rich@r...>
To: "ASP.NET" <aspx@p...>
Sent: Tuesday, March 04, 2003 1:25 AM
Subject: [aspx] Re: file upload .tiff


>
> Why are u redirecting??
>
>
>
> -----Original Message-----
> From: Rob Taylor - tconsult.com [mailto:rob@t...]
> Sent: Tuesday, March 04, 2003 1:23 AM
> To: ASP.NET
> Subject: [aspx] Re: file upload .tiff
>
>
> Here is a little more insight to this problem.  I am absolutely baffled.
> The site has 2 user groups - normal users and admins.  When logged in
> as a normal user everything uploads fine.  When logged in as an admin
> the upload is not working with larger files.  There is nothing in here
that
> states do this or do that if an admin is logged in so I know it is not
that.
> I also realize I get this error with try catch
>
> System.Threading.ThreadAbortException: Thread was being aborted.
> at System.Threading.Thread.AbortInternal()
>
> Is there any way that I am having a thread problem which is interrupting
> upload with larger files?  I am redirecting and I have found documentation
> that redirection will throw this error.  Is it also affecting upload?
>
> Thanks for any help that may be offered.
>
> Rob
>
>
>
> ----- Original Message -----
> From: "Rob Taylor - tconsult.com" <rob@t...>
> To: "ASP.NET" <aspx@p...>
> Sent: Tuesday, March 04, 2003 12:40 AM
> Subject: [aspx] file upload .tiff
>
>
> > Hi
> >
> > For whatever reason I cannot upload .tif files.  They go through but
they
> do not appear.
> > All I get is the blank image square.  I have tried a couple now.  Does
> anyone know why?
> > Has anyone encountered this.
> >
> > I am now thinking it may be best to convert these images to a different
> format.
> > Can that be done on the fly in .NET?
> >
> > Thanks.....Rob
> >
> >
> >
> >
>
>
>
>
>
>
>


Message #5 by "Rich K" <rich@r...> on Tue, 4 Mar 2003 01:50:56 -0500
I am not sure if this is the problem but it could be.

Is it possible your session variables are expiring and thus the page
location and listing number are being reset to null.
Add a Response.Write for the session variables at the beginning of the page
to elimante this possibility.

With response to using the redirect... I tend not to use them and call a
function that disables all visible controls after a button or form is
submitted. You can make a new link visible after the form or upload is
complete. This is just an idea and can't be used in all cases. I hope this
helps. rich


-----Original Message-----
From: Rob Taylor - tconsult.com [mailto:rob@t...]
Sent: Tuesday, March 04, 2003 1:36 AM
To: ASP.NET
Subject: [aspx] Re: file upload .tiff


It looks like this.  I cannot figure it out.  Sometimes it works.  Others
not.

  Dim filename, zf
  filename=file1.postedfile.filename.Trim()
  zf = Path.GetFileName(filename)
  zf = filename
  If zf <> ""
       filename = ("D:\myfiles\mydir\" & session("PageName") & "\pic\" &
filename)
       file1.postedfile.saveas (filename)
       SQL = "Update Tournaments set Logo = '"& zf &"' where TournyID = "&
session("Listing") &""
       DataConn = new SQLConnection(SQLServer)
       dbCommand = New SQLCommand(SQL,DataConn)
       DataConn.open
       dbCommand.executeNonQuery()
       DataConn.close
       response.redirect("/sponpreview.aspx")
  End If


----- Original Message -----
From: "Rich K" <rich@r...>
To: "ASP.NET" <aspx@p...>
Sent: Tuesday, March 04, 2003 1:25 AM
Subject: [aspx] Re: file upload .tiff


>
> Why are u redirecting??
>
>
>
> -----Original Message-----
> From: Rob Taylor - tconsult.com [mailto:rob@t...]
> Sent: Tuesday, March 04, 2003 1:23 AM
> To: ASP.NET
> Subject: [aspx] Re: file upload .tiff
>
>
> Here is a little more insight to this problem.  I am absolutely baffled.
> The site has 2 user groups - normal users and admins.  When logged in
> as a normal user everything uploads fine.  When logged in as an admin
> the upload is not working with larger files.  There is nothing in here
that
> states do this or do that if an admin is logged in so I know it is not
that.
> I also realize I get this error with try catch
>
> System.Threading.ThreadAbortException: Thread was being aborted.
> at System.Threading.Thread.AbortInternal()
>
> Is there any way that I am having a thread problem which is interrupting
> upload with larger files?  I am redirecting and I have found documentation
> that redirection will throw this error.  Is it also affecting upload?
>
> Thanks for any help that may be offered.
>
> Rob
>
>
>
> ----- Original Message -----
> From: "Rob Taylor - tconsult.com" <rob@t...>
> To: "ASP.NET" <aspx@p...>
> Sent: Tuesday, March 04, 2003 12:40 AM
> Subject: [aspx] file upload .tiff
>
>
> > Hi
> >
> > For whatever reason I cannot upload .tif files.  They go through but
they
> do not appear.
> > All I get is the blank image square.  I have tried a couple now.  Does
> anyone know why?
> > Has anyone encountered this.
> >
> > I am now thinking it may be best to convert these images to a different
> format.
> > Can that be done on the fly in .NET?
> >
> > Thanks.....Rob
> >
> >
> >
> >
>
>
>
>
>
>
>




Message #6 by "Rob Taylor - tconsult.com" <rob@t...> on Tue, 4 Mar 2003 02:02:52 -0500
I think what the problem is is right here in this article
http://www.dotnetbips.com/displayarticle.aspx?id=155

I have never seen this before but I am about convinced this is what
was happening.  I noticed that this problem seems to arise when multiple
people are uploading.  That is when the file never saves.  I need to ensure
that if 2 people are on the same thread that the first task is completed.
I will know tomorrow when I can get some help to test.

Thanks for your insight though.  Good to know someone else is still up :)


Rob


----- Original Message -----
From: "Rich K" <rich@r...>
To: "ASP.NET" <aspx@p...>
Sent: Tuesday, March 04, 2003 1:50 AM
Subject: [aspx] Re: file upload .tiff


> I am not sure if this is the problem but it could be.
>
> Is it possible your session variables are expiring and thus the page
> location and listing number are being reset to null.
> Add a Response.Write for the session variables at the beginning of the
page
> to elimante this possibility.
>
> With response to using the redirect... I tend not to use them and call a
> function that disables all visible controls after a button or form is
> submitted. You can make a new link visible after the form or upload is
> complete. This is just an idea and can't be used in all cases. I hope this
> helps. rich
>
>
> -----Original Message-----
> From: Rob Taylor - tconsult.com [mailto:rob@t...]
> Sent: Tuesday, March 04, 2003 1:36 AM
> To: ASP.NET
> Subject: [aspx] Re: file upload .tiff
>
>
> It looks like this.  I cannot figure it out.  Sometimes it works.  Others
> not.
>
>   Dim filename, zf
>   filename=file1.postedfile.filename.Trim()
>   zf = Path.GetFileName(filename)
>   zf = filename
>   If zf <> ""
>        filename = ("D:\myfiles\mydir\" & session("PageName") & "\pic\" &
> filename)
>        file1.postedfile.saveas (filename)
>        SQL = "Update Tournaments set Logo = '"& zf &"' where TournyID = "&
> session("Listing") &""
>        DataConn = new SQLConnection(SQLServer)
>        dbCommand = New SQLCommand(SQL,DataConn)
>        DataConn.open
>        dbCommand.executeNonQuery()
>        DataConn.close
>        response.redirect("/sponpreview.aspx")
>   End If
>
>
> ----- Original Message -----
> From: "Rich K" <rich@r...>
> To: "ASP.NET" <aspx@p...>
> Sent: Tuesday, March 04, 2003 1:25 AM
> Subject: [aspx] Re: file upload .tiff
>
>
> >
> > Why are u redirecting??
> >
> >
> >
> > -----Original Message-----
> > From: Rob Taylor - tconsult.com [mailto:rob@t...]
> > Sent: Tuesday, March 04, 2003 1:23 AM
> > To: ASP.NET
> > Subject: [aspx] Re: file upload .tiff
> >
> >
> > Here is a little more insight to this problem.  I am absolutely baffled.
> > The site has 2 user groups - normal users and admins.  When logged in
> > as a normal user everything uploads fine.  When logged in as an admin
> > the upload is not working with larger files.  There is nothing in here
> that
> > states do this or do that if an admin is logged in so I know it is not
> that.
> > I also realize I get this error with try catch
> >
> > System.Threading.ThreadAbortException: Thread was being aborted.
> > at System.Threading.Thread.AbortInternal()
> >
> > Is there any way that I am having a thread problem which is interrupting
> > upload with larger files?  I am redirecting and I have found
documentation
> > that redirection will throw this error.  Is it also affecting upload?
> >
> > Thanks for any help that may be offered.
> >
> > Rob
> >
> >
> >
> > ----- Original Message -----
> > From: "Rob Taylor - tconsult.com" <rob@t...>
> > To: "ASP.NET" <aspx@p...>
> > Sent: Tuesday, March 04, 2003 12:40 AM
> > Subject: [aspx] file upload .tiff
> >
> >
> > > Hi
> > >
> > > For whatever reason I cannot upload .tif files.  They go through but
> they
> > do not appear.
> > > All I get is the blank image square.  I have tried a couple now.  Does
> > anyone know why?
> > > Has anyone encountered this.
> > >
> > > I am now thinking it may be best to convert these images to a
different
> > format.
> > > Can that be done on the fly in .NET?
> > >
> > > Thanks.....Rob
> > >
> > >
> > >
> > >
> >
> >
> >
> >
> >
> >
> >
>
>
>
>
>
>


Message #7 by "Rich K" <rich@r...> on Tue, 4 Mar 2003 02:13:35 -0500
No problem. I wish I was more help... but I never had the problem you
explained.
... I hope you figure it out. The threading issue sounds like it could be
the problem....
Maybe.. you can add another session variable that is named uploadstatus and
set it to one when an upload is running and lock everyone else out from
uploading while it is set to true. You can set uploadstatus back to false
after the upload is complete. Good luck

 I need some sleep 14 hour days are to long!!!



-----Original Message-----
From: Rob Taylor - tconsult.com [mailto:rob@t...]
Sent: Tuesday, March 04, 2003 2:03 AM
To: ASP.NET
Subject: [aspx] Re: file upload .tiff


I think what the problem is is right here in this article
http://www.dotnetbips.com/displayarticle.aspx?id=155

I have never seen this before but I am about convinced this is what
was happening.  I noticed that this problem seems to arise when multiple
people are uploading.  That is when the file never saves.  I need to ensure
that if 2 people are on the same thread that the first task is completed.
I will know tomorrow when I can get some help to test.

Thanks for your insight though.  Good to know someone else is still up :)


Rob


----- Original Message -----
From: "Rich K" <rich@r...>
To: "ASP.NET" <aspx@p...>
Sent: Tuesday, March 04, 2003 1:50 AM
Subject: [aspx] Re: file upload .tiff


> I am not sure if this is the problem but it could be.
>
> Is it possible your session variables are expiring and thus the page
> location and listing number are being reset to null.
> Add a Response.Write for the session variables at the beginning of the
page
> to elimante this possibility.
>
> With response to using the redirect... I tend not to use them and call a
> function that disables all visible controls after a button or form is
> submitted. You can make a new link visible after the form or upload is
> complete. This is just an idea and can't be used in all cases. I hope this
> helps. rich
>
>
> -----Original Message-----
> From: Rob Taylor - tconsult.com [mailto:rob@t...]
> Sent: Tuesday, March 04, 2003 1:36 AM
> To: ASP.NET
> Subject: [aspx] Re: file upload .tiff
>
>
> It looks like this.  I cannot figure it out.  Sometimes it works.  Others
> not.
>
>   Dim filename, zf
>   filename=file1.postedfile.filename.Trim()
>   zf = Path.GetFileName(filename)
>   zf = filename
>   If zf <> ""
>        filename = ("D:\myfiles\mydir\" & session("PageName") & "\pic\" &
> filename)
>        file1.postedfile.saveas (filename)
>        SQL = "Update Tournaments set Logo = '"& zf &"' where TournyID = "&
> session("Listing") &""
>        DataConn = new SQLConnection(SQLServer)
>        dbCommand = New SQLCommand(SQL,DataConn)
>        DataConn.open
>        dbCommand.executeNonQuery()
>        DataConn.close
>        response.redirect("/sponpreview.aspx")
>   End If
>
>
> ----- Original Message -----
> From: "Rich K" <rich@r...>
> To: "ASP.NET" <aspx@p...>
> Sent: Tuesday, March 04, 2003 1:25 AM
> Subject: [aspx] Re: file upload .tiff
>
>
> >
> > Why are u redirecting??
> >
> >
> >
> > -----Original Message-----
> > From: Rob Taylor - tconsult.com [mailto:rob@t...]
> > Sent: Tuesday, March 04, 2003 1:23 AM
> > To: ASP.NET
> > Subject: [aspx] Re: file upload .tiff
> >
> >
> > Here is a little more insight to this problem.  I am absolutely baffled.
> > The site has 2 user groups - normal users and admins.  When logged in
> > as a normal user everything uploads fine.  When logged in as an admin
> > the upload is not working with larger files.  There is nothing in here
> that
> > states do this or do that if an admin is logged in so I know it is not
> that.
> > I also realize I get this error with try catch
> >
> > System.Threading.ThreadAbortException: Thread was being aborted.
> > at System.Threading.Thread.AbortInternal()
> >
> > Is there any way that I am having a thread problem which is interrupting
> > upload with larger files?  I am redirecting and I have found
documentation
> > that redirection will throw this error.  Is it also affecting upload?
> >
> > Thanks for any help that may be offered.
> >
> > Rob
> >
> >
> >
> > ----- Original Message -----
> > From: "Rob Taylor - tconsult.com" <rob@t...>
> > To: "ASP.NET" <aspx@p...>
> > Sent: Tuesday, March 04, 2003 12:40 AM
> > Subject: [aspx] file upload .tiff
> >
> >
> > > Hi
> > >
> > > For whatever reason I cannot upload .tif files.  They go through but
> they
> > do not appear.
> > > All I get is the blank image square.  I have tried a couple now.  Does
> > anyone know why?
> > > Has anyone encountered this.
> > >
> > > I am now thinking it may be best to convert these images to a
different
> > format.
> > > Can that be done on the fly in .NET?
> > >
> > > Thanks.....Rob
> > >
> > >
> > >
> > >
> >
> >
> >
> >
> >
> >
> >
>
>
>
>
>
>




Message #8 by "Greg Quinn" <greg@i...> on Tue, 4 Mar 2003 17:19:46 +0200
Rob,

I have had some problems on various occasions when redirecting after certain
server-side code has executed. My best way around this was to Response.Write
some JavaScript, setting the current window.location to another page, eg.

Dim jScriptString as String

     jScriptString3 = "<SCR" + "IPT>"
     jScriptString3 += "this.window.location = 'newpage.aspx';"
     jScriptString3 += "</SCR" + "IPT>"

   Response.Write(jScriptString)

I have used this many a time instead of redirection

Greg

----- Original Message -----
From: "Rob Taylor - tconsult.com" <rob@t...>
To: "ASP.NET" <aspx@p...>
Sent: Tuesday, March 04, 2003 8:36 AM
Subject: [aspx] Re: file upload .tiff


> It looks like this.  I cannot figure it out.  Sometimes it works.  Others
> not.
>
>   Dim filename, zf
>   filename=file1.postedfile.filename.Trim()
>   zf = Path.GetFileName(filename)
>   zf = filename
>   If zf <> ""
>        filename = ("D:\myfiles\mydir\" & session("PageName") & "\pic\" &
> filename)
>        file1.postedfile.saveas (filename)
>        SQL = "Update Tournaments set Logo = '"& zf &"' where TournyID = "&
> session("Listing") &""
>        DataConn = new SQLConnection(SQLServer)
>        dbCommand = New SQLCommand(SQL,DataConn)
>        DataConn.open
>        dbCommand.executeNonQuery()
>        DataConn.close
>        response.redirect("/sponpreview.aspx")
>   End If
>
>
> ----- Original Message -----
> From: "Rich K" <rich@r...>
> To: "ASP.NET" <aspx@p...>
> Sent: Tuesday, March 04, 2003 1:25 AM
> Subject: [aspx] Re: file upload .tiff
>
>
> >
> > Why are u redirecting??
> >
> >
> >
> > -----Original Message-----
> > From: Rob Taylor - tconsult.com [mailto:rob@t...]
> > Sent: Tuesday, March 04, 2003 1:23 AM
> > To: ASP.NET
> > Subject: [aspx] Re: file upload .tiff
> >
> >
> > Here is a little more insight to this problem.  I am absolutely baffled.
> > The site has 2 user groups - normal users and admins.  When logged in
> > as a normal user everything uploads fine.  When logged in as an admin
> > the upload is not working with larger files.  There is nothing in here
> that
> > states do this or do that if an admin is logged in so I know it is not
> that.
> > I also realize I get this error with try catch
> >
> > System.Threading.ThreadAbortException: Thread was being aborted.
> > at System.Threading.Thread.AbortInternal()
> >
> > Is there any way that I am having a thread problem which is interrupting
> > upload with larger files?  I am redirecting and I have found
documentation
> > that redirection will throw this error.  Is it also affecting upload?
> >
> > Thanks for any help that may be offered.
> >
> > Rob
> >
> >
> >
> > ----- Original Message -----
> > From: "Rob Taylor - tconsult.com" <rob@t...>
> > To: "ASP.NET" <aspx@p...>
> > Sent: Tuesday, March 04, 2003 12:40 AM
> > Subject: [aspx] file upload .tiff
> >
> >
> > > Hi
> > >
> > > For whatever reason I cannot upload .tif files.  They go through but
> they
> > do not appear.
> > > All I get is the blank image square.  I have tried a couple now.  Does
> > anyone know why?
> > > Has anyone encountered this.
> > >
> > > I am now thinking it may be best to convert these images to a
different
> > format.
> > > Can that be done on the fly in .NET?
> > >
> > > Thanks.....Rob
> > >
> > >
> > >
> > >
> >
> >
> >
> >
> >
> >
> >
>
>
>


  Return to Index