View Full Version : Security Exception
I have integrated Zoom Search Engine with an ASP.NET Web Application and renamed the CGI script extension with .EXE because of problem of compatibility on the web server. Everything works fine in local, but when I publish the web site on the server, uploading the script and .zdat files in a specific folder allows to run scipts, it does not work and the exception generated is a SecurityException.
Any suggestions?
Many thanks.
wrensoft
06-12-2008, 12:20 PM
It is probalby a permissions issue on the server. They probably have the machine locked down more than your local machine.
What was the exact error?
Yes exactly, this is the reason. Everything works fine with a full trust level, but the server where the webapp is hosted has a medium trust level and it does not give the right permission to execute the script. I know that it is a problem of the hosting and I also asked them to customize the level for my webapp to work properly, but if you have any suggestions to work-around the problem I would appreciate that.
One possible option could be using a Custom Medium trust level, giving a reference in the web.config:
</system.web>
.
.
.
<securityPolicy>
<trustLevel name="CustomMedium" policyFile="mycustommediumtrust.config" />
</securityPolicy>
</system.web>
and in the mycustommediumtrust.config giving the right permission, like for example:
<IPermission
class="DnsPermission"
version="1"
Unrestricted="true"
/>
the problem is which is the right permission?
It is difficult for us to comment. The right permission would need to be determined by your server administrator based on the way he/she has configured the security policies. You should let him/her know that your requirement is to allow the execution of binary .CGI executables (or .EXE files in your case, since you have renamed it) and they should configure the policy accordingly.
The CGI would need read access to files in the same folder (to read from the ZDAT files). If you wish to use search word logging, you would also need read+write access to a certain specified logs folder.
I think that the solution could be moving on a dedicated server to have a full trust level.
vBulletin® v3.7.0, Copyright ©2000-2008, Jelsoft Enterprises Ltd.