|
Rank: Newbie Groups: Member
Joined: 11/29/2012 Posts: 5
|
First off the SharePoint sites are using Active Directory login for the security, and the sites are in general pretty well locked down. I am using just the Menu control part of the pack, and the license is embedded within the code of the SharePoint webpart.
Issue: Critical error thrown when loading the control
TypeInitializationException: The type initializer for 'EO.Web.Internal.b1' threw an exception SecurityException: Request for the permission of type 'System.Security.Permissions.FileIOPermission
The control EO.web.dll is in the GAC
Steps taken…
Update the eo_web.ashx to include the missing publickeytoken and add it to the root of the SharePoint site
<%@ WebHandler Class="EO.Web.Runtime, EO.Web, Version=10.0.36.2, Culture=neutral, PublicKeyToken=e92353a6bf73fffc" %>
Confirmed that the web.config for the site includes safeControl entries
<SafeControl Assembly="EO.Web, Version=10.0.36.2, Culture=neutral, PublicKeyToken=e92353a6bf73fffc" Namespace="EO.Web.Internal" TypeName="*" Safe="True" /> <SafeControl Assembly="EO.Web, Version=10.0.36.2, Culture=neutral, PublicKeyToken=e92353a6bf73fffc" Namespace="EO.Web" TypeName="*" Safe="True" />
Still has errors:
Exception: Unable to automatically create file eo_web.ashx on your application root directory. The file is needed for EO.Web Controls to function. Please manually copy it from EO.Web Controls installation directory to your application's root directory.]
Add an entry to the AppSettings to provide an alternate handler location, where trust levels are higher
<add key="eo_HandlerLocation" value="~/_app_bin" />
Error reports that file cannot be found in this directory, so we have changed the correct web.config... Moved .ashx file to this new folder, and general exceptions are thrown
Add HttpModule entry (top of list), then added the publickeytoken entry, as SharePoint 2007 runs in classic mode.
<add name="EOWebRuntime" type="EO.Web.Runtime,EO.Web, Version=10.0.36.2, Culture=neutral, PublicKeyToken=e92353a6bf73fffc""/>
Now showing access to rootweb\bin folder is denied
The only thing I have not yet tried is the script location entry
<add key="eo_ScriptLocation" value="~/eo_script"></add>
Is there anything else I can try and get this control to run. On my test system where I can debug, and I have zero security, it all works....
I suppose what I need to know is what permissions read/write/execute/browse/.. are needed at the handler and script locations, and are there any other requirements that other locations may need to be openned up ?
Thanks
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,195
|
Hi,
Do you have the full stack trace? If you can post the full stack trace, we might be able to find out what the code is trying to access.
Thanks!
|
|
Rank: Newbie Groups: Member
Joined: 11/29/2012 Posts: 5
|
I have a screen dump that shows the error we are now raising - where should I send it ? Here is the link:
[Link removed]
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,195
|
Hi,
The screenshot has already clearly told you that access to the bin directory is being denied.
Thanks!
|
|
Rank: Newbie Groups: Member
Joined: 11/29/2012 Posts: 5
|
Yes, that is as far as I got. I cannot change the trust/permission levels on the core directories, so will setting a scriptlocation solve the problem?
The help states that there needs to be read/write access to the scriptlocation folder, but does that mean we can disable execute rights, and if the two location entries in the web.config are the only folders the menu control will use ?
I do not want to schedule access time on the server again to find out that there are still more folders/permissions I need to setup before the menu works.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,195
|
Hi,
I do not believe it has anything to do with script location or any other workaround on this. You just have to fix that permission issue.
Thanks!
|
|
Rank: Newbie Groups: Member
Joined: 11/29/2012 Posts: 5
|
But that is the problem.
The ~\bin folder has medium trust, and I cannot just apply general permissions over the whole folder for read/write/execute, as it will reduce the security on the site.
So..... will using the alternate folder locations, where I can manage trust levels and permissions, solve this?
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,195
|
Hi,
I don't think you need write/execute. But you definitely need read. I have already told you has nothing to do with the script location there is no alternate folder location for that matter. So you really need to fix the permission issues. We do not provide support on how to set trust level or permission though. So you will have to work out that yourself.
Thanks!
|
|
Rank: Newbie Groups: Member
Joined: 11/29/2012 Posts: 5
|
Thank you. I am still not sure why access to the ~\bin folder is needed, as it is empty, but if that is mandatorty for the control, then that is what I must do.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,195
|
Hi,
I believe that's because the code checks for the license file. It is VERY RARE that your application would not have access to that folder since that's where your DLL application usually loaded (unless you have everything in GAC). I think as for the current build, you have to grant read permission on that folder and there is no workaround for that.
Thanks
|
|