c# - Unable to read/write files in shared hosting (hostgator) -


i have developed mvc 5 project works fine on local file server , on other hostings (dhosting, go daddy) when upload shared hosting(hostgator) throws security exception i.e.

exception details: system.security.securityexception: request permission of type 'system.security.permissions.fileiopermission, mscorlib, version=4.0.0.0, culture=neutral, publickeytoken=b77a5c561934e089' failed.

when add <trust level="full" /> error changes configuration error i.e.

description: error occurred during processing of configuration file required service request. please review specific error details below , modify configuration file appropriately.

parser error message: configuration section cannot used @ path. happens when site administrator has locked access section using inherited configuration file.

source error: application error occurred on server. current custom error settings application prevent details of application error being viewed remotely (for security reasons). could, however, viewed browsers running on local server machine.

is there way resolve issue or should talk hosting provider provide full trust ?

the behavior see expected - (if not all) shared hosting providers not allow full trust sites in part due ability write disk.

your options:

  • stop using disc , store data db (with added benefit if being able migrate between servers, backup...)
  • dedicated server hosting (either virtual servers, vms in azure/amazon/google clouds,...) - cost higher medium trust shared hosting
  • find shared hosting allows full trust (also mean 0 guarantees availability/performance)

Comments

Popular posts from this blog

php - How to add and update images or image url in Volusion using Volusion API -

javascript - IE9 error '$'is not defined -