Add DotNet MVC project as virtual directory under Sitefinity

Posted by Community Admin on 05-Aug-2018 09:45

Add DotNet MVC project as virtual directory under Sitefinity Website

All Replies

Posted by Community Admin on 01-Sep-2011 00:00

Hello Team,

I have developed my CMS system using Sitefinity Platform. I have couple of other projects (Applications) which are developed using Asp.net MVC. The projects should be configured as a Virtual directory on production server under the main Sitefinity Website. The structure should be as follow.

Sitefinity Main Website
  >Virtual Directory 1
  >Virtual Directory 2
  >Virtual Directory 3

URL should be like http://mainwebsite/subapp1

I tried to configure one of my application as virtual directory under the main sitefinity site but it is not working.  I am getting below error.

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


It seems that sitefinity tries to handle the request even if the project under the virtual directory is different (not developed on Sitefinity platform).

Looking for your help.

Regards,

Jesse

Posted by Community Admin on 01-Sep-2011 00:00

Hi Jesse
Try wrapping everything in the sitefinity webconfig (except the configsections element) in a location tag.

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

Ryan

Posted by Community Admin on 06-Sep-2011 00:00

Hello Ryan,

Could try the following:

Create an Global.asax file and inside its Application_Start event handler add this code:

Bootstrapper.Initialized += new EventHandler<Telerik.Sitefinity.Data.ExecutedEventArgs>(Bootstrapper_Initialized);

Then create the event handler:

void Bootstrapper_Initialized(object sender, Telerik.Sitefinity.Data.ExecutedEventArgs e)
    RouteTable.Routes.Ignore("Folder");

You can now use the RouteTable.Routes methods to map or ignore your custom routes.

Kind regards,
Lubomir Velkov
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

This thread is closed