Last post Mar 24, 2011 04:30 AM by rstrahl
Mar 16, 2011 06:08 AM|Rusty404|LINK
I was wondering if anyone could help me with this problem I am having.
I am using friendly URLs in my .net 3.5 website, and this uses the GetCompiledPageInstance method in the PageParser class to work.
This all works a treat on my localhost, but as soon as I upload this to my shared hosting (with 1&1) I get this error
System.Security.SecurityException: Request for the permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=18.104.22.168, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
I have done loads of Googling and found that this is due to me needing to turn Full Trust mode on. However, this is something that is not allowed on shared hosting.
Does any one know of a workaround for this 'GetCompiledPageInstance' method, or another method I could use? Is there another way of doing Friendly URLs without this?
Mar 24, 2011 04:30 AM|rstrahl|LINK
Nope there's no workaround - explicit code compilation is a high trust operation since in theory you could compile malicious code and then execute it on the server. Hence the requirement of full trust...
You will need to get your host to allow full trust - or switch to one the does allow it if you need this feature. Seems like more hosting companies these days do allow full trust hosted applications.
+++ Rick ---