Discussion:
[請教]圖片上傳至SERVER並生成縮略圖的問題
(时间太久无法回复)
tony
2006-04-13 15:34:02 UTC
Permalink
œÐ±Ð€@€U,šÏ¥Î€U­±ªºµ{Š¡€W¶ÇšÃ¥ÍŠšÁY²€¹Ï.Šý·|²£¥Í¥H€U¿ù»~:
The process cannot access the file 'D:\WEB\img\37.jpg' because it is being
used by another process.
Šý³Ì«áCHECKµo²{¹Ï€ù€wžg€W¶ÇŠš¥\,¥ÍŠšÁY¹Ï€]Šš¥\...©_©Ç
µ{Š¡:
Protected Sub FormView1_ItemUpdating(ByVal sender As Object, ByVal e As
System.Web.UI.WebControls.FormViewUpdateEventArgs) Handles
FormView1.ItemUpdating
Dim FileUpload1 As FileUpload = FormView1.FindControl("FileUpload1")
Dim Image, Anewimage As System.Drawing.Image
Dim width, height, newwidth, newheight As Integer
Dim callb As System.Drawing.Image.GetThumbnailImageAbort

If FileUpload1.HasFile Then
Dim id As String = e.Keys("Pro_id").ToString 'šú±o°O¿ýID
Dim fileName As String = id & ".jpg"

FileUpload1.SaveAs(Server.MapPath("../img/") & fileName) '€W¶Ç
'e.NewValues("pic") = fileName
Image = System.Drawing.Image.FromFile(Server.MapPath("../img/")
& fileName)

width = image.Width
height = image.Height
If width > height Then
newwidth = 110
newheight = image.Height / image.Width * newwidth
Else
newheight = 110
newwidth = Image.Width / Image.Height * newheight
End If

Anewimage = Image.GetThumbnailImage(newwidth, newheight, callb,
New System.IntPtr())
Anewimage.Save(Server.MapPath("../img_s/") & fileName)

End If
End Sub

·P·Å!!!
璉璉
2006-04-14 01:59:10 UTC
Permalink
žÕµÛŠb€U­±Šìžm¥[€JÄÀ©ñ FileUpload1 Å܌Ƶ{Š¡œX¡C
©ó news:ulqLI%24wXGHA.1204%40TK2MSFTNGP04.phx.gbl µoªí
The process cannot access the file 'D:\WEB\img\37.jpg' because it is being
used by another process.
Šý³Ì«áCHECKµo²{¹Ï€ù€wžg€W¶ÇŠš¥\,¥ÍŠšÁY¹Ï€]Šš¥\...©_©Ç
FileUpload1.SaveAs(Server.MapPath("../img/") & fileName) '€W¶Ç
'e.NewValues("pic") = fileName
FileUpload1.Dispose()
Image = System.Drawing.Image.FromFile(Server.MapPath("../img/")
& fileName)
--
€ô®ü¬ì§Þšt²Î¬ãµoÅçÃÒ€u§@«Ç ASP.NET Web News Reader 0.2.0 UTF-8 Beta
·s»Džs²Õ RSSºô»xµo¥¬ŽúžÕ€€ http://tlcheng.no-ip.com/News/rss2.aspx
ºô¯žŠa¹Ï http://tlcheng.no-ip.com/wwwmap.htm
¬y°ìšŸ¬x/°Ï°ì€ôžê·œ/®}ª@ºô/ªŽºÀ¹Ï/»y­µ³q°T €å³¹»Pµ{Š¡
Basic/Fortran/Windows API/.Net/»²§U»¡©úÀÉ ­ì©lœX¡B€å³¹»P°Qœ×
--
ASPNET News http://tlcheng.no-ip.com/News/ | http://tlcheng.twbbs.org/News/
RSS 2.0 http://tlcheng.no-ip.com/News/rss2.aspx?Action=List&Newsgroup=microsoft.public.tw.dotnet.framework.aspnet
tony
2006-04-14 13:03:39 UTC
Permalink
ÁÂÁÂ!
ŠýÁÙ¬O·|¥X¿ù...¿ùŠb²Ä18Šæ....
The process cannot access the file 'D:\WEB\img\37.jpg' because it is being
used by another process.
Line 16: Dim fileName As String = id & ".jpg"
Line 17:
Line 18: FileUpload1.SaveAs(Server.MapPath("../img/") &
fileName) '€W¶Ç
Line 19: 'e.NewValues("pic") = fileName
Line 20: FileUpload1.Dispose()
Post by 璉璉
žÕµÛŠb€U­±Šìžm¥[€JÄÀ©ñ FileUpload1 Å܌Ƶ{Š¡œX¡C
©ó news:ulqLI%24wXGHA.1204%40TK2MSFTNGP04.phx.gbl µoªí
The process cannot access the file 'D:\WEB\img\37.jpg' because it is being
used by another process.
Šý³Ì«áCHECKµo²{¹Ï€ù€wžg€W¶ÇŠš¥\,¥ÍŠšÁY¹Ï€]Šš¥\...©_©Ç
FileUpload1.SaveAs(Server.MapPath("../img/") & fileName) '€W
¶Ç
Post by 璉璉
'e.NewValues("pic") = fileName
FileUpload1.Dispose()
Image =
System.Drawing.Image.FromFile(Server.MapPath("../img/")
Post by 璉璉
& fileName)
--
·s»Džs²Õ RSSºô»xµo¥¬ŽúžÕ€€ http://tlcheng.no-ip.com/News/rss2.aspx
ºô¯žŠa¹Ï http://tlcheng.no-ip.com/wwwmap.htm
Basic/Fortran/Windows API/.Net/»²§U»¡©úÀÉ ­ì©lœX¡B€å³¹»P°Qœ×
--
ASPNET News http://tlcheng.no-ip.com/News/ |
http://tlcheng.twbbs.org/News/
Post by 璉璉
RSS 2.0
http://tlcheng.no-ip.com/News/rss2.aspx?Action=List&Newsgroup=microsoft.publ
ic.tw.dotnet.framework.aspnet
璉璉
2006-04-14 17:00:47 UTC
Permalink
§AŠpªG¿ùŠb³oŠæ¡AœÐ¥ÎÀÉ®×Á`ºÞ§â D:\WEB\img ¥Ø¿ý¥[€JŒg€J±ÂÅv

Win2k/XP œÐ±ÂÅvµ¹ ASPNET ±b€á
Win2003 œÐ±ÂÅvµ¹ Network Service žs²Õ

ŸÞ§@€èªk¥i°ÑŠÒ€U­±ºô§}šBÆJ 9¡G
http://www.comc.ncku.edu.tw/sods/Help/system/install.htm
©ó news:ujZ8vP8XGHA.3724%40TK2MSFTNGP02.phx.gbl µoªí
ÁÂÁÂ!
ŠýÁÙ¬O·|¥X¿ù...¿ùŠb²Ä18Šæ....
The process cannot access the file 'D:\WEB\img\37.jpg' because it is being
used by another process.
Line 16: Dim fileName As String = id & ".jpg"
Line 18: FileUpload1.SaveAs(Server.MapPath("../img/") &
fileName) '€W¶Ç
Line 19: 'e.NewValues("pic") = fileName
Line 20: FileUpload1.Dispose()
Post by 璉璉
žÕµÛŠb€U­±Šìžm¥[€JÄÀ©ñ FileUpload1 Å܌Ƶ{Š¡œX¡C
©ó news:ulqLI%24wXGHA.1204%40TK2MSFTNGP04.phx.gbl µoªí
The process cannot access the file 'D:\WEB\img\37.jpg' because it is
being
Post by 璉璉
used by another process.
Šý³Ì«áCHECKµo²{¹Ï€ù€wžg€W¶ÇŠš¥\,¥ÍŠšÁY¹Ï€]Šš¥\...©_©Ç
FileUpload1.SaveAs(Server.MapPath("../img/") & fileName) '€W
¶Ç
Post by 璉璉
'e.NewValues("pic") = fileName
FileUpload1.Dispose()
Image =
System.Drawing.Image.FromFile(Server.MapPath("../img/")
Post by 璉璉
& fileName)
--
€ô®ü¬ì§Þšt²Î¬ãµoÅçÃÒ€u§@«Ç ASP.NET Web News Reader 0.2.0 UTF-8 Beta
·s»Džs²Õ RSSºô»xµo¥¬ŽúžÕ€€ http://tlcheng.no-ip.com/News/rss2.aspx
ºô¯žŠa¹Ï http://tlcheng.no-ip.com/wwwmap.htm
¬y°ìšŸ¬x/°Ï°ì€ôžê·œ/®}ª@ºô/ªŽºÀ¹Ï/»y­µ³q°T €å³¹»Pµ{Š¡
Basic/Fortran/Windows API/.Net/»²§U»¡©úÀÉ ­ì©lœX¡B€å³¹»P°Qœ×
--
ASPNET News http://tlcheng.no-ip.com/News/ | http://tlcheng.twbbs.org/News/
RSS 2.0 http://tlcheng.no-ip.com/News/rss2.aspx?Action=List&Newsgroup=microsoft.public.tw.dotnet.framework.aspnet
tony
2006-04-15 02:00:39 UTC
Permalink
±zŠn!

€§«e¥Œ¥[€JSystem.Draw(¹Ï€ùœs¿èŒÒ²Õ),¥uŠ³FILEUPLOADªº®É­Ô,¬OOKªº..ŠÓ¥B..
²{ŠbÁöµM·|¥X¿ù,Šý¹Ï€ùšä¹ê€wžgUPLOAD§¹Šš,ÁY¹Ï€]€wžg¥ÍŠšOK..¥u¬O·|¥X¿ùŠÓ€w....
ÁÂÁÂ!
Post by 璉璉
§AŠpªG¿ùŠb³oŠæ¡AœÐ¥ÎÀÉ®×Á`ºÞ§â D:\WEB\img ¥Ø¿ý¥[€JŒg€J±ÂÅv
Win2k/XP œÐ±ÂÅvµ¹ ASPNET ±b€á
Win2003 œÐ±ÂÅvµ¹ Network Service žs²Õ
http://www.comc.ncku.edu.tw/sods/Help/system/install.htm
©ó news:ujZ8vP8XGHA.3724%40TK2MSFTNGP02.phx.gbl µoªí
ÁÂÁÂ!
ŠýÁÙ¬O·|¥X¿ù...¿ùŠb²Ä18Šæ....
The process cannot access the file 'D:\WEB\img\37.jpg' because it is being
used by another process.
Line 16: Dim fileName As String = id & ".jpg"
Line 18: FileUpload1.SaveAs(Server.MapPath("../img/") &
fileName) '€W¶Ç
Line 19: 'e.NewValues("pic") = fileName
Line 20: FileUpload1.Dispose()
Post by 璉璉
žÕµÛŠb€U­±Šìžm¥[€JÄÀ©ñ FileUpload1 Å܌Ƶ{Š¡œX¡C
©ó news:ulqLI%24wXGHA.1204%40TK2MSFTNGP04.phx.gbl µoªí
The process cannot access the file 'D:\WEB\img\37.jpg' because it is
being
Post by 璉璉
used by another process.
Šý³Ì«áCHECKµo²{¹Ï€ù€wžg€W¶ÇŠš¥\,¥ÍŠšÁY¹Ï€]Šš¥\...©_©Ç
FileUpload1.SaveAs(Server.MapPath("../img/") & fileName) '€W
¶Ç
Post by 璉璉
'e.NewValues("pic") = fileName
FileUpload1.Dispose()
Image =
System.Drawing.Image.FromFile(Server.MapPath("../img/")
Post by 璉璉
& fileName)
--
·s»Džs²Õ RSSºô»xµo¥¬ŽúžÕ€€ http://tlcheng.no-ip.com/News/rss2.aspx
ºô¯žŠa¹Ï http://tlcheng.no-ip.com/wwwmap.htm
Basic/Fortran/Windows API/.Net/»²§U»¡©úÀÉ ­ì©lœX¡B€å³¹»P°Qœ×
--
ASPNET News http://tlcheng.no-ip.com/News/ |
http://tlcheng.twbbs.org/News/
Post by 璉璉
RSS 2.0
http://tlcheng.no-ip.com/News/rss2.aspx?Action=List&Newsgroup=microsoft.publ
ic.tw.dotnet.framework.aspnet
璉璉
2006-04-15 03:30:38 UTC
Permalink
§Aªº·N«ä¬O¡H

¥Ø¿ý±ÂÅv¬O€@©w­nªº¡A€£œT©w§A°µ€FšS¡C

ŠÜ©óÁY¹Ï³¡€À¡A¬Ý§A«çŒË¥Žºâ¡AŠ]¬°§Ú³B²z¹ÏÀɮɡA¥D­n¥Î png ¡A©Ò¥H§Ú¬O¥Î vml ÁY¹Ï¡AÀH®É¥i§ïÅÜÅã¥Ü€j€p¡Apng ²£¥ÍªºÁY¹Ï€£š£±oÀÉ®×·|ÅÜ€p¡A©Ò¥H€£ªœ±µšÏ¥ÎÁY¹Ï¡C

§Úªº§@ªkŠ]¬°­n°tŠXªþ¹Ï¡A©Ò¥H§Ú§â¥Š©ñšì MSN Spaces €W¥h¡G
http://spaces.msn.com/tlcheng/blog/cns!145419920BFD55A7!744.entry
©ó news:%23tt%246BDYGHA.3848%40TK2MSFTNGP05.phx.gbl µoªí
±zŠn!
€§«e¥Œ¥[€JSystem.Draw(¹Ï€ùœs¿èŒÒ²Õ),¥uŠ³FILEUPLOADªº®É­Ô,¬OOKªº..ŠÓ¥B..
²{ŠbÁöµM·|¥X¿ù,Šý¹Ï€ùšä¹ê€wžgUPLOAD§¹Šš,ÁY¹Ï€]€wžg¥ÍŠšOK..¥u¬O·|¥X¿ùŠÓ€w....
ÁÂÁÂ!
Post by 璉璉
§AŠpªG¿ùŠb³oŠæ¡AœÐ¥ÎÀÉ®×Á`ºÞ§â D:\WEB\img ¥Ø¿ý¥[€JŒg€J±ÂÅv
Win2k/XP œÐ±ÂÅvµ¹ ASPNET ±b€á
Win2003 œÐ±ÂÅvµ¹ Network Service žs²Õ
http://www.comc.ncku.edu.tw/sods/Help/system/install.htm
©ó news:ujZ8vP8XGHA.3724%40TK2MSFTNGP02.phx.gbl µoªí
ÁÂÁÂ!
ŠýÁÙ¬O·|¥X¿ù...¿ùŠb²Ä18Šæ....
The process cannot access the file 'D:\WEB\img\37.jpg' because it is
being
Post by 璉璉
used by another process.
Line 16: Dim fileName As String = id & ".jpg"
Line 18: FileUpload1.SaveAs(Server.MapPath("../img/") &
fileName) '€W¶Ç
Line 19: 'e.NewValues("pic") = fileName
Line 20: FileUpload1.Dispose()
Post by 璉璉
žÕµÛŠb€U­±Šìžm¥[€JÄÀ©ñ FileUpload1 Å܌Ƶ{Š¡œX¡C
©ó news:ulqLI%24wXGHA.1204%40TK2MSFTNGP04.phx.gbl µoªí
The process cannot access the file 'D:\WEB\img\37.jpg' because it is
being
Post by 璉璉
used by another process.
Šý³Ì«áCHECKµo²{¹Ï€ù€wžg€W¶ÇŠš¥\,¥ÍŠšÁY¹Ï€]Šš¥\...©_©Ç
FileUpload1.SaveAs(Server.MapPath("../img/") & fileName)
'€W
Post by 璉璉
¶Ç
Post by 璉璉
'e.NewValues("pic") = fileName
FileUpload1.Dispose()
Image =
System.Drawing.Image.FromFile(Server.MapPath("../img/")
Post by 璉璉
& fileName)
--
€ô®ü¬ì§Þšt²Î¬ãµoÅçÃÒ€u§@«Ç ASP.NET Web News Reader 0.2.0 UTF-8 Beta
·s»Džs²Õ RSSºô»xµo¥¬ŽúžÕ€€ http://tlcheng.no-ip.com/News/rss2.aspx
ºô¯žŠa¹Ï http://tlcheng.no-ip.com/wwwmap.htm
¬y°ìšŸ¬x/°Ï°ì€ôžê·œ/®}ª@ºô/ªŽºÀ¹Ï/»y­µ³q°T €å³¹»Pµ{Š¡
Basic/Fortran/Windows API/.Net/»²§U»¡©úÀÉ ­ì©lœX¡B€å³¹»P°Qœ×
--
ASPNET News http://tlcheng.no-ip.com/News/ | http://tlcheng.twbbs.org/News/
RSS 2.0 http://tlcheng.no-ip.com/News/rss2.aspx?Action=List&Newsgroup=microsoft.public.tw.dotnet.framework.aspnet
tony
2006-04-15 05:58:35 UTC
Permalink
±zŠn!

1.§Úªº³o­ÓSUBŠ³šâ­Ó¥\¯à:
€@.€W¶Ç¹Ï€ùŠÜIMG¥Ø¿ý
€G.ÁY€pšÃ¥tŠsÁY¹ÏŠÜIMG_S¥Ø¿ý
2.µ{Š¡œX:
Protected Sub FormView1_ItemUpdating(ByVal sender As Object, ByVal e As
System.Web.UI.WebControls.FormViewUpdateEventArgs) Handles
FormView1.ItemUpdating
Dim FileUpload1 As FileUpload = FormView1.FindControl("FileUpload1")
Dim Image, Anewimage As System.Drawing.Image
Dim width, height, newwidth, newheight As Integer
Dim callb As System.Drawing.Image.GetThumbnailImageAbort

If FileUpload1.HasFile Then
Dim id As String = e.Keys("Pro_id").ToString 'šú±o°O¿ýID
Dim fileName As String = id & ".jpg"

FileUpload1.SaveAs(Server.MapPath("../img/") & fileName) '€W¶Ç
'e.NewValues("pic") = fileName
Image = System.Drawing.Image.FromFile(Server.MapPath("../img/")
& fileName)

width = image.Width
height = image.Height
If width > height Then
newwidth = 110
newheight = image.Height / image.Width * newwidth
Else
newheight = 110
newwidth = Image.Width / Image.Height * newheight
End If

Anewimage = Image.GetThumbnailImage(newwidth, newheight, callb,
New System.IntPtr())
Anewimage.Save(Server.MapPath("../img_s/") & fileName)

End If
End Sub
€T.¥X¿ù°T®§:
The process cannot access the file 'D:\WEB\img\37.jpg' because it is being
used by another process.
Line 16: Dim fileName As String = id & ".jpg"
Line 17:
Line 18: FileUpload1.SaveAs(Server.MapPath("../img/") &
fileName) '€W¶Ç
Line 19: 'e.NewValues("pic") = fileName
Line 20: FileUpload1.Dispose()
¥|.µ{Š¡¹BŠæµ²ªG:
¹Ï€ù€W¶ÇŠÜIMG¥Ø¿ý-Šš¥\
¹Ï€ùÁY€pšÃ«OŠsŠÜIMG_S¥Ø¿ý-Šš¥\
€­.°ÝÃDÂI:
µ{Š¡ªº¹BŠæµ²ªGOK,Šý¬°€°»ò·|Š³¥X¿ù°T®§?
€».¥Ø«ežÑšM€èŠ¡:
Šbµ{Š¡€€¥[€JOn Error Resume Next«áŽN€£·|Š³¿ù»~°T®§,¥B¹BŠæµ²ªG¥¿±`
.(šä¹êÁÙ¬OŠ³°ÝÃD.Šý€£ªŸ¹D°ÝÃD¥XŠb­þ)
璉璉
2006-04-15 06:33:00 UTC
Permalink
§A·sªºšºÃä§âŠ^€å¬å€F¡A©Ò¥H§Ú€Þ¥Î³oœgšÓžÉ¥R¡G

The process cannot access the file 'D:\WEB\img\37.jpg' because it is being used by another process.
Line 18: FileUpload1.SaveAs(Server.MapPath("../img/") & fileName) '€W¶Ç

¿ù»~°T®§¬O»¡µ{§ÇµLªkŠsšú³o­ÓÀɮסAŠ]¬°³Qšä¥Lµ{§ÇšÏ¥Î¡C

ŠpªG§A¥¿Šb¥Îšä¥L¬Ý¹Ïµ{Š¡¬Ý³o±i¹Ï¡AœÐÃö±Œ¡A«hÂêŠí¹ÏÀɪº¬Ošä¥L¬Ý¹Ïµ{Š¡¡C
©Î¬O§AÅý IE ±q³o­ÓŠìžm€W¶Ç³o±i¹Ï¡AœÐœÆ»sšìšä¥LŠìžm«á¡A¥Ñšä¥LŠìžm€W¶Ç¡A«hÂêŠí¹ÏÀɪº¬O IE¡C
©Î¬O§A¥Î¥þ°ìª«¥ó (Session / Shared / goboal.asax µ¥) ¶}¹L³o±i¹Ï®É¡A«hÂêŠí¹ÏÀɪº¬O aspnet_wp.exe ©Î w3wp.exe

žÔ²Óª¬ªp€ÀªR­n¬Ý§A€W¶Ç«eŠpŠóŠsšú³o±i¹ÏÀÉ¡C
©ó news:000101c6603c%24f7060930%240a03a8c0%40tlcheng µoªí
§Aªº·N«ä¬O¡H
ŠÜ©óÁY¹Ï³¡€À¡A¬Ý§A«çŒË¥Žºâ¡AŠ]¬°§Ú³B²z¹ÏÀɮɡA¥D­n¥Î png ¡A©Ò¥H§Ú¬O¥Î vml ÁY¹Ï¡AÀH®É¥i§ïÅÜÅã¥Ü€j€p¡Apng ²£¥ÍªºÁY¹Ï€£š£±oÀÉ®×·|ÅÜ€p¡A©Ò¥H€£ªœ±µšÏ¥ÎÁY¹Ï¡C
http://spaces.msn.com/tlcheng/blog/cns!145419920BFD55A7!744.entry
©ó news:%23tt%246BDYGHA.3848%40TK2MSFTNGP05.phx.gbl µoªí
±zŠn!
€§«e¥Œ¥[€JSystem.Draw(¹Ï€ùœs¿èŒÒ²Õ),¥uŠ³FILEUPLOADªº®É­Ô,¬OOKªº..ŠÓ¥B..
²{ŠbÁöµM·|¥X¿ù,Šý¹Ï€ùšä¹ê€wžgUPLOAD§¹Šš,ÁY¹Ï€]€wžg¥ÍŠšOK..¥u¬O·|¥X¿ùŠÓ€w....
ÁÂÁÂ!
Post by 璉璉
§AŠpªG¿ùŠb³oŠæ¡AœÐ¥ÎÀÉ®×Á`ºÞ§â D:\WEB\img ¥Ø¿ý¥[€JŒg€J±ÂÅv
Win2k/XP œÐ±ÂÅvµ¹ ASPNET ±b€á
Win2003 œÐ±ÂÅvµ¹ Network Service žs²Õ
http://www.comc.ncku.edu.tw/sods/Help/system/install.htm
©ó news:ujZ8vP8XGHA.3724%40TK2MSFTNGP02.phx.gbl µoªí
ÁÂÁÂ!
ŠýÁÙ¬O·|¥X¿ù...¿ùŠb²Ä18Šæ....
The process cannot access the file 'D:\WEB\img\37.jpg' because it is
being
Post by 璉璉
used by another process.
Line 16: Dim fileName As String = id & ".jpg"
Line 18: FileUpload1.SaveAs(Server.MapPath("../img/") &
fileName) '€W¶Ç
Line 19: 'e.NewValues("pic") = fileName
Line 20: FileUpload1.Dispose()
Post by 璉璉
žÕµÛŠb€U­±Šìžm¥[€JÄÀ©ñ FileUpload1 Å܌Ƶ{Š¡œX¡C
©ó news:ulqLI%24wXGHA.1204%40TK2MSFTNGP04.phx.gbl µoªí
The process cannot access the file 'D:\WEB\img\37.jpg' because it is
being
Post by 璉璉
used by another process.
Šý³Ì«áCHECKµo²{¹Ï€ù€wžg€W¶ÇŠš¥\,¥ÍŠšÁY¹Ï€]Šš¥\...©_©Ç
FileUpload1.SaveAs(Server.MapPath("../img/") & fileName)
'€W
Post by 璉璉
¶Ç
Post by 璉璉
'e.NewValues("pic") = fileName
FileUpload1.Dispose()
Image =
System.Drawing.Image.FromFile(Server.MapPath("../img/")
Post by 璉璉
& fileName)
--
€ô®ü¬ì§Þšt²Î¬ãµoÅçÃÒ€u§@«Ç ASP.NET Web News Reader 0.2.0 UTF-8 Beta
·s»Džs²Õ RSSºô»xµo¥¬ŽúžÕ€€ http://tlcheng.no-ip.com/News/rss2.aspx
ºô¯žŠa¹Ï http://tlcheng.no-ip.com/wwwmap.htm
¬y°ìšŸ¬x/°Ï°ì€ôžê·œ/®}ª@ºô/ªŽºÀ¹Ï/»y­µ³q°T €å³¹»Pµ{Š¡
Basic/Fortran/Windows API/.Net/»²§U»¡©úÀÉ ­ì©lœX¡B€å³¹»P°Qœ×
--
ASPNET News http://tlcheng.no-ip.com/News/ | http://tlcheng.twbbs.org/News/
RSS 2.0 http://tlcheng.no-ip.com/News/rss2.aspx?Action=List&Newsgroup=microsoft.public.tw.dotnet.framework.aspnet
tony
2006-04-15 07:19:58 UTC
Permalink
ÁÂÁÂ!€W­Ó°ÝÃD€wžgžÑšM..­ìŠ]¬O..§ÚŠb€W¶ÇŠb­¶­±Š³¥Ž¶}Š¹¹Ï..
²{€SŠ³§O€@­Ó°ÝÃD,Š³§ì¹L€å€F...€£¹LšS§äšì....œÐÀ°Š£€@€U.ÁÂÁÂ!

A generic error occurred in GDI+.
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.

Exception Details: System.Runtime.InteropServices.ExternalException: A
generic error occurred in GDI+.

Source Error:

Line 34:
Line 35: Anewimage = Image.GetThumbnailImage(newwidth,
newheight, callb, New System.IntPtr())
Line 36: Anewimage.Save(Server.MapPath("../img_s/") & fileName)
Line 37:
Line 38: End If
Post by 璉璉
§A·sªºšºÃä§âŠ^€å¬å€F¡A©Ò¥H§Ú€Þ¥Î³oœgšÓžÉ¥R¡G
The process cannot access the file 'D:\WEB\img\37.jpg' because it is being
used by another process.
Post by 璉璉
Line 18: FileUpload1.SaveAs(Server.MapPath("../img/") & fileName) '€W¶Ç
¿ù»~°T®§¬O»¡µ{§ÇµLªkŠsšú³o­ÓÀɮסAŠ]¬°³Qšä¥Lµ{§ÇšÏ¥Î¡C
ŠpªG§A¥¿Šb¥Îšä¥L¬Ý¹Ïµ{Š¡¬Ý³o±i¹Ï¡AœÐÃö±Œ¡A«hÂêŠí¹ÏÀɪº¬Ošä¥L¬Ý¹Ïµ{Š¡¡C
©Î¬O§AÅý IE ±q³o­ÓŠìžm€W¶Ç³o±i¹Ï¡AœÐœÆ»sšìšä¥LŠìžm«á¡A¥Ñšä¥LŠìžm€W¶Ç¡A«hÂê
Ší¹ÏÀɪº¬O IE¡C
Post by 璉璉
©Î¬O§A¥Î¥þ°ìª«¥ó (Session / Shared / goboal.asax µ¥) ¶}¹L³o±i¹Ï®É¡A«hÂêŠí
¹ÏÀɪº¬O aspnet_wp.exe ©Î w3wp.exe
Post by 璉璉
žÔ²Óª¬ªp€ÀªR­n¬Ý§A€W¶Ç«eŠpŠóŠsšú³o±i¹ÏÀÉ¡C
©ó news:000101c6603c%24f7060930%240a03a8c0%40tlcheng µoªí
§Aªº·N«ä¬O¡H
ŠÜ©óÁY¹Ï³¡€À¡A¬Ý§A«çŒË¥Žºâ¡AŠ]¬°§Ú³B²z¹ÏÀɮɡA¥D­n¥Î png ¡A©Ò¥H§Ú¬O¥Î
vml ÁY¹Ï¡AÀH®É¥i§ïÅÜÅã¥Ü€j€p¡Apng ²£¥ÍªºÁY¹Ï€£š£±oÀÉ®×·|ÅÜ€p¡A©Ò¥H€£ªœ±µšÏ¥Î
ÁY¹Ï¡C
Post by 璉璉
http://spaces.msn.com/tlcheng/blog/cns!145419920BFD55A7!744.entry
©ó news:%23tt%246BDYGHA.3848%40TK2MSFTNGP05.phx.gbl µoªí
±zŠn!
€§«e¥Œ¥[€JSystem.Draw(¹Ï€ùœs¿èŒÒ²Õ),¥uŠ³FILEUPLOADªº®É­Ô,¬OOKªº..
ŠÓ¥B..
Post by 璉璉
²{ŠbÁöµM·|¥X¿ù,Šý¹Ï€ùšä¹ê€wžgUPLOAD§¹Šš,ÁY¹Ï€]€wžg¥ÍŠšOK..¥u¬O·|¥X¿ùŠÓ
€w....
Post by 璉璉
ÁÂÁÂ!
Post by 璉璉
§AŠpªG¿ùŠb³oŠæ¡AœÐ¥ÎÀÉ®×Á`ºÞ§â D:\WEB\img ¥Ø¿ý¥[€JŒg€J±ÂÅv
Win2k/XP œÐ±ÂÅvµ¹ ASPNET ±b€á
Win2003 œÐ±ÂÅvµ¹ Network Service žs²Õ
http://www.comc.ncku.edu.tw/sods/Help/system/install.htm
©ó news:ujZ8vP8XGHA.3724%40TK2MSFTNGP02.phx.gbl µoªí
ÁÂÁÂ!
ŠýÁÙ¬O·|¥X¿ù...¿ùŠb²Ä18Šæ....
The process cannot access the file 'D:\WEB\img\37.jpg' because it is
being
Post by 璉璉
used by another process.
Line 16: Dim fileName As String = id & ".jpg"
Line 18: FileUpload1.SaveAs(Server.MapPath("../img/") &
fileName) '€W¶Ç
Line 19: 'e.NewValues("pic") = fileName
Line 20: FileUpload1.Dispose()
Post by 璉璉
žÕµÛŠb€U­±Šìžm¥[€JÄÀ©ñ FileUpload1 Å܌Ƶ{Š¡œX¡C
©ó news:ulqLI%24wXGHA.1204%40TK2MSFTNGP04.phx.gbl µoªí
The process cannot access the file 'D:\WEB\img\37.jpg' because it is
being
Post by 璉璉
used by another process.
Šý³Ì«áCHECKµo²{¹Ï€ù€wžg€W¶ÇŠš¥\,¥ÍŠšÁY¹Ï€]Šš¥\...©_©Ç
FileUpload1.SaveAs(Server.MapPath("../img/") & fileName)
'€W
Post by 璉璉
¶Ç
Post by 璉璉
'e.NewValues("pic") = fileName
FileUpload1.Dispose()
Image =
System.Drawing.Image.FromFile(Server.MapPath("../img/")
Post by 璉璉
& fileName)
--
·s»Džs²Õ RSSºô»xµo¥¬ŽúžÕ€€ http://tlcheng.no-ip.com/News/rss2.aspx
ºô¯žŠa¹Ï http://tlcheng.no-ip.com/wwwmap.htm
Basic/Fortran/Windows API/.Net/»²§U»¡©úÀÉ ­ì©lœX¡B€å³¹»P°Qœ×
--
ASPNET News http://tlcheng.no-ip.com/News/ |
http://tlcheng.twbbs.org/News/
Post by 璉璉
RSS 2.0
http://tlcheng.no-ip.com/News/rss2.aspx?Action=List&Newsgroup=microsoft.publ
ic.tw.dotnet.framework.aspnet
tony
2006-04-15 07:32:18 UTC
Permalink
¹ï€£°_...€W­±ªº°ÝÃD¬OŠ]¬°§ÚªºsourceÀɮ׳]ŠšŠP€@Àɮ׳yŠš..€wžgžÑšM.€£Šn·N«ä
....

ÁÂÁ±zªºÀ°§U..

Loading...