Avatar of Dein
Dein

asked on 

'Parameter is not valid' error when creating new Bitmap in webservice

When creating a new bitmap (new Bitmap(1600,1600)) in a .net webservice I get error: 'Parameter not valid'. Code is running fine when testing locally in VS2008, but when running on a server, it dosn't work. Sometimes I get an 'Out of memory' error in same statement, although theres 4 GB available...?
I have been digging a little into this and found this statement at the MSDN documentation for System.Drawing namespace: 'Classes within the System.Drawing namespace are not supported for use within a Windows or ASP.NET service. Attempting to use these classes from within one of these application types may produce unexpected problems, such as diminished service performance and run-time exceptions.'

If this is a fact, how will I then be able to create and draw bitmaps from a .net webservice?
.NET ProgrammingC#

Avatar of undefined
Last Comment
Dein
Avatar of Axarydax
Axarydax
Flag of Slovakia image

Well, you're still able to use third-party graphics libraries, like GD (with GD-sharp wrapper) or I'd look into WPF.
Avatar of Dein
Dein

ASKER

Hmm, that was not the anwer I was hoping for    :-(
ASKER CERTIFIED SOLUTION
Avatar of Dein
Dein

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
.NET Programming
.NET Programming

The .NET Framework is not specific to any one programming language; rather, it includes a library of functions that allows developers to rapidly build applications. Several supported languages include C#, VB.NET, C++ or ASP.NET.

137K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo