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 ...1and1 DotNetNuke 4.3.51and1 DotNetNuke 4.3.5
Previous
 
Next
New Post
9/27/2006 1:04 AM
 

All,

I got DotNetNuke to install on 1and1 and get rid of the security error.  I won't go into painstaking detail on whatI did it or what combo finally worked but here's the critical piece of info (I think...).  Someone else needs to try this in EXACTLY this same order:

1.  I created an Sub Directory called DotNetNuke under my home website.

2.  I gave the IUSR and Network Service Modify/Write access to the folder

3.  I created an Application called DotNetNuke using their webfiles application and pointed it to the DotNuke directory noted in step 1.

4.  I ftp'd an install package with the release.config changed to web.config and changed all of the settings noted in the DNN Installation Guide including changing this line belows in the web.config file to point the temp Directory to my physical folder path (I'm not sure if this is really necessary).  Change the xxxxx's to your dnn path.

Changed this:

<compilation debug="false" strict="false">

to this:

<compilation debug="false" tempDirectory="E:\kunden\homepages\xx\xxxxxxxx\DotNetNuke\" >

5. After ftp'ing the files, I went through the install.  Many failed.  Mostly the modules.  Be persistant.  I believe that the script timeout for the 1and1 host server plays into this.  I deleted my tables many times before I finally got a portal created.  I then started all over but this time did not transfer any modules in the install\modules folder of the DNN install.

6.  I then installed each module one at a time. I Had to fix the Announcements module due to an incorrect parameters error as noted by another post on the forums here that have to do with renaming some sql provider scripts to create the schema from {dboowner}{dbqualifier}sysobjects to dbo.sysobjects.  I followed this posts instructions and re-installed the Announcement module.

7.  And finally, I kept noticing that the errors were related to trying to read config settings out of the webconfig.  It seems that DNN stores an apppath on application start based on the current context request. I believe that the URL Rewriter may be causing a problem here because it is not storing anything in the ApplicationPath variable.  So I traced my way through how config settings are read via the source code.  It lead me to the

Config.vb

file in the DotNetNuke.Common.Utilities namespace which has this line of code:

Dim webConfig As System.Configuration.Configuration = WebConfigurationManager.OpenWebConfiguration(Globals.ApplicationPath)

Notice it uses the Globals.ApplicationPath to get the web.config file for this application.  I then tracked down the Globals.ApplicationPath set statement of the DNN Source Code and found some interesting code in the

App_Code\Global.asax.vb

So I commented out that code below and HARDCODED my application path to mirror the Application Name I created using webfiles.  (see code below).  I believe that some requests were setting the ApplicationPath to "" which would cause the dnn application to try and access a configuration at the root of your website, not within your dnn folder.  Big NO-NO for the machine.config settings on 1and1 Servers.  With 1and1, you can only access files for read/write etc..within your appdomain, not someone elses which is exactly what it thinks you are trying to do accessing something at / instead of /DotNetNuke (in my case).  

Private Sub Application_Start(ByVal Sender As Object, ByVal E As EventArgs)

Dim Server As HttpServerUtility = HttpContext.Current.Server

'global variable initialization

ServerName = Server.MachineName

'FrankT Commented out the if then else below and hardcoded my path:

' If HttpContext.Current.Request.ApplicationPath = "/" Then

'ApplicationPath = ""

' Else

'ApplicationPath = HttpContext.Current.Request.ApplicationPath

'End If

ApplicationPath = "/DotNetNuke"

I've been testing it on and off for about an hour and not one security exception.  I think it was no 7 that did the trick.  I'm not sure why the HttpContext.Current.Request.ApplicationPath is getting set to the root, but my guess is because most of us have a redirect at the root of our 1and1 site to redirect the user to our dnn sub-folder.  I'm not sure the ApplicationPath is being set properly for a 302 redirect??

 

Anyway, hope this helps someone else.  Let me know if this all works.  Like I said, I think the key is opening your App_Code\Global.asax.vb file and hardcoding your 1and1 DNN application path.  BTW,  DO NOT PUT TRAILING / on the Application Path.

 

Frank T


Version: DNN 4.4.1
Hosting Provider: 1and1
RAISE
 
New Post
9/28/2006 9:36 AM
 

Update!!!

Ok.. I totally screwed up my website yesterday and had to start over so it gave me a chance to test the instructions again.

 

1.  I skipped steps 4 and 5.  I don't believe these are necessary now.  I included a new announcements.zip I created in my install\modules folder.  The install worked like a charm. Not one error except for the reports.zip error which is because it's trying to write to the web.config file.  I'm thinking it can't for the same reason we get the security error.  It's trying to write to a web.config that is outside of the application domain.

2.  I had to change some things in the config.vb source code and recompile the dotnetnuke.dll and deploy.  I'm still testing my changes to see if the security error occurs again.

All of the exceptions are related to getting the configuration settings in the web.config file.  These are generating the security errors on 1and1 servers.   Like I said, I think it's because it's trying to access a web.config file using a path that is OUTSIDE of the folder you installed DNN into.  Hmmmmmm...

I apologize in advance and I DON'T WANT TO START A FLAMING thread here.  Are there any plans to  create a DNN baseline in C#?   I hate vb (It's just me, it's nothing against the language.  It's like someone liking broccoli and another person doesn't.  Who's wrong?  NO-ONE) and was wondering if there were any plans to port to C#?

 

 


Version: DNN 4.4.1
Hosting Provider: 1and1
RAISE
 
New Post
10/14/2006 6:28 PM
 

I am having this same problem with 1and1 :)

I've had to hack up quite a bit of the sources and i still get these stupid security exceptions from the web config :)

 
New Post
10/16/2006 11:39 PM
 
Thanks FrankT - modifying the App_Code\Global.asax.vb file by adding the App Path did the trick!
 
New Post
10/18/2006 4:43 PM
 

I also have descended into this hell called 1and1...word to the wise, avoid 1and1 hosting like the plague...

I have 4.3.5 sorta running in a directory per your instructions but I'm still getting the FileIOPermssions error from time to time.  a couple of refreshes - or touching web.config - gets it going again.

FrankT, if you have any updates on what you changed in config.vb, I'd love to give them a try.

Thanks,

Toby

 

 

[SecurityException: Request for the permission of type 'System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.]
   System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark& stackMark, Boolean isPermSet) +0
   System.Security.CodeAccessPermission.Demand() +59
   System.IO.Path.GetFullPath(String path) +98
   System.Web.Util.FileUtil.IsSuspiciousPhysicalPath(String physicalPath, Boolean& pathTooLong) +50
   System.Web.Util.FileUtil.IsSuspiciousPhysicalPath(String physicalPath) +23
   System.Web.CachedPathData.GetConfigPathData(String configPath) +465
   System.Web.CachedPathData.GetConfigPathData(String configPath) +243
   System.Web.CachedPathData.GetConfigPathData(String configPath) +243
   System.Web.CachedPathData.GetVirtualPathData(VirtualPath virtualPath, Boolean permitPathsOutsideApp) +132
   System.Web.HttpContext.GetFilePathData() +27
   System.Web.HttpContext.GetConfigurationPathData() +26
   System.Web.Configuration.HttpConfigurationSystem.System.Configuration.Internal.IInternalConfigSystem.GetSection(String configKey) +36
   System.Configuration.ConfigurationManager.GetSection(String sectionName) +107
   System.Configuration.ConfigurationManager.get_AppSettings() +29
   System.Web.Configuration.WebConfigurationManager.get_AppSettings() +5
   DotNetNuke.Common.Globals.GetDomainName(HttpRequest Request) +60
   DotNetNuke.HttpModules.UrlRewriteModule.OnBeginRequest(Object s, EventArgs e) +4051
   System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +92
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +64

 
Previous
 
Next
HomeHomeGetting StartedGetting StartedInstalling DNN ...Installing DNN ...1and1 DotNetNuke 4.3.51and1 DotNetNuke 4.3.5


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