Forums / Deployment / Help! Internal Server Error 500 with GoDaddy

Help! Internal Server Error 500 with GoDaddy

16 posts, 0 answered
  1. Andrew
    Andrew avatar
    47 posts
    Registered:
    22 May 2009
    13 Jun 2009
    Link to this post
    Hi

    I've deployed a site to GoDaddy but it's falling over with an "Internal Server Error 500" (I'm still waiting for their support people to respond to a support ticket).

    Basically I've created a site using your "blank project", which works fine on my PC (Vista/IIS7). I've simply FTPd this up to GoDaddy, changed IIS to classic pipeline, changed the connection string in web.config but I'm getting the 500 error. I've even created a test html file in there but get the same problem when browsing to it (the test html file worked fine prior to uploading my Sitefinity site).

    Does anyone have any pointers or experience of GoDaddy?

    Thanks in advance
    Andy
  2. Andrew
    Andrew avatar
    47 posts
    Registered:
    22 May 2009
    13 Jun 2009
    Link to this post
    Hi all

    I've got a little further, and now get the Security Exception below. I have followed the user manual to set up web.config for medium trust, so is it now something I must ask GoDaddy to configure on their server? If so what do I need to request as I haven't worked with trust levels before.

    Regards
    Andrew

     

    Server Error in '/' Application.

    Security Exception

    Description: The application attempted to perform an operation not allowed by the security policy.  To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file.

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

    Source Error:

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

    Stack Trace:

    [SecurityException: That assembly does not allow partially trusted callers.]
       Nolics.ORMapper.DataProviders.SQLDataProvider.Open() +123
       Telerik.DataAccess.NolicsHelper.SetConnection(String connectionName, String providerName) +830
       Telerik.Cms.Data.DefaultProvider.Initialize(String name, NameValueCollection config) +214
       Telerik.ManagerBase`1.InstantiateProvider(ProviderSettings providerSettings, Type providerType) +673
       Telerik.ManagerBase`1.InstantiateProvider(ProviderSettings providerSettings) +91
       Telerik.ManagerBase`1.SetProvider(String providerName) +203
       Telerik.ManagerBase`1..ctor(String providerName) +89
       Telerik.ManagerBase`1..ctor() +11
       Telerik.Cms.Web.UrlHelper.Initialize(CmsHttpModule cmsModule) +38
       Telerik.Cms.Web.CmsHttpModule.Init(HttpApplication context) +86
       System.Web.HttpApplication.InitModulesCommon() +65
       System.Web.HttpApplication.InitModules() +43
       System.Web.HttpApplication.InitInternal(HttpContext context, HttpApplicationState state, MethodInfo[] handlers) +729
       System.Web.HttpApplicationFactory.GetNormalApplicationInstance(HttpContext context) +298
       System.Web.HttpApplicationFactory.GetApplicationInstance(HttpContext context) +107
       System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) +289
    


    Version Information: Microsoft .NET Framework Version:2.0.50727.3053; ASP.NET Version:2.0.50727.3053
  3. Andrew
    Andrew avatar
    47 posts
    Registered:
    22 May 2009
    13 Jun 2009
    Link to this post
    Apologies for adding to this thread as I find more information! Apparently GoDaddy already run in medium trust, so I'm assuming everything should already be configured correctly. So what could be causing this exception then?

    Thanks again
    Andrew
  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16065 posts
    Registered:
    19 Dec 2014
    14 Jun 2009
    Link to this post
    Hello Andrew,

    Have you configured your website to run in medium trust level? If not, please check our UserManual, Medium Trust Support section.

    Sincerely yours,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  5. Andrew
    Andrew avatar
    47 posts
    Registered:
    22 May 2009
    14 Jun 2009
    Link to this post
    Hi Ivan

    As always thanks for the reply. Yes I've configured the app for medium trust as per the user manual. I'm starting to worry now that I've wasted my money getting GoDaddy hosting. There must be other people out there who have Sitefinity sites hosted with them? And I thought all providers used medium trust level, so why aren't people having problems with Sitefinity elsewhere?

    This is what GoDaddy say about trust level:

    "Our servers use the default Medium trust level with the addition of OleDbPermission, OdbcPermission, and a less-restrictive WebPermission.".

    Is the security exception a problem with GoDaddy, Nolics, or something else?

    Regards
    Andrew
  6. Andrew
    Andrew avatar
    47 posts
    Registered:
    22 May 2009
    14 Jun 2009
    Link to this post
    By the way I'm using Sitefinity 3.6sp2 and connecting to a MySql database, if that helps.

    Also, I've just tried adding <trust level="Medium"/> to the site on my local dev PC and get the same security exception, so it doesn't appear to be specific to GoDaddy. I have followed the user manual on configuring my site for medium trust, so what is going on?!

    Andrew
  7. Andrew
    Andrew avatar
    47 posts
    Registered:
    22 May 2009
    15 Jun 2009
    Link to this post
    I just want to add even more information, which you might find interesting. It seems that the above problem is related to MySql. I've just switched my Sitefinity site over to SQL2005 on my dev PC, and now when I add <trust level="Medium" /> into my web.config it works fine.

    So is this a problem with Nolics and MySql in a medium trust environment?

    I'll try switching to SQL2005 on GoDaddy tonight. While it looks like I might now have a solution, it would still be nice if the original issue could be resolved, whoever it lies with. I had never used MySql before I started using Sitefinity, but I've found it very easy to use from an admin/deployment perspective, and the "mysqldump" tool makes it very easy to transfer databases from my dev PC up to the hosting server. I don't think SQL2005 will be as easy to use! It would be a shame to have to stop using MySql with Sitefinity. There is also better MySql support with hosting companies, and it's usually free (and in the case of GoDaddy you get 10 MySql databases, and only one SQL2005 database).


    Regards
    Andrew
  8. Andrew
    Andrew avatar
    47 posts
    Registered:
    22 May 2009
    15 Jun 2009
    Link to this post
    Ok, I'm making progress with MySql and GoDaddy - here is where I am now, but could do with some assistance please.

    I noticed that the version of MySql.Data.dll in the Sitefinity \bin folder is v5.0.7.0, however this doesn't have the AllowPartiallyTrustedClients attribute, so won't work in a medium trust environment. However v5.0.9.0 and higher *does* have the attribute, so I downloaded this and put it in the \bin folder. I also needed to add a binding redirect to web.config to force Sitefinity to use this version:

    <

     

    dependentAssembly>
    <
    assemblyIdentity name="MySql.Data" publicKeyToken="c5687fc88969c44d"/>
    <
    bindingRedirect oldVersion="5.0.7.0" newVersion="5.0.9.0"/>
    </
    dependentAssembly>

     

    So far so good - Sitefinity is still working fine on my PC after making these changes. However if you change to medium trust you'll find that it throws a security exception when MySql attempts to open a socket connection via System.Net. Apparently it's a known problem with MySql and medium trust, and requires the SocketPermission to be granted.
    It turns out that GoDaddy have had this permission in place for a couple of years - my problem all along was your version of MySql.Data.dll, which doesn't allow partially trusted callers!

    After making the above changes in GoDaddy I now get a new exception:

    Exception of type 'Telerik.DataAccess.ProviderDatabaseUpgradeException' was thrown.

    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: Telerik.DataAccess.ProviderDatabaseUpgradeException: Exception of type 'Telerik.DataAccess.ProviderDatabaseUpgradeException' was thrown.

    Source Error:

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

    Stack Trace:

    [ProviderDatabaseUpgradeException: Exception of type 'Telerik.DataAccess.ProviderDatabaseUpgradeException' was thrown.]
       Telerik.Cms.Data.DefaultProvider.Initialize(String name, NameValueCollection config) +2180
       Telerik.ManagerBase`1.InstantiateProvider(ProviderSettings providerSettings, Type providerType) +673
       Telerik.ManagerBase`1.InstantiateProvider(ProviderSettings providerSettings) +91
       Telerik.ManagerBase`1.SetProvider(String providerName) +203
       Telerik.ManagerBase`1..ctor(String providerName) +89
       Telerik.ManagerBase`1..ctor() +11
       Telerik.Cms.Web.UrlHelper.Initialize(CmsHttpModule cmsModule) +38
       Telerik.Cms.Web.CmsHttpModule.Init(HttpApplication context) +86
       System.Web.HttpApplication.InitModulesCommon() +65
       System.Web.HttpApplication.InitModules() +43
       System.Web.HttpApplication.InitInternal(HttpContext context, HttpApplicationState state, MethodInfo[] handlers) +729
       System.Web.HttpApplicationFactory.GetNormalApplicationInstance(HttpContext context) +298
       System.Web.HttpApplicationFactory.GetApplicationInstance(HttpContext context) +107
       System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) +289
    

    The database on GoDaddy is a copy of what's on my dev PC (I used mysqldump then ran the script on GoDaddy). I also followed the user manual first, and created content in each module. Any ideas what the problem might be?

    Thanks in advance
    Andrew


  9. Georgi
    Georgi avatar
    3581 posts
    Registered:
    24 Sep 2012
    16 Jun 2009
    Link to this post
    Hello Andrew,

    Yes, there is a progress. Which was the original Sitefinity version that you used?

    It seems the provider sees that the database is changed and is trying to upgrade/downgrade it to a version that could work with the current version of Sitefinity. Please download the whole project, run it locally in Full Trust and then upload it back to the web. The upgrade/downgrade process could be done in Full trust only.

    Let us know how it goes.

    Greetings,
    Georgi
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  10. Andrew
    Andrew avatar
    47 posts
    Registered:
    22 May 2009
    16 Jun 2009
    Link to this post

    Hi, the version of my Sitefinity site on GoDaddy is the same as on my dev PC (3.6 SP2). I simply FTPd the website files, so it should all be identical.

    Similarly the database on GoDaddy is an export of my local database, so should be identical also. I have also checked the sp_cmsvariables database table as per another thread - the "SchemaVersion" is 1936 in both my local database and on GoDaddy.

    Everything should be identical so why is the version on GoDaddy attempting to do an upgrade/downgrade? (Just a suggestion: could it be failing to access the database to read the schemaversion, and thinking that the database needs upgrading?).

    Thanks as always for the quick response.

    Andrew

  11. Ivan Dimitrov
    Ivan Dimitrov avatar
    16065 posts
    Registered:
    19 Dec 2014
    17 Jun 2009
    Link to this post
    Hello Andrew,

    Since the website application works fine on your local server and it does not work on your web hosting server I could assume that the problem is related to the hosting company settings or some settings in their security policy. I suggest that you should try to move the project on a different server and see the results. I good option is http://www.discountasp.net/ web hosting provider.

    Greetings,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  12. Andrew
    Andrew avatar
    47 posts
    Registered:
    22 May 2009
    17 Jun 2009
    Link to this post
    Hi, I've now moved to SQL2005 instead, but stayed with GoDaddy - your installation guide detailing how to publish the database to GoDaddy was very useful thanks!

    It's a shame I wasn't able to get MySql to work, especially after all the time spent solving the other trust issues detailed earlier in this thread. I'm guessing it's a permissions problem, but I think Sitefinity is swallowing the exception when it does its upgrade check, so I don't think I'll get to the bottom of the cause.

    Thanks for the interest in this thread!

    Regards
    Andrew
  13. Ivan Dimitrov
    Ivan Dimitrov avatar
    16065 posts
    Registered:
    19 Dec 2014
    18 Jun 2009
    Link to this post
    Hi Andrew,

    I am glad to hear that finally you have managed to fix the problem by migrating to SQL SERVER 2005. If there is anything else that we can do for you, please write back to us.

    Best wishes,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  14. Juan Carlos Sánchez Robles
    Juan Carlos Sánchez Robles avatar
    1 posts
    Registered:
    02 Mar 2005
    29 Mar 2010
    Link to this post
    In my experience, if you get a Internal Server Error 500 in GoDaddy after uploading and asp.net app, it's because you are trying to install it in a folder and not in the root.  If you have an other app in the root the config files will conflict in some cases with the ones in the folder (It doesn't matter if they are independent iis app's).  The solution is to set all your sites in folders and no one in the root or have indepentent hosting accounts.
  15. ankita patel
    ankita patel avatar
    1 posts
    Registered:
    14 May 2010
    14 May 2010
    Link to this post
    Hey please tell me how did you resolve the issue with sql server 2005?I m also having same problem with godaddy deployment with medium trust so please tell me the solution.
  16. JUAN
    JUAN avatar
    1 posts
    Registered:
    30 Oct 2008
    17 May 2010
    Link to this post
    If you include these code lines in the web.config, you can see the detailed error instead of a Internal Server Error 500...

    <system.webServer>
        <httpErrors errorMode="Detailed"/>
        <asp scriptErrorSentToBrowser="true"/> 
    </system.webServer>


    Best Regards.

     

     

     

     

     

     

     

Register for webinar
16 posts, 0 answered