This project is read-only.

N2 hosted at hostgator shared

Topics: Developer Forum, User Forum
Nov 1, 2013 at 4:48 PM
Edited Nov 1, 2013 at 4:49 PM
Hello. I have N2 with MVC3 web site which works fine on dedicated server. For security reasons and backup I am migrating to shared hosting at Hostgator. I rebuild my project targeted to .NET 4.0 (on dedicated server it's trageted to 4.5, and I was told that Hostgator doesnt support .NET 4.5 on shared hoting plans) and I have a lot of problems with starting up. At first WebActivator was making problems and I deleted it. Now I am getting message "Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information."

Here is Stack Trace:


[ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.]
System.Reflection.RuntimeModule.GetTypes(RuntimeModule module) +0
System.Reflection.RuntimeModule.GetTypes() +4
System.Reflection.Assembly.GetTypes() +61
N2.Engine.<GetTypesInAssembly>d__0.MoveNext() +65

[N2Exception: Error getting types from assembly N2.Packaging, Version=2.4.0.0, Culture=neutral, PublicKeyToken=null, Inheritance security rules violated while overriding member: 'SharpZipLib.Web.VirtualPathProvider.ZipVirtualPathCollection.InitializeLifetimeService()'. Security accessibility of the overriding method must match the security accessibility of the method being overriden.]
N2.Engine.<GetTypesInAssembly>d__0.MoveNext() +276
System.Linq.<SelectManyIterator>d__142.MoveNext() +397
System.Collections.Generic.List
1..ctor(IEnumerable1 collection) +381
System.Linq.Enumerable.ToList(IEnumerable
1 source) +58
N2.Engine.CachedAssembly.GetOrCreateCache(String key, Func2 factory, Boolean& factoryInvoked) +105
N2.Engine.<GetTypes>d__0.MoveNext() +150
System.Linq.<SelectManyIterator>d__14
2.MoveNext() +170
System.Linq.WhereSelectEnumerableIterator2.MoveNext() +171
System.Linq.WhereEnumerableIterator
1.MoveNext() +152
System.Collections.Generic.List1..ctor(IEnumerable1 collection) +460
System.Linq.Enumerable.ToList(IEnumerable1 source) +58
N2.Engine.ServiceRegistrator.RegisterServices(IEnumerable
1 services) +53
N2.Engine.ContainerConfigurer.Configure(IEngine engine, EventBroker broker, ConfigurationManagerWrapper configuration) +756
N2.Engine.ContentEngine..ctor() +113
N2.Context.CreateEngineInstance() +412
N2.Context.Initialize(Boolean forceRecreate) +207
N2.Web.InitializerModule.Init(HttpApplication context) +23
System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +418
System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +172
System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +336
System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +296

[HttpException (0x80004005): Error getting types from assembly N2.Packaging, Version=2.4.0.0, Culture=neutral, PublicKeyToken=null, Inheritance security rules violated while overriding member: 'SharpZipLib.Web.VirtualPathProvider.ZipVirtualPathCollection.InitializeLifetimeService()'. Security accessibility of the overriding method must match the security accessibility of the method being overriden.]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +9873912
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +101
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +254
Nov 1, 2013 at 10:51 PM
Try the free offering of Azure websites, it's likely to be better than Hostgator's offering.
Nov 1, 2013 at 10:52 PM
What are terms? Can you share a link please?
Nov 2, 2013 at 2:01 AM
Nov 2, 2013 at 9:29 AM
g0sh3 wrote:
Hello. I have N2 with MVC3 web site which works fine on dedicated server. For security reasons and backup I am migrating to shared hosting at Hostgator. I rebuild my project targeted to .NET 4.0 (on dedicated server it's trageted to 4.5, and I was told that Hostgator doesnt support .NET 4.5 on shared hoting plans) and I have a lot of problems with starting up. At first WebActivator was making problems and I deleted it. Now I am getting message "Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information."

Here is Stack Trace:


[ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.]
System.Reflection.RuntimeModule.GetTypes(RuntimeModule module) +0
System.Reflection.RuntimeModule.GetTypes() +4
System.Reflection.Assembly.GetTypes() +61
N2.Engine.<GetTypesInAssembly>d__0.MoveNext() +65

[N2Exception: Error getting types from assembly N2.Packaging, Version=2.4.0.0, Culture=neutral, PublicKeyToken=null, Inheritance security rules violated while overriding member: 'SharpZipLib.Web.VirtualPathProvider.ZipVirtualPathCollection.InitializeLifetimeService()'. Security accessibility of the overriding method must match the security accessibility of the method being overriden.]
N2.Engine.<GetTypesInAssembly>d__0.MoveNext() +276
System.Linq.<SelectManyIterator>d__142.MoveNext() +397
System.Collections.Generic.List
1..ctor(IEnumerable1 collection) +381
System.Linq.Enumerable.ToList(IEnumerable
1 source) +58
N2.Engine.CachedAssembly.GetOrCreateCache(String key, Func2 factory, Boolean& factoryInvoked) +105
N2.Engine.<GetTypes>d__0.MoveNext() +150
System.Linq.<SelectManyIterator>d__14
2.MoveNext() +170
System.Linq.WhereSelectEnumerableIterator2.MoveNext() +171
System.Linq.WhereEnumerableIterator
1.MoveNext() +152
System.Collections.Generic.List1..ctor(IEnumerable1 collection) +460
System.Linq.Enumerable.ToList(IEnumerable1 source) +58
N2.Engine.ServiceRegistrator.RegisterServices(IEnumerable
1 services) +53
N2.Engine.ContainerConfigurer.Configure(IEngine engine, EventBroker broker, ConfigurationManagerWrapper configuration) +756
N2.Engine.ContentEngine..ctor() +113
N2.Context.CreateEngineInstance() +412
N2.Context.Initialize(Boolean forceRecreate) +207
N2.Web.InitializerModule.Init(HttpApplication context) +23
System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +418
System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +172
System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +336
System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +296

[HttpException (0x80004005): Error getting types from assembly N2.Packaging, Version=2.4.0.0, Culture=neutral, PublicKeyToken=null, Inheritance security rules violated while overriding member: 'SharpZipLib.Web.VirtualPathProvider.ZipVirtualPathCollection.InitializeLifetimeService()'. Security accessibility of the overriding method must match the security accessibility of the method being overriden.]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +9873912
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +101
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +254
check the files and check the trust level in web.config also check the web.config i was have the same issue and i have fixed by these step
Nov 2, 2013 at 9:48 PM
ahmed205 wrote:
check the files and check the trust level in web.config also check the web.config i was have the same issue and i have fixed by these step
I tried with trust level in web.config but got error that I dont have permissions to use like that. I'll set Copy local to all references and upload them to the server.
What do you suggest to do else in web.config
Nov 3, 2013 at 3:14 AM
I see two potential issues with Hostgator, at http://support.hostgator.com/articles/plesk/windows-shared-hosting-information/windows-shared-frequently-asked-questions-plesk-10
Do the applications run in ASP.NET full trust security level?

No. The applications must be published in Medium Trust in order to run on the Windows Shared Server.

How much resources are assigned to the application pool?

100MB private memory, 25% CPU. If the application is using more than 25% system resources which will include CPU or RAM, SQL utilization (e.g. queries), mail utilization (sending too many messages out ) it will be a violation of TOS.
You probably want up to 150 MB memory and full trust for the optimal experience using N2CMS. Technically, I think it is possible to get N2 working in Medium trust though.
Nov 3, 2013 at 10:44 AM
bherila wrote:
I see two potential issues with Hostgator, at http://support.hostgator.com/articles/plesk/windows-shared-hosting-information/windows-shared-frequently-asked-questions-plesk-10
Do the applications run in ASP.NET full trust security level?

No. The applications must be published in Medium Trust in order to run on the Windows Shared Server.

How much resources are assigned to the application pool?

100MB private memory, 25% CPU. If the application is using more than 25% system resources which will include CPU or RAM, SQL utilization (e.g. queries), mail utilization (sending too many messages out ) it will be a violation of TOS.
You probably want up to 150 MB memory and full trust for the optimal experience using N2CMS. Technically, I think it is possible to get N2 working in Medium trust though.
bherila thank you. I need much more than 150MB. For working in Medium trust I am also optimist :)
Nov 3, 2013 at 7:32 PM
Edited Nov 3, 2013 at 7:33 PM
Azure gives you 1 GB of memory (shared across up to 10 websites) with the free offer. It is limited to 165 MB of bandwidth per day.

How much disk space/bandwidth do you need? I could potentially set you up with something starting around $15/month, which would cover the costs associated with most normal sites. See this page for more details: http://bherila.net/n2cms (edit: this $15/month plan includes full trust support)
Nov 14, 2013 at 8:13 AM
bherila wrote:
Azure gives you 1 GB of memory (shared across up to 10 websites) with the free offer. It is limited to 165 MB of bandwidth per day.

How much disk space/bandwidth do you need? I could potentially set you up with something starting around $15/month, which would cover the costs associated with most normal sites. See this page for more details: http://bherila.net/n2cms (edit: this $15/month plan includes full trust support)
Monthly traffic statistic for October is 6TB, and I need min 25GB of disk space. I have three sites in same db (and it's mysql db) and RAM Memory usage is about 3GB for two of the site, as they are much more visited than the third one.
This will be plan of the backup strategy (in case of ddos attack) and I don't know when and how long will use it. I will see your offer
Thank you very much
Nov 14, 2013 at 10:02 PM
Edited Nov 14, 2013 at 10:05 PM
g0sh3 wrote:
bherila wrote:
Azure gives you 1 GB of memory (shared across up to 10 websites) with the free offer. It is limited to 165 MB of bandwidth per day.

How much disk space/bandwidth do you need? I could potentially set you up with something starting around $15/month, which would cover the costs associated with most normal sites. See this page for more details: http://bherila.net/n2cms (edit: this $15/month plan includes full trust support)
Monthly traffic statistic for October is 6TB, and I need min 25GB of disk space. I have three sites in same db (and it's mysql db) and RAM Memory usage is about 3GB for two of the site, as they are much more visited than the third one.
This will be plan of the backup strategy (in case of ddos attack) and I don't know when and how long will use it. I will see your offer
Thank you very much
You really need a more robust hosting solution for a load like that. Feel free to contact me offline if you are interested in a custom hosting solution, but it will cost more than $15/month -- sorry if I got your hopes up.

In case you are wondering what I mean by a "custom hosting solution," I am referring to a combination of cloud services (like Azure) and managed servers that are designed to reduce costs below a typical "pure cloud" offering such as going all-Azure, or all-AWS. These are typically only economical when your hosting bill would otherwise exceed $200 per month. I think you're near that point.
Jan 7, 2014 at 11:43 PM
Sorry for too late response. bherila thanks for your offer. As I needed this only in case of ddos atacks (that were to often few months ago) I set the sites up on "borrowed" server resurses by friend - all my sites are down till I will need to use them from there, and for now this will be the solution for this.
Jan 8, 2014 at 1:54 AM
You should check out www.cloudflare.com for a great, free DDOS protection solution. It will also speed up your N2 sites considerably and reduce the load on your server.
Oct 13, 2017 at 3:02 PM
I use zz.com.ve host and it´s work perfetly also they have
good vip and pro plans with prices from 1.25$
unlimited storage email accounts and antivirus...

zz.com.ve

Free Host



zz.com.ve