Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeGetting StartedGetting StartedInstalling DNN ...Installing DNN ...4.5.1 installation under Medium Trust4.5.1 installation under Medium Trust
Previous
 
Next
New Post
5/12/2007 1:20 PM
 

I'm in the process of installing a default 4.5.1_install installation onto IIS6.

My IIS server has its default security trust polict set to medium.

Having tried to install using the wizard I couldn't get past the permissions check as this would always fail completely (no boxes checked).  I therefore tried to use the auto-install/traditional method and half way through running the install I get the error below.

It seems that this is due to Medium trust not being granted the FileIOPermission by default.  I'm going to attempt to create a custom trust config file based on web_mediumtrust.config and include FileIOPermission as:

<IPermission
class="FileIOPermission"
version="1"
Read="C:\SomeDir;$AppDir$"
Write="$AppDir$"
Append="$AppDir$"
PathDiscovery="$AppDir$"
/>

Just thought I'd post this in case anyone else has similar issue.  I'll post back to report my results.

Error I received was:

Error: Error configuring Child PortalRequest for the permission of type 'System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed. at System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark& stackMark, Boolean isPermSet) at System.Security.CodeAccessPermission.Demand() at System.IO.Directory.InternalCreateDirectory(String fullPath, String path, DirectorySecurity dirSecurity) at System.IO.Directory.CreateDirectory(String path, DirectorySecurity directorySecurity) at DotNetNuke.Entities.Portals.PortalController.CreatePortal(String PortalName, String FirstName, String LastName, String Username, String Password, String Email, String Description, String KeyWords, String TemplatePath, String TemplateFile, String HomeDirectory, String PortalAlias, String ServerPath, String ChildPath, Boolean IsChildPortal)
00:00:07.190 -   Portal failed to install:Error!

 
New Post
5/12/2007 3:09 PM
 

DotNetNuke does work under medium trust, all of the code and modules are developed with that restriction in mind.

As for the FileIOPermission, you do not need to add that node with those settings, that's the default in asp.net 2.0's medium.config file (I've checked 2 machines to confirm this). If it's missing in your file, someone/something has already edited that file.

Cathal


Buy the new Professional DNN7: Open Source .NET CMS Platform book Amazon US
 
New Post
5/12/2007 8:18 PM
 

Hi Cathal,

Thanks for you reply.  Since posting my first message about Medium Trust I have now found the cause of my problem.

This is the first time I'd try to run DNN under Medium Trust and using a custom Windows server account (e.g. not Network Service) as the app pool identity.  When set to Full trust the install worked OK, but when set to medium trust it failed.  I therefore thought it must be a trust issue given I'd set the permissions on the webroot folder already.

However... it turned out that the problem was due to NTFS permissions.  I had previously set Modify permissions for the app pool identity account on the webroot directory of the DNN installation, however it was also necessary to grant read/executre, list and read privs to the account on the parent of the webroot folder.  E.g. my webroot where the DNN files where was set to d:\inetpub\websites\dnn.  I had to set read access to d:\inetpub\websites.

Something I've never had to do before but as I say, first time round with Medium trust and custom app pool identity, but suprised all the same.  I originally saw this post which lead be to believe I might be missing FileIOPermission in my medium trust file but as you said, this is already there.

It seems I may not have been the only one having seen this issue (see this post) so thought it best to post my reply to help anyone else in the future.  Maybe it's worth re-wording the advice in the wizard to reflect the above on the "Failed Permissions Test" page.

/W

 
Previous
 
Next
HomeHomeGetting StartedGetting StartedInstalling DNN ...Installing DNN ...4.5.1 installation under Medium Trust4.5.1 installation under Medium Trust


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out