Cant access custom app under Mojoportal root

Post here for help with installing or upgrading mojoPortal pre-compiled release packages. When posting in this forum, please provide all relevant details. You may also want to review the installation or upgrading documentation.

If you have questions about using the source code or working with mojoPortal in Visual Studio, please post in the Developer forum.

Post here for help with installation of mojoPortal pre-compiled release packages

When posting in this forum, please try to provide as many relevant details as possible. Particularly the following:

  • What operating system were you running when the bug appeared?
  • What database platform is your site using?
  • What version of mojoPortal are you running?
  • What version of .NET do you use?
  • What steps are necessary to reproduce the issue? Compare expected results vs actual results.

You may also want to review the installation or upgrading documentation.

If you have questions about using the source code or working with mojoPortal in Visual Studio, please post in the Developer forum.

This thread is closed to new posts. You must sign in to post in the forums.
9/13/2011 9:23:38 AM
Gravatar
Total Posts 83
-- Joe

Cant access custom app under Mojoportal root

I am helping a non-profit move from an old CMS (Subdreamer) on a different host provider to Mojoportal on DiscountASP.NET.

The Mojoportal CMS is installed in the folder /Mojoportal under the root.  ex: www.mysite.org/Mojoportal 

I also have another custom coded application under the root  www.mysite.org/CustomApp

Right now all is fine.

As we are ready to switch to Mojoportal CMS, I copied the folder structure from under /Mojoportal to the root.  Mojoportal CMS worked fine.

The problem is I cannot access my Custom application now.  www.mysite.org/CustomApp  The CustomApp is setup as an Application is IIS - and I removed the Application setup for www.mysite.org/Mojoportal

So I moved the Mojoportal folder structure back under /Mojoportal and all works fine again.

Does anyone know why I cant acces my CustomApp when under Mojoportal? 

The error was a generic one from DiscountASP.NET   I dont have the exact message now (as I moved it all back) but it was basically like "Sorry we are having problems with this application.  Please contact our support department for assistance"

Thanks in advance for any help!

-- Joe

 

9/13/2011 9:30:48 AM
Gravatar
Total Posts 18439

Re: Cant access custom app under Mojoportal root

Hi,

See the links in the first item of our Developer FAQ.

Also regarding moving a site from a sub directory to root you should probably review the article Moving an Installation of mojoPortal to a Different Server, even though it is not a different server in this case the notes about moving a site still apply.

Hope that helps,

Joe

9/13/2011 10:18:46 AM
Gravatar
Total Posts 83
-- Joe

Re: Cant access custom app under Mojoportal root

Thanks Joe - I will try that tonight.  It would seem that i need to add <location inheritInChildApplications="false"> to allow my CustomApp to work.

BTW - really starting to love Mojoportal.  Thank you for your amazing work on it.

10/24/2011 10:21:00 AM
Gravatar
Total Posts 83
-- Joe

Re: Cant access custom app under Mojoportal root

After I moved the MojoPortal files to the root, and edited the Mojoportal WEB.CONFIG file adding the section:

<location path="." inheritInChildApplications="false">
</location>

around the <system.web>...</system.web> section. 

Would anyone know why I now get the following error in my sub application?

Server Error in '/MyCustomApp' Application.

Could not load file or assembly 'mojoPortal.Web' or one of its dependencies. The system cannot find the file specified.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.IO.FileNotFoundException: Could not load file or assembly 'mojoPortal.Web' or one of its dependencies. The system cannot find the file specified.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Assembly Load Trace: The following information can be helpful to determine why the assembly 'mojoPortal.Web' could not be loaded.

WRN: Assembly binding logging is turned OFF.To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.Note: There is some performance penalty associated with assembly bind failure logging.To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

Stack Trace:

[FileNotFoundException: Could not load file or assembly 'mojoPortal.Web' or one of its dependencies. The system cannot find the file specified.] System.RuntimeTypeHandle._GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark, Boolean loadTypeFromPartialName) +0 System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark) +64 System.RuntimeType.PrivateGetType(String typeName, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark) +58 System.Type.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase) +65 System.Web.Compilation.BuildManager.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase) +342 System.Web.Configuration.ConfigUtil.GetType(String typeName, String propertyName, ConfigurationElement configElement, XmlNode node, Boolean checkAptcaBit, Boolean ignoreCase) +52

10/25/2011 7:43:43 AM
Gravatar
Total Posts 18439

Re: Cant access custom app under Mojoportal root

are you sure the app folder is configured as an application not just a folder or virtual directory?

I would try removing that path attribute from the location element or set it to match the folder name like /foldername/

you may also need to wrap a location element around system.webServer section

Hope that helps,

Joe

10/26/2011 2:09:25 PM
Gravatar
Total Posts 83
-- Joe

Re: Cant access custom app under Mojoportal root

So in removed the application configuration from IIS - and received a more generic web.config error "An error occurred reading the integrated module list from system.webServer/modules. The error is 0x80070021."

Then I setup the app again "This folder is setup as a web application" and received the same error "Server Error in '/MyCustomApp' Application. Could not load file or assembly 'mojoPortal.Web' or one of its dependencies. The system cannot find the file specified."

Restarted the IIS server and also recycled the app pool.  No luck.

Removed the path="*" from the <location> tag, no luck.

Unwrapped the <location> tag from <system.web> (<location inheritInChildApplications="false"></location>) no luck.

In all cases Mojoportal is working either at the root or in the /mojoportal subfolder I created - and myCustomApp is only working when Mojoportal is in the subfolder.

Any other ideas?

 

10/27/2011 11:58:29 AM
Gravatar
Total Posts 18439

Re: Cant access custom app under Mojoportal root

I would make sure both apps are using the same version of .NET, ie if one is .NET 4 and the other is .NET 3.5 it might cause problems such as this. I'd use an Integrated Application pool by preference but I'd also try a Classic app pool and see if it makes any difference.

Hope that helps,

Joe

11/30/2011 10:01:40 AM
Gravatar
Total Posts 83
-- Joe

Re: Cant access custom app under Mojoportal root

Both apps are .NET 3.5

I've tried Integrated Application Pool and Classic - no luck

Any other ideas? 

1/13/2012 10:54:15 AM
Gravatar
Total Posts 83
-- Joe

Re: Cant access custom app under Mojoportal root

Upgraded to the latest version and tried this again and BINGO!  It works now!  Ahhh the relief!  Thanks for all the help

 

2/7/2012 9:01:11 AM
Gravatar
Total Posts 30

Re: Cant access custom app under Mojoportal root

I just upgraded to the latest version of mojoportal and instantly my custom app failed.

After searching through this forum I kept landing on this thread over and over until I found another thread that indicated what I had to do.  I've added a reply here because this is where google kept sending me. Probably because I'm also with DiscountASP.Net (which is normally rocking for MojoPortal hosting).

In addition to the <location path="."  inheritInChildApplications="false"> around <system.web>  tag

I also needed this:

<location inheritInChildApplications="false"> around  <system.webServer>

At that point everything just worked.  Otherwise I kept getting:

"Could not load file or assembly 'mojoPortal.Web' or one of its dependencies." as per Joe Vago's post.

2/7/2012 9:08:24 AM
Gravatar
Total Posts 18439

Re: Cant access custom app under Mojoportal root

This is also mentioned in our Developer FAQ.

Best,

Joe

2/7/2012 3:15:12 PM
Gravatar
Total Posts 30

Re: Cant access custom app under Mojoportal root

No - that article and the links don't mention system.webserver.  Both only mention system.web, which is all that was required with the previous version of mojoportal I had installed (or maybe more accurately, it is all that was required with the previous web.config).

Here's the only reference where I can see you wrote that the location wrapper "should also wrap system.webserver section"

http://www.mojoportal.com/Forums/Thread.aspx?pageid=5&mid=34&ItemID=9&thread=6206&pagenumber=1

I couldn't find that requirement for system.webserver listed anywhere else.

Can I suggest that you add in the location tags in the distributed web.confg?  That ensures that ASP.Net applications will work under mojoportal without affecting the running of mojoportal and without the developer having to touch the web.config to make it happen.

Thanks again for a great product,

Philip

2/8/2012 9:26:14 AM
Gravatar
Total Posts 18439

Re: Cant access custom app under Mojoportal root

Hi Philip,

The Developer FAQ does indeed mention it, though the linked articles may not since they are older and system.webServer was a new thing introduced in IIS 7. I only mentioned it because I knew I had updated the Developer FAQ not long ago after someone else noticed it was not mentioned.

Adding it to the shipped web.config seems like a very good idea. I just need to test that there are no problems having that when it is not a root level app. As long as I find no problems with it I will do that for the next release.

Best,

Joe

2/26/2012 10:57:14 AM
Gravatar
Total Posts 18439

Re: Cant access custom app under Mojoportal root

Update, I encountered a problem when including these location elements by default. It breaks NeatUpload multi file selection and upload and causes script errors on pages that use the NeatUpload multi file control.

Therefore I'm backing this change out of the main Web.config files used for Full Trust hosting (in the source code repository since this change has not made it into an offical release package yet). I will leave it in the Web.config file files for medium trust since NeatUpload cannot work in medium trust anyway.

Our packages for MS SQL and SQL CE ship pre-configured for medium trust so it will be there by default in the next release but it will not be there in packages for other databases nor in the Web.fulltrust.config files since it causes this problem.

I've got my eye on an alternative upload solution, but unfortunately it does not support multi file selection in IE whereas NeatUpload does support it but uses Flash (swfupload) to make multi file selection possible. Once IE 10 ships it should be able to do multi file selection without Flash and at that point we may move away from NeatUpload. At that point we can re-visit this and put the locaiton elements back in by default.

Best,

Joe

You must sign in to post in the forums. This thread is closed to new posts.