1

Closed

Security Exception

description

I got around the path problem by setting up a mapped network drive to the folder and then creating the whole folder nesting indicated by the previous error.
 
Now I'm seeing:
 
Ouch! an error : System.Security.SecurityException: Request failed.
at Dmoz.Importer.DBHelper.Process(Uri pathToRDF)
at Dmoz.Importer.Program.Main()
The action that failed was:
InheritanceDemand
The type of the first permission that failed was:
System.Security.PermissionSet
The Zone of the assembly that failed was:
InternetPRESS A KEY TO QUIT.
 
Any suggestions?
Closed Jun 16, 2008 at 6:57 AM by bodzebod
Closed.

comments

bodzebod wrote Feb 11, 2008 at 1:12 PM

Hi all, thanks for using DMOZ Importer !

In the program configuration file (in source files, it's "app.config", and in binary package, it's "dmoz_importer.exe.config"), you may locate this section :

<DMOZ_Importer.Properties.Settings>
<setting name="DMOZ_structure_path" serializeAs="String">
<value>H:\travail en cours\Perso\Henduoda\Tools\DMOZ\structure.rdf</value>
</setting>
<setting name="DMOZ_content_path" serializeAs="String">
<value>H:\travail en cours\Perso\Henduoda\Tools\DMOZ\content.rdf</value>
</setting>
<setting name="OutputPath" serializeAs="String">
<value>H:\travail en cours\Perso\Henduoda\Tools\DMOZ</value>
</setting>
<setting name="BatchRowsNumber" serializeAs="String">
<value>10000</value>
</setting>
</DMOZ_Importer.Properties.Settings>

For each setting ("DMOZ_structure_path", "DMOZ_content_path" and "OutputPath"), you should adjust the right path. The 2 first settings are the paths to the DMOZ files, and the setting "OutputPath" is the path to the folder where the program can generate its intermediate "import.txt" file, so a place where the program is allowed to read and write.

I think your security exception might be because the "Import.txt" folder is not a trusted folder for .NET. It might happen if it's a network shared folder for instance.
So there are 2 possibilities :
  • you change the folder to a place located on your local drive, ensuring you have the permissions to read and write
  • you add this path to the trusted paths (you can find details on how to add fulltrust rights to a remote share here : http://support.microsoft.com/kb/320268/en-us )
Hope this will work for you ! /Stephane Baudet

wrote Feb 11, 2008 at 1:13 PM

pedrito68 wrote Mar 19, 2008 at 1:26 PM

The problem isn't folder security. The problem is it's not using the DMOZ_Importer.exe.config file. It retrieves the paths from settings.settings in the in the Properties folder.

The connection string used in the SQLBulkCopy constructor is not the connection string used in the NetTiers classes. This is simple enough to test: Hard-code a string into the SQLBulkCopy constructor (this is supposedly the one that comes form the DMOZ_Importer.exe.config, but it really comes from settings.settings. But when it gets to actually doing work in the NetTiers level, it's getting its connection string from yet another location (the app.config file, I believe).

As a simple test of this, as the developer, simply rename your H:\travail en cours\Perso\Henduoda\Tools\DMOZ\ folder (so that it's not available to the app) and then try using it in another directory following the instructions you provide. I strongly suspect it won't work.

wrote Jun 16, 2008 at 6:57 AM

wrote Feb 12, 2013 at 9:34 PM

wrote May 16, 2013 at 2:11 AM