views:

586

answers:

3

I have dotnetnuke portal on server in /root/dnn and I am creating asp.net app in c# VS2008 that I need to upload on /root/app.

when I deploy my app, it needs to reference dotnetnuke.dll assembly from /root/dnn/bin instead of /root/app/bin.

how can I manage that, without putting app files in /root/dnn?

I tried to set auto-refresh path and then after upload deleting the /root/app/bin/dotnetnuke.dll so that the app tries to reference the missing assembly in ../dnn/bin/dotnetnuke.dll but the "application is not pre-compiled" error pops, so I tried to upload it without pre-compiling, but still the reference couldn't be found.

A: 

After all, I had to upload .aspx and .aspx.cs files in portal folder and bin files in dnn's bin folder, add the few lines from my web.config to dnn's web.config, and change queries to database by writing them from code instead using dataset objects, that is .xsd, .xss files. I also had to copy the code from my App_Code into my .cs files before upload because C# and VS cannot be compiled together in dnn's App_Code.

Ivan
The funny thing with dnn is that I have added a new page through dnn portal and named it Report. Then I added IFrame on that page and the file that I was loading in IFrame was called Report.aspx (from my app). At first I couldn't realize why my page is not showing in IFrame, instead it was recursively showing itself, until I noticed the same names.. :S
Ivan
You can have C# and VB together in the App_Code folder, you just have to add an element to the `codeSubDirectories` element in the web.config for the directory with the C#, so it gets compiled separately.
bdukes
neat. thanks for that information, I hope to remember it for future situations
Ivan
A: 

I think your best bet with what you are trying to do is to install the DotNetNuke.dll into the GAC on the server. I don't believe that ASP.NET/IIS will allow access to any assemblies outside of the current websites folder structure.

Purple Ant
+1  A: 

As Purple Ant said above, either

  1. load the DotNetNuke assembly into the GAC (which is troublesome because it precludes you from being able to XCOPY upgrade DNN later)
  2. Put your app into the DNN application folder (sounds like what you did)
  3. Copy the DNN dll into your app folder. (the most common solution)

What you're thinking of is the <probing privatePath="" /> element of the config file. But I don't think it's available to be used in web apps and (according to the documentation) only works for subfolders.

<configuration>
   <runtime>
      <assemblyBinding>
         <probing privatePath="bin;bin2\subbin;bin3"/>
      </assemblyBinding>
   </runtime>
</configuration>
Eric Falsken