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

HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...get a separate application that does NOT use DNN to work in the same domainget a separate application that does NOT use DNN to work in the same domain
Previous
 
Next
New Post
11/10/2006 9:06 AM
 
Good day,

My domain name points to a folder on my webhost, \MyAccount\domainname.com and I have installed DNN there. Prior to installing DNN, I had 2 other applications installed at \MyAccount\App1 and \MyAccount\App2, with the main website accessible by www.domainname.com, and the other apps accessible via www.domainname.com\App1 and www.domainname.com\App2. After installing DNN, I now get the following error when attempting to access either app1 or 2 : "The type or namespace name 'DotNetNuke' could not be found (are you missing a using directive or an assembly reference?)"

Seeing this, I copied the DNN \bin folder from \MyAccount\domainname.com\bin to \MyAccount\App1\bin, but this does
not work. I instead get an 'Unauthorised access' error thrown by the server while attempting to write to some sort of
exception log - unfortunately, my web host provider refuses to fix this error, so I can't fix the error that caused it
in the first place.

In addition, I copied my application to the \MyAccount\domainname.com\App1 folder with the same result (even
after changing the virtual directory to point to the new folder).

Any ideas on how to get a separate application that does NOT use DNN to work in the same domain? I'm maxed out in terms of ideas and I'm certain other people have come across the same problem...

Thanks,
Ryan
 
New Post
11/10/2006 1:14 PM
 

I spent many hours pulling out my hair last weekend as I attempted to (and was finally successful) get a legacy ASP.NET application to run alongside DNN 4.3.5 in a folder (setup as a virtual directory) beneath the DNN application's root folder.  A search for threads relating to this task turned up few suggestions. The task was made even more complicated by the need of the legacy application to do its own very simple Forms Authentication.  The two main points to remember are that:

1. The application running in a sub-folder under the DNN root folder will inherit the web.config of its parent folder.
2. This is especially problematic in regards to the httpHandlers and httpModules that are added in the DNN web.config.
3. Even if the application running in the sub-folder (virtual directory) removes the DNN httpHandlers and httpModules in its own web.config, the related  httpModules .dll files must be copied into a /bin folder in the sub-application's folder as they will be referenced before the application's web.config removes them.
4. If directory names have been added to the <compilation><codeSubDirectories> node in the DNN web.config, they must be repeated (and can be left empty) in the sub-application. 
5. If the sub-application needs to do its own Forms Authentication, it's web.config must specify a different authentication cookie name than that used by the DNN application.

With this in mind, my folder structure looks like this:

domainname.org/public-html
                              /bin - DNN's bin folder
                              /portals - DNN's portals folder
                              . . . other DNN folders and files
                             default.aspx - DNN's default page
                             web.config - DNN's configuration file

                             /myapplication - sub-application's folder (set up as virtual directory)
                                        /bin - sub-application's bin folder including all httpModules (all DotNetNuke.HttpModules.????.dll) copied from DNN's bin folder
                                        /App_Code
                                              /Reports - empty directory necessary to satisfy parent web.config <codeSubDirectories> specification
                                        /login
                                             login.aspx
                                       default.aspx - sub-application's default page
                                       ... other sub-application files and folders
                                       web.config - sub-application's configuration file (see below)

The next key to getting this to work was how the sub-application's web.config is set up:

<?xml version="1.0" encoding="utf-8" ?>
  <
configuration>
    <
system.web>
     
<authentication mode="Forms">
         <
forms
            
loginUrl = "login/login.aspx"
            
name = ".SUBAPPAUTH">
            <
credentials passwordFormat="MD5">
                 <
user name="xxxxxx" password="xxxxxx"></user>
            </
credentials>
        </
forms>
      </
authentication>
      <
authorization>
          <
deny users="?" />
      </
authorization>

      <httpModules>
          <
remove name="UrlRewrite" />
          <
remove name="Exception" />
          <
remove name="UsersOnline" />
          <
remove name="DNNMembership" />
          <
remove name="Personalization" />
      </
httpModules>

      <httpHandlers>
          <
remove verb="GET" path="FtbWebResource.axd" />
          <
remove verb="*" path="*.captcha.aspx" />
          <
remove verb="*" path="LinkClick.aspx" />
      </
httpHandlers>
   </
system.web>

   <location path="login">
       <
system.web>
          <
authorization>
              <
allow users="*" />
          </
authorization>
       </
system.web>
   </
location>
</configuration>

I hope that I didn't leave anything out and this will be of assistance!


Bill, WESNet Designs
Team Lead - DotNetNuke Gallery Module Project (Not Actively Being Developed)
Extensions Forge Projects . . .
Current: UserExport, ContentDeJour, ePrayer, DNN NewsTicker, By Invitation
Coming Soon: FRBO-For Rent By Owner
 
New Post
11/10/2006 4:42 PM
 
I can CERTAINLY understand the hair-pulling part!!

I'm gonna try this out this weekend for sure - will make sure to post back whether it works or not...

Thanks a LOT man!
 
New Post
1/8/2007 9:33 PM
 

Hello Imagemaker,

thanks a lot for the very usefull post !

Here are two points I'd like to add:

1) you did not note in your web.config example how to remove the codeSubDirectories. I tried the following, but it does not work :-(

<codeSubDirectories>
<clear/>
</codeSubDirectories>

2) You did not mention that we have to remove the namespaces. Here is how I did it :

<system.web>
<pages>
<namespaces>
<remove namespace="DotNetNuke.Services.Localization"/>
<remove namespace="DotNetNuke.Entities.Users"/>
<remove namespace="DotNetNuke"/>
<remove namespace="DotNetNuke.Common"/>
<remove namespace="DotNetNuke.Data"/>
<remove namespace="DotNetNuke.Framework"/>
<remove namespace="DotNetNuke.Modules"/>
<remove namespace="DotNetNuke.Security"/>
<remove namespace="DotNetNuke.Services"/>
<remove namespace="DotNetNuke.UI"/>
<remove namespace="DotNetNuke.Entities.Portals"/>
<remove namespace="DotNetNuke.Common.Utilities"/>
<remove namespace="DotNetNuke.Services.Exceptions"/>
<remove namespace="DotNetNuke.Entities.Tabs"/>
</namespaces>
</pages>
</system.web>

And with this it works fine.

Thanks a lot.

Regards,
Fabian

 
New Post
1/9/2007 7:55 AM
 
As you found, I could not remove the codeSubDirectories so recreated the same directory structure under the second application's virtual directory but left them empty.  I did not have to remove the namespaces, probably because they did not conflict with those in my sub application.  It's good to know for future reference that the <remove . . . /> tag works for these.

Bill, WESNet Designs
Team Lead - DotNetNuke Gallery Module Project (Not Actively Being Developed)
Extensions Forge Projects . . .
Current: UserExport, ContentDeJour, ePrayer, DNN NewsTicker, By Invitation
Coming Soon: FRBO-For Rent By Owner
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...get a separate application that does NOT use DNN to work in the same domainget a separate application that does NOT use DNN to work in the same domain


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