Virtual directory under mojoPortal without application

If you have questions about using mojoPortal, you can post them here.

You may want to first review our site administration documentation to see if your question is answered there.

This thread is closed to new posts. You must sign in to post in the forums.
5/2/2012 2:30:14 PM
Gravatar
Total Posts 52

Virtual directory under mojoPortal without application

Hello,

I am trying to place a virtual directory that point to a different location in my server at the root of a mojoPortal site. This directory only contains files that should be accessed from any external location for downloading. The need to be a virtual directory is to be able to share it through ftp without allowing uploading users to access the whole site. 

If I create a real directory everything works fine for downloading, but when its a virtual path the application tries to treat it as if it where part of the application and shows an error when trying to access to it.

I have try to place a web.config file in the real path of the virtual directory to avoid inheritance as seen in some post but it seems to do nothing, it still treats it as if it where an application request. Is there anyway of avoiding this behavior?

Thanks,

Carlos 

5/2/2012 2:40:07 PM
Gravatar
Total Posts 52

Re: Virtual directory under mojoPortal without application

Also the other reason for having it outside site structure is for not having this files included in site backups because there are many large files.

5/3/2012 7:24:57 AM
Gravatar
Total Posts 18439

Re: Virtual directory under mojoPortal without application

Hi,

You did not post any error details so it is hard to know what the problem is. Maybe the solution on this thread will help you, I don't think you should put a web.config file in that folder if it is not an application. I would recommend making it just a virtual directory not an application if it only contains files.

Hope that helps,

Joe

5/6/2012 8:01:41 AM
Gravatar
Total Posts 52

Re: Virtual directory under mojoPortal without application

Sorry for the incomplete post.

My configuration is a virtual directory called "prueba" placed in the root of the site that points to another path in the server. The rights over the path has been set to allow read permission to the web service user and the asp.net service user (the same rights that are assigned to the site path). There is a file inside the folder called "prueba.txt"

When I request the URL "http://www.clemkey.com/prueba/prueba.txt" it changes to "http://www.clemkey.com/prueba/Error.htm?aspxerrorpath=/prueba/prueba.txt" and you get the 500 code error.

500 - Internal server error.
There is a problem with the resource you are looking for, and it cannot be displayed.

This happens when there is a web.config file in the "prueba" folder with the following content:

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<directoryBrowse enabled="false" />
</system.webServer>
<system.web>
<customErrors />
</system.web>
<location inheritInChildApplications="false">
<system.webServer>
<validation validateIntegratedModeConfiguration="false" />
<!-- ... -->
</system.webServer>
</location>
</configuration>

And also happens without the "location" section.

If I remove the web.config then the error turns to:


We're sorry but a server error has occurred while trying to process your request.

The error has been logged and will be reviewed by our staff as soon as possible. It is possible that the error was just a momentary hiccup and you may wish to use the back button and try again or go back to the home page.

And the URL comes as: "http://www.clemkey.com/Error.htm?aspxerrorpath=/prueba/prueba.txt"

Thanks for your help,

Carlos

5/6/2012 9:08:25 AM
Gravatar
Total Posts 18439

Re: Virtual directory under mojoPortal without application

location element needs to be in the parent level web.config not in the child folder.

5/6/2012 2:28:19 PM
Gravatar
Total Posts 52

Re: Virtual directory under mojoPortal without application

Thanks for your help, I was able to finally achieve my goal. It took me a while to understand that the location tag had to be placed around the root system.web and system.webserver as:

<location path="." inheritInChildApplications="false">
  <system.web>
......
  </system.web>
   <system.webServer>
                ......
  </system.webServer>
</location>

Now it works perfectly and only need to remember this changes when upgrading mojoPortal.

Thanks,

Carlos

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