A Programmer’s Cheat-Sheet for GoDaddy.com

You’ve got your website running beautifully on your development / staging server. Then you upload your site to your GoDaddy Shared Hosting environment and are met with the ugly yellow screen of death and this message:

System.Security.SecurityException: That assembly does not allow partially trusted callers

Here, I present the workarounds that I used to get my site up and running. These solutions apply to my use of MySQL and iTextSharp PDF library.

I hope you find this useful.


By default, the MySQL .NET Connector downloaded from the MySQL site requires full trust in order to work properly.

Compile the connector so that Partially-Trusted callers can use the DLL.


  1. Download the source code for the connector.
  2. Modify the DLL attributes in the AssemblyInfo.cs file.
  3. add a using:  using System.Security;
  4. Add the following line to the file:[assembly: AllowPartiallyTrustedCallers]
  5. Compile the DLL.
  6. Upload to site and test.

MySQL Connector Source Code

The MySQL .NET required Admin level rights in order to execute stored procedures.

Use ad-hoc queries to execute the stored procedure.


  1. Create the stored procedures in your database. You can do this via the phpMyAdmin in the GoDaddy DB console. Or, you can do as I do: create the stored procedure locally. Then send to a backup that contains only the new stored procs. Upload the backup to GoDaddy and start a restore. The proc will be created/updated on the GoDaddy server.
  2. Modify your .NET code. Create MySQLCommand objects with “Type=CommandType.Text”. The text will then be something along the lines of: “exec MyStoredProcName(‘Param1Value’, ‘Param2Value’)”
  3. Test your changes. Upload when you are ready.



Ny default, the iTextSharp DLL only works in a Full-Trust environment.

Recompile the connector so that it can be called by PartiallyTrusted Callers.


  1. Download the source code.
  2. Modify the DLL attributes in the AssemblyInfo.cs file (see above)
  3. Compile the DLL.
  4. Upload to site and test.

iTextSharp source code (v4.1.2)

iTextSharp source code (v5.0.0)

I hope you have found this useful. If you have any questions or comments, please contact me.

Thanks for visiting my site!

If you found this useful, consider helping me maintain this site.

8 thoughts on “A Programmer’s Cheat-Sheet for GoDaddy.com

  1. I am trying to use openXML SDK provided by microsoft on GoDaddy with no luck.

    I have no idea how to set the settings to run this thing on GoDaddy.

    1. (Sorry for the delay in acknowledging your observation)
      You are correct! The System.Security namespace is now required in Framework 4 in order to use the “AllowPartiallyTrustedCallers” assembly attribute.

      Thanks for pointing that out!

  2. GoDaddy was founded in 1997 as Jomax Technologies by Bob Parsons, a veteran of the United States Marine Corps. Prior to GoDaddy, Parsons sold his financial software services company, “Parsons Technology, Inc.” to Intuit. The sale provided him with several millions of dollars in the mid-1990s. As a result, Parsons decided to retire. In 1997, Bob Parsons came out of his retirement to launch a new company, Jomax Technologies which later became GoDaddy Group Inc.*,

    Best wishes

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.