Image Gallery problem on shared hosting

Mar 18, 2009 at 2:26 AM
Hi,

Trying to test on Medium trust hosting -  ImageGallery form Template projects. When i trying to set Image the new PopUp opening for selecting image in Uoload folder and i've got this error.
On my localhost all works fine, look like problem with Medium Trust  ? Any thought how to fix this ?

Thanks

Server Error in '/' Application.

Couldn't find any service of the type N2.Edit.FileSystem.IFileSystem

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: N2.N2Exception: Couldn't find any service of the type N2.Edit.FileSystem.IFileSystem

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.

Stack Trace:

[N2Exception: Couldn't find any service of the type N2.Edit.FileSystem.IFileSystem]
N2.Engine.MediumTrust.MediumTrustEngine.Resolve(Type serviceType) +86
N2.Engine.MediumTrust.MediumTrustEngine.Resolve() +59
N2.Edit.Web.FileSiteMapProvider.get_FileSystem() +28
N2.Edit.Web.FileSiteMapProvider.NewNode(String url) +75
N2.Edit.Web.FileSiteMapProvider.GetChildNodes(SiteMapNode node) +737
System.Web.SiteMapNode.get_ChildNodes() +23
System.Web.UI.WebControls.SiteMapDataSource.GetNodes() +363
System.Web.UI.WebControls.SiteMapDataSource.GetTreeView(String viewPath) +32
System.Web.UI.WebControls.SiteMapDataSource.GetHierarchicalView(String viewPath) +29
System.Web.UI.HierarchicalDataSourceControl.System.Web.UI.IHierarchicalDataSource.GetHierarchicalView(String viewPath) +7
System.Web.UI.WebControls.HierarchicalDataBoundControl.GetData(String viewPath) +22
System.Web.UI.WebControls.TreeView.DataBindNode(TreeNode node) +73
System.Web.UI.WebControls.TreeView.PerformDataBinding() +305
System.Web.UI.WebControls.HierarchicalDataBoundControl.PerformSelect() +82
System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +70
System.Web.UI.WebControls.TreeView.DataBind() +4
System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() +82
System.Web.UI.WebControls.TreeView.OnPreRender(EventArgs e) +43
System.Web.UI.Control.PreRenderRecursiveInternal() +86
System.Web.UI.Control.PreRenderRecursiveInternal() +170
System.Web.UI.Control.PreRenderRecursiveInternal() +170
System.Web.UI.Control.PreRenderRecursiveInternal() +170
System.Web.UI.Control.PreRenderRecursiveInternal() +170
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2041


Version Information: Microsoft .NET Framework Version:2.0.50727.1433; ASP.NET Version:2.0.50727.1433
Mar 18, 2009 at 5:51 AM
looks like this problem only for last version 1.4.5, i see there are changes in FileManagemnt since 1.4.4
however still can't fix this for shared hosting yet....
Coordinator
Mar 18, 2009 at 7:08 AM
Sorry for this but you'll need add this to global.asax application_start

N2.Engine.Instance.AddComponentInstance<IFileSystem>(new VirtualPathFileSystem());
Coordinator
Mar 18, 2009 at 6:05 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.