ASP.NET "DllNotFoundException: gdiplus.dll"

thunderwolf1989

New Member
Messages
10
Reaction score
0
Points
1
Anyone have any idea what this is and how to fix?

Server Error in '/' Application
gdiplus.dll

Description: HTTP 500. Error processing request.

Stack Trace:

System.DllNotFoundException: gdiplus.dll
at (wrapper managed-to-native) System.Drawing.GDIPlus:GdiplusStartup (ulong&,System.Drawing.GdiplusStartupInput&,System.Drawing.GdiplusStartupOutput&)
at System.Drawing.GDIPlus..cctor () [0x00000]
 
Last edited:

merrillmck

New Member
Messages
134
Reaction score
0
Points
0
Anyone have any idea what this is and how to fix?

No. Are you getting that on your website or building locally with Visual Studio? If locally, are you running as Admin or a Standard User? While not the same error, I've seen similar errors running Visual Studio w/o Admin rights.
 

thunderwolf1989

New Member
Messages
10
Reaction score
0
Points
1
No. I made it with Visual studio and tested it (it worked). Then I uploaded it to my website here and got this error...
 

Livewire

Abuse Compliance Officer
Staff member
Messages
18,169
Reaction score
216
Points
63
The issue itself is fairly easy to diagnose - x10hosting runs on a linux server, and whatever application you're writing requires gdiplus.dll, which I believe is a windows dll.

The gdiplus.dll library is required for windows to operate. It is used by windows when communicating with your video card in order to disaply graphics on screen. If gdiplus.dll is unavailable, windows will not function correctly.
Source: http://www.auditmypc.com/process/gdiplus.asp

No idea how to fix it, but that's what the issue is. You're relying on something that linux doesn't have, so it fails.


My main question would be whether you're actually using ASP.net, or if you're using just plain asp - ASP won't work on x10, ASP.Net should, assuming it's not relying on windows-only dll's and the like.
 

merrillmck

New Member
Messages
134
Reaction score
0
Points
0
Did you FTP files? Maybe consider using Visual Studio's publish command which will move all the required files onto X10's file system.

And since you're using Visual Studio, I would imagine it is ASP.NET as I don't think Visual Studio explicitly supports ASP in recent versions.
 

Hue Kares

New Member
Messages
38
Reaction score
6
Points
0
I haven't had this problem, but I remember seeing similar posts. Here's a one from an Admin, who says it's an issue with cPanel not yet supporting the drawing library.

Someone else suggests finding and copying the .dll to your website, and change the references in your project to point to it. Messy... I don't know if it would work either, as I've never tried. Good luck.
 

garrettroyce

Community Support
Community Support
Messages
5,609
Reaction score
251
Points
63
I haven't had this problem, but I remember seeing similar posts. Here's a one from an Admin, who says it's an issue with cPanel not yet supporting the drawing library.

Someone else suggests finding and copying the .dll to your website, and change the references in your project to point to it. Messy... I don't know if it would work either, as I've never tried. Good luck.

I think this has a very good change of working. I don't know if it's legal or not to use Windows' DLL files in this way. I also don't know if the staff will allow it. I don't think they will mind, but I wouldn't rush into something before asking.
 

Pi606

New Member
Messages
85
Reaction score
0
Points
0
I had this problem, too, awhile ago. If I remember right, it had to do with the standard asp.net form validation controls (eg. RequiredFieldValidator). x10 has limited support for some controls. Removing these controls *might* fix your problem.
 

thunderwolf1989

New Member
Messages
10
Reaction score
0
Points
1
Someone else suggests finding and copying the .dll to your website, and change the references in your project to point to it. Messy... I don't know if it would work either, as I've never tried. Good luck.

hm... have any idea on how to change the references like that?
At least I have something I can try...
 

garrettroyce

Community Support
Community Support
Messages
5,609
Reaction score
251
Points
63
In visual studio, I think it's called "project manager" side panel, if you right-click you can "add reference". Then you have to select the file option and not the built in references.
 

Hue Kares

New Member
Messages
38
Reaction score
6
Points
0
Hi thunderwolf, I'm glad to see you're still persisting!

...I made it with Visual studio and tested it (it worked). Then I uploaded it to my website here and got this error...

Do you understand that you can't just build an asp.net website on Windows, and then expect it to work on Lynux? This isn't a Windows server, it's Apache. And finally, we can't use the .Net Framework, we have to use the Mono project as an alternative. So, in order for you to build your site in asp.net, you need to understand what all this means for you. For example, have you read 'using asp.net on Mono'?

If you want the simple approach, you need to find yourself a Windows Hosting company using Microsoft IIS. You have a Next-to-Nothing chance of finding anyone providing this for free however (there is one that I know of, but you have to sell you soul!) Learning about how to get your project to work in an open source environment is an opportunity for you to expand your knowledge and experience, so I hope you don't let this put you off.

I had this problem, too, awhile ago. If I remember right, it had to do with the standard asp.net form validation controls (eg. RequiredFieldValidator)...

Pi606 has had this issue, and has fixed it - so I believe this is where you should start.

Just like he has, you need to understand what function gdiplus.dll is performing in your project. If you are performing drawing operations, your .net project should be referencing System.Drawing.dll, not gdiplus.dll (which is a C++ redistributable). So; I don't yet understand how are you using it as you've provided nothing for us to work with.

Have you implicitly made a reference to it in your project? I'm assuming you haven't; why would you? So, we could infer that another .dll in your project is referencing it; perhaps System.Drawing.dll is a wrapper for this dll??? :dunno: This means simply copying the .dll to your local folder and adding it to your project, just will not work for you.

Obviously, if you are referencing the .dll directly, then yes, coping it to your local folder, and ensuring you reference that version as garrettroyce said (right-click on the Solution Explorer), should work in theory. Like the man said, I too wonder if this would be allowed by our host... Also, the fact that this is a Windows dll, required by the Windows operating system, would it work on a Linux machine just by copying it? Again, it sounds very messy and shouldn't be necessary. BTW, Searching only the 'Program Files' directory on my PC gives me six different copies of this gdiplus.dll!


No matter how experienced you are in ASP.Net/Windows, you should first build a simple asp.net 'Hello World!' project. Upload that, and see if you can get it to work here, using this Mono/Apache/Linux setup. Once you've got passed that stage, you will have learnt a lot. Of course, come back if you need a hand with that. You could then start to add your required functionally piece by piece, until you hit this error again; Bingo! Now you have something to work with...

Give us some more information so we don't have to guess; What are you doing in your project? Where do you think your project uses gdiplus.dll? etc. We could perhaps provide further guidance and learn stuff from you at the same time. I'm sure there are a few of us just waiting for decent .Net questions! ;)
 

garrettroyce

Community Support
Community Support
Messages
5,609
Reaction score
251
Points
63
Good contributions, Hue_Kares. I'll just put in that DLL files are no problem to mono, even though linux doesn't understand them per se.
 
Top