Click here to Skip to main content
15,889,728 members
Home / Discussions / C#
   

C#

 
AnswerRe: Export to Excel in not working Pin
moon_stick17-Jun-09 1:28
moon_stick17-Jun-09 1:28 
QuestionAny UI Control like gmail's "to:" textbox? [modified] Pin
Quake2Player16-Jun-09 19:15
Quake2Player16-Jun-09 19:15 
AnswerRe: Any UI Control like gmail's "to:" textbox? Pin
Isaac Gordon16-Jun-09 20:07
Isaac Gordon16-Jun-09 20:07 
QuestionWebcam QR barcode decoder problem [modified] Pin
S K Y16-Jun-09 19:01
S K Y16-Jun-09 19:01 
QuestionHow to hook Adobe reader document using c#? Pin
svt gdwl16-Jun-09 18:33
svt gdwl16-Jun-09 18:33 
QuestionPutting a line of numbers (from a text file) into an array Pin
70superbee16-Jun-09 15:05
70superbee16-Jun-09 15:05 
AnswerRe: Putting a line of numbers (from a text file) into an array Pin
Not Active16-Jun-09 15:56
mentorNot Active16-Jun-09 15:56 
Question"Out of memory exception when loading image with bitmap Pin
Casper Hansen16-Jun-09 10:11
Casper Hansen16-Jun-09 10:11 
Hello all

I have a mysql table with some rows in it that contain a path to a jpg file.

Here is a example of the path:
images/portfolio/lille_ilveaWebshop.jpg

The file excists on the webhost so that is not a problem.

I am loading the jpg file into a bitmap in a foreach.

It works fine when I am on a local server, but when I upload it to my webhost it says:
<quote>Server Error in '/' Application.
Out of memory.

Exception Details: System.OutOfMemoryException: Out of memory.

[OutOfMemoryException: Out of memory.]
System.Drawing.Bitmap..ctor(String filename) +376480
Referencer.Page_Load(Object sender, EventArgs e) +561
System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35
System.Web.UI.Control.OnLoad(EventArgs e) +99
System.Web.UI.Control.LoadRecursive() +50
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627</quote>

I cant seem to figure out just why it would do that.

Here is the code I am using:
foreach (
DataRow Row in objPortFac.VisReference(refKatID).Rows)
{
// Create a new bitmap with the path from the row
// fldStortBillede is the field that contains the path
Bitmap objStortBillede = new Bitmap(Server.MapPath(Row["fldStortBillede"].ToString()));

// Dispose the bitmap after use
objStortBillede.Dispose();
}

Any suggestions?
AnswerRe: "Out of memory exception when loading image with bitmap Pin
Luc Pattyn16-Jun-09 11:20
sitebuilderLuc Pattyn16-Jun-09 11:20 
GeneralRe: "Out of memory exception when loading image with bitmap Pin
Casper Hansen17-Jun-09 9:13
Casper Hansen17-Jun-09 9:13 
GeneralRe: "Out of memory exception when loading image with bitmap Pin
Luc Pattyn17-Jun-09 9:33
sitebuilderLuc Pattyn17-Jun-09 9:33 
GeneralRe: "Out of memory exception when loading image with bitmap Pin
Casper Hansen19-Jun-09 3:54
Casper Hansen19-Jun-09 3:54 
GeneralRe: "Out of memory exception when loading image with bitmap Pin
Luc Pattyn19-Jun-09 4:18
sitebuilderLuc Pattyn19-Jun-09 4:18 
GeneralRe: "Out of memory exception when loading image with bitmap Pin
Revathij25-Jun-09 22:28
Revathij25-Jun-09 22:28 
GeneralRe: "Out of memory exception when loading image with bitmap Pin
Luc Pattyn25-Jun-09 23:39
sitebuilderLuc Pattyn25-Jun-09 23:39 
QuestionGetting all the nodes in a treeview Pin
Quake2Player16-Jun-09 7:16
Quake2Player16-Jun-09 7:16 
AnswerRe: Getting all the nodes in a treeview Pin
Dave Kreskowiak16-Jun-09 8:16
mveDave Kreskowiak16-Jun-09 8:16 
AnswerRe: Getting all the nodes in a treeview Pin
Eslam Afifi16-Jun-09 8:26
Eslam Afifi16-Jun-09 8:26 
AnswerRe: Getting all the nodes in a treeview Pin
I Believe In GOD16-Jun-09 11:07
I Believe In GOD16-Jun-09 11:07 
GeneralRe: Getting all the nodes in a treeview Pin
Quake2Player16-Jun-09 11:23
Quake2Player16-Jun-09 11:23 
GeneralRe: Getting all the nodes in a treeview Pin
Dave Kreskowiak16-Jun-09 12:06
mveDave Kreskowiak16-Jun-09 12:06 
QuestionDynamically applying font values to the label control from the database. Pin
praveenkumar_vittaboina16-Jun-09 6:26
praveenkumar_vittaboina16-Jun-09 6:26 
AnswerRe: Dynamically applying font values to the label control from the database. Pin
Henry Minute16-Jun-09 6:31
Henry Minute16-Jun-09 6:31 
Question[Message Deleted] Pin
mypicturefaded16-Jun-09 6:00
mypicturefaded16-Jun-09 6:00 
QuestionHow to Interop 2D char in c# Pin
platso_58816-Jun-09 4:42
platso_58816-Jun-09 4:42 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.