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

HomeHomeDevelopment and...Development and...DNN Platform (o...DNN Platform (o...Trust LevelsTrust Levels
Previous
 
Next
New Post
10/31/2009 8:10 PM
 

I'm getting a big headache with Trust level issues.

I'm trying to understand what the reprecussions are in developing a module on my localhost server with a <trust level="Ful" originUrl=".*" />

Because I can't get DNN to work on my localhost unless the trust level is set to Full.

Interestingly enough, for the "install" version of DNN, the web.config file may have a trust level="Medium", but when I look at the .Net Trust Levels in IIS, it says the Trust Level = "Full"

I tried to do with is the "Source" version of DNN and a trust level = "Medium" interestingly enough allows DNN to go through the full installation, but when it tries to load default.aspx it just hangs. The log files show nothing as to why it hangs either. However, setting a trust level = "Full" in the web.config file allows DNN to start up just fine.

So anyone have a list of "Bad" reprecussions on developing modules and a local machine with a trust level = "Full"

I'm just trying to comprehend why I'm having so much problems with the trust level.

Thanks.

 

 
New Post
11/2/2009 10:28 AM
 

If Medium Trust is set in the Web.Config it should over ride the IIS setting (even if it is set to FULL).  Either way, default DNN is set to medium trust and WILL run in medium trust without issue. If you install a 3rd party module, the 3rd party module could require a higher trust level thus causing errors, however that is because of the module, not DNN.

Also, make sure you have all the permissions set correctly for your website at the folder/file level (i.e. Administrators FC, System FC, Network Service FC, Users RX, etc).  If file access requires a higher level of security than is set, this could also cause errors (though I am not sure if it would manifest itself as a Trust error or not). 

What OS/IIS version are you running?  Also, what version of DNN are you seeing this when running?  Are you installing any 3rd party modules? 


Best Regards,

Robert J Collins | Co-Founder & President

Netlogic Corporation

 
New Post
11/5/2009 1:28 PM
 

Hi Robert,

First, thank you for responding it is greatly appreciated.

1. First, I can get the "Install" version to run in medium trust.

2. However, I'm trying to develop modules, and I've found it easier to develop compiled modules (WAP I believe is the right term) works best when I'm doing development with the "Source" version because it allows me easy access to debugging etc.

3. This is where I'm having problems. I didn't have any problems with Windows XP. I had medium trust in the web.config file and everything ran fine, I could develop just fine. However, my newer machine has Windows Vista Home Premium and it's just refusing to allow me to install the DNN source version. I can actually get through the "Install" of DNN source, where the database is created. however when I click on the final link to "Go to Portal" I keep getting the error (see below)

I can go modify the system.web/deployment and add the requirePermission=false attribute, but it's in the machine.config file, and of course additional SecurityExceptions pop up after I make that first attribute change. Also I believe it's not a good idea to modify the machine.config file.

So to answer your questions

OS: Windows Vista Home Premium

IIS: 7

No third party modules as I can't even get DNN Source version to run.

Any help would be greatly appreciated! As for now the only way I can get the Source version to work is to run with Full Trust, which I'm doing on my development machine. Doing final testing with the Install version in medium trust after the module has been developed. But why can't I get the source version to run in medium trust?

 

System.Security.SecurityException: Request for ConfigurationPermission failed while attempting to access configuration section 'system.web/deployment'. To allow all callers to access the data for this section, set section attribute 'requirePermission' equal 'false' in the configuration file where this section is declared. ---> System.Security.SecurityException: Request for the permission of type 'System.Configuration.ConfigurationPermission, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' failed. at System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark& stackMark, Boolean isPermSet) at System.Security.CodeAccessPermission.Demand() at System.Configuration.BaseConfigurationRecord.CheckPermissionAllowed(String configKey, Boolean requirePermission, Boolean isTrustedWithoutAptca) The action that failed was: Demand The type of the first permission that failed was: System.Configuration.ConfigurationPermission The first permission that failed was: The demand was for: The granted set of the failing assembly was: The assembly or AppDomain that failed was: System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 The method that caused the failure was: Boolean GetRetailFromConfig() The Zone of the assembly that failed was: MyComputer The Url of the assembly that failed was: file:///C:/inetpub/wwwroot/DotNetNuke514/Website/bin/system.web.extensions.DLL --- End of inner exception stack trace --- at System.Configuration.BaseConfigurationRecord.CheckPermissionAllowed(String configKey, Boolean requirePermission, Boolean isTrustedWithoutAptca) at System.Configuration.BaseConfigurationRecord.GetSectionRecursive(String configKey, Boolean getLkg, Boolean checkPermission, Boolean getRuntimeObject, Boolean requestIsHere, Object& result, Object& resultRuntimeObject) at System.Configuration.BaseConfigurationRecord.GetSection(String configKey, Boolean getLkg, Boolean checkPermission) at System.Configuration.BaseConfigurationRecord.GetSection(String configKey) at System.Web.HttpContext.GetSection(String sectionName) at System.Web.Configuration.HttpConfigurationSystem.GetSection(String sectionName) at System.Web.Configuration.WebConfigurationManager.GetSection(String sectionName) at System.Web.UI.DeploymentSectionCache.GetRetailFromConfig() at System.Web.UI.DeploymentSectionCache.get_Retail() at System.Web.UI.ScriptManager.get_DeploymentSectionRetail() at System.Web.UI.ScriptReference.IsDebuggingEnabled(ScriptManager scriptManager) at System.Web.UI.ScriptReference.ShouldUseDebugScript(String releaseName, Assembly assembly, ScriptManager scriptManager) at System.Web.UI.ScriptReference.GetResourceName(String releaseName, Assembly assembly, ScriptManager scriptManager) at System.Web.UI.ScriptReference.GetUrlFromName(ScriptManager scriptManager, IControl scriptManagerControl, Boolean zip) at System.Web.UI.ScriptReference.GetUrl(ScriptManager scriptManager, IControl scriptManagerControl, Boolean zip) at System.Web.UI.ScriptManager.RegisterScripts() at System.Web.UI.ScriptManager.OnPagePreRenderComplete(Object sender, EventArgs e) at System.Web.UI.Page.OnPreRenderComplete(EventArgs e) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) The Zone of the assembly that failed was: MyComputer
 

 

 
New Post
11/6/2009 12:21 AM
 

 I think I may see your issue.  I noticed in the error it is referring to "System.Web.Extensions, Version=1.0.61025.0".  If you are running Vista with IIS, I assume you are also running .Net 3.5 (most likely sp1)?  If this is the case, lets try changing the Ajax version for the old 1.x version to the new 3.5 version and see if that gets you going.  

Here are the steps to do this:

  1. Make sure you have .Net 3.5 SP1 Installed
     
  2. Download the Latest DNN 5.1.x version
     
  3. Create a new Database
     
  4. Extract DNN to the Desired Directory
     
  5. Set Permissions
    1. Administrators FC
    2. System FC
    3. Network Service FC
    4. Users RX
       
  6. Delete the System.Web.Extensions.dll from DNN's Bin (if there)
     
  7. Open the Web.Config and replace ALL instances of "1.0.61025.0" with "3.5.0.0" (Save and Close)
     
  8. Install DNN as Normal

See if this gets you where you want to be...


Best Regards,

Robert J Collins | Co-Founder & President

Netlogic Corporation

 
New Post
11/6/2009 9:40 PM
 

Kudos to you Robert!

That was indeed the solution. I was taking the development.config and making that my web.config file when I was doing a new install.

Following your instructions everything appears to have worked.

I sincerely appreciate your time in assisting me with this problem.

 

 
Previous
 
Next
HomeHomeDevelopment and...Development and...DNN Platform (o...DNN Platform (o...Trust LevelsTrust Levels


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