MojoPortal Web Files stored in DFS Share

This is the place to report bugs and get support. When posting in this forum, please always provide as much detail as possible.

Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum, do not report it as a bug.

This is the place to report bugs and get support

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.
Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum.
3/15/2017 11:47:47 AM
Gravatar
Total Posts 3

MojoPortal Web Files stored in DFS Share

I am having an issue with MojoPortal when storing the web files for the site on a remote file share that is a DFS path.  For instance, if I configure the path for the site to \\domain.com\web\my_mojoportal_site, the site does not render when browsing it as a normal user.  If I log into MojoPortal however, the site renders perfectly.

All of my permissions for the remote share work as expected.  Other content management systems that I use which are hosted in the same share also render without any issue.

My web server is Windows Server 2012 R2.  The database is SQL Server 2008 R2.  MojoPortal version is 2.3.9.4.  The .Net Framework version is v4.0.30319.

3/15/2017 12:05:19 PM
Gravatar
Total Posts 1992

Re: MojoPortal Web Files stored in DFS Share

Hi,

How do you login if the site doesn't render as a regular (unauthenticated) user?

Thanks,
Joe 

3/15/2017 12:13:19 PM
Gravatar
Total Posts 1188
Proud member of the mojoPortal team

Help support mojoPortal!
Add-on modules

Re: MojoPortal Web Files stored in DFS Share

I think we need a little more information to be able to help you. Can you describe exactly what happens when you say the site "does not render?" Do you receive a blank page? A partial page? Something else? Also, is there anything captured in your mojoPortal site log that might help? The Basic Troubleshooting document may help as well.

Jamie

3/15/2017 12:52:34 PM
Gravatar
Total Posts 3

Re: MojoPortal Web Files stored in DFS Share

Apologies, I should have elaborated a bit more on the issues.

The site renders partially, looks like all the HTML content works fine.  Images, Script Files and some style sheets don't seem to load.  The link to login still appears and the login form renders fine which is how I am able to login.  Once logged in, all the images, scripts and style sheets load properly and I am able to browse the site.  If I then log out, I can browse the site unauthenticated most likely because all the resources are cached.  If i clear my cache, the issue returns.

If enter the URL http://www.mysite.com, I am immediately directed to /login.aspx?ReturnURL=%2f.  I then get a message saying that the page cannot be found.  When I click on my "Sign-In" link, I'm taken to /Secure/Login.aspx?returnurl=/Default.aspx.  The login form renders correctly (no images still) and I'm able to login.  Once logged in, I'm taken to the home page of the site and page looks exactly as it's supposed too.

In the MojoPortal log, there are the following entries (3 extracted):

 

2017-03-15 19:01:08,716 ERROR 174.2.181.204 - en-CA - /login.aspx?ReturnUrl=%2fData%2fSites%2f1%2fImages%2fHeader%2fbanner2b.jpg - mojoPortal.Web.PageNotFoundHttpModule - Referrer(http://www.mysite.com/Secure/Login.aspx?returnurl=/Default.aspx)  PageNotFoundHttpModule handled error.
System.Web.HttpException (0x80004005): The file '/login.aspx' does not exist.
   at System.Web.UI.Util.CheckVirtualFileExists(VirtualPath virtualPath)
   at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate)
   at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate)
   at System.Web.Compilation.BuildManager.GetVirtualPathObjectFactory(VirtualPath virtualPath, HttpContext context, Boolean allowCrossApp, Boolean throwIfNotFound)
   at System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath virtualPath, Type requiredBaseType, HttpContext context, Boolean allowCrossApp)
   at System.Web.UI.PageHandlerFactory.GetHandlerHelper(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath)
   at System.Web.UI.PageHandlerFactory.GetHandler(HttpContext context, String requestType, String virtualPath, String path)
   at System.Web.HttpApplication.MaterializeHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
2017-03-15 19:01:08,736 ERROR 174.2.181.204 - en-CA - /login.aspx?ReturnUrl=%2fdata%2fstyle%2fnivoslider%2fnivo-slider.css - mojoPortal.Web.PageNotFoundHttpModule - Referrer(none)  PageNotFoundHttpModule handled error.
System.Web.HttpException (0x80004005): The file '/login.aspx' does not exist.
   at System.Web.UI.Util.CheckVirtualFileExists(VirtualPath virtualPath)
   at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate)
   at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate)
   at System.Web.Compilation.BuildManager.GetVirtualPathObjectFactory(VirtualPath virtualPath, HttpContext context, Boolean allowCrossApp, Boolean throwIfNotFound)
   at System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath virtualPath, Type requiredBaseType, HttpContext context, Boolean allowCrossApp)
   at System.Web.UI.PageHandlerFactory.GetHandlerHelper(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath)
   at System.Web.UI.PageHandlerFactory.GetHandler(HttpContext context, String requestType, String virtualPath, String path)
   at System.Web.HttpApplication.MaterializeHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
2017-03-15 19:01:08,862 ERROR 174.2.181.204 - en-CA - /login.aspx?ReturnUrl=%2fData%2fSites%2f1%2fImages%2flogo1.png - mojoPortal.Web.PageNotFoundHttpModule - Referrer(http://www.mysite.com/Secure/Login.aspx?returnurl=/Default.aspx)  PageNotFoundHttpModule handled error.
System.Web.HttpException (0x80004005): The file '/login.aspx' does not exist.
   at System.Web.UI.Util.CheckVirtualFileExists(VirtualPath virtualPath)
   at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate)
   at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate)
   at System.Web.Compilation.BuildManager.GetVirtualPathObjectFactory(VirtualPath virtualPath, HttpContext context, Boolean allowCrossApp, Boolean throwIfNotFound)
   at System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath virtualPath, Type requiredBaseType, HttpContext context, Boolean allowCrossApp)
   at System.Web.UI.PageHandlerFactory.GetHandlerHelper(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath)
   at System.Web.UI.PageHandlerFactory.GetHandler(HttpContext context, String requestType, String virtualPath, String path)
   at System.Web.HttpApplication.MaterializeHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
2017-03-15 19:01:08,943 ERROR 174.2.181.204 - en-CA - /login.aspx?ReturnUrl=%2fData%2fSites%2f1%2fImages%2fHeader%2fbanner1b.jpg - mojoPortal.Web.PageNotFoundHttpModule - Referrer(http://www.mysite.com/Secure/Login.aspx?returnurl=/Default.aspx)  PageNotFoundHttpModule handled error.
System.Web.HttpException (0x80004005): The file '/login.aspx' does not exist.
   at System.Web.UI.Util.CheckVirtualFileExists(VirtualPath virtualPath)
   at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate)
   at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate)
   at System.Web.Compilation.BuildManager.GetVirtualPathObjectFactory(VirtualPath virtualPath, HttpContext context, Boolean allowCrossApp, Boolean throwIfNotFound)
   at System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath virtualPath, Type requiredBaseType, HttpContext context, Boolean allowCrossApp)
   at System.Web.UI.PageHandlerFactory.GetHandlerHelper(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath)
   at System.Web.UI.PageHandlerFactory.GetHandler(HttpContext context, String requestType, String virtualPath, String path)
   at System.Web.HttpApplication.MaterializeHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

 

The above 3 entries exist for every image or resource file associated with the site.  These errors stop once logged in.

I hope this helps in finding the cause.

3/15/2017 4:25:18 PM
Gravatar
Total Posts 1188
Proud member of the mojoPortal team

Help support mojoPortal!
Add-on modules

Re: MojoPortal Web Files stored in DFS Share

In my own experience, it's the ApplicationPoolIdentity user permissions that drive whether IIS can render the site. That user should have read (and sparing write) access to the local (or in your case, UNC path) folder where mojoPortal is installed. This is pretty well documented in the IIS Web Setup. That said, I've never actually tried running IIS across a UNC path before.

The only thing I could imagine that would cause the web server to behave differently depending on who is logged in would be some kind of pass-through authentication, like maybe using Windows Authentication (different than Active Directory authentication).

I also found this other discussion about the ApplicationPoolIdentity user and file system rights that could be a good reference. It's a tricky configuration to get right, but it's very important for the overall security of your website.

I hope that helps.

3/16/2017 6:26:48 AM
Gravatar
Total Posts 3

Re: MojoPortal Web Files stored in DFS Share

Hi Jamie,

I do not think that my issues are related to the IIS Application Pool Identity.  I have configured the Application Pool to use a domain account which has the necessary access.  I have also configured the Web Application to use the IIS Application Pool Identity when connecting to the Share.  There is a test button in the dialog where you set the path of the Web Application and when running the test, both the Authentication and Authorization tests pass.

If the Application Pool Identity did not have access to the web files, then the site would not render at all as opposed to rendering partially.  The correct rendering of the site would also not work even if logged in as whether logged into MojoPortal or not, the same application pool identity is used.

What interests me the most is the fact that the errors previously posted are trying to access /Login.Aspx however this page definitely does not exist when I look at the files.  The Login.aspx page is in the path /Secure/Login.aspx.

I am busy looking into one of the links referenced by IIS Web Setup article and see if I can find a System.Security.SecurityException error anywhere.  So far I have not seen any errors like that.

I hope that provides additional insight.

3/16/2017 7:46:40 AM
Gravatar
Total Posts 18444

Re: MojoPortal Web Files stored in DFS Share

sometimes I think we tend to latch on to a specific detail and think it must be the most important thing, in this case the fact that the files are on a DFS share, it may be important but maybe not related at all

This thread seems very familiar, feel like I've participated in this conversation before and am fairly sure there are multiple cases of similar problems in these forums. From a quich search I found this thread which may help, but I'm sure it isn't the only one.

especially make sure the site is configured for anonymous and windows authentication. something different after login makes me think that is not configured correctly

3/16/2017 10:27:51 AM
Gravatar
Total Posts 1992

Re: MojoPortal Web Files stored in DFS Share

Hi,

I've run into this issue before with being redirected to 'login.aspx'. It only happens when the "Anonymous Authentication" user isn't set properly.

Open IIS and go to the website in question. Once there, under IIS, double-click the "Authentication" icon. Next, select "Anonymous Authentication" and click the "Edit" link in the Actions pane. The user specified here needs to match the user used for the application pool and the user used for the "connect as" user on the Basic Settings for the site.

You could set the Application Pool Identity and then configure the "Anonymous Authentication" to use "Application pool identity" and the "Connect As" user on the Basic Settings to be "Application user". Doing this will ensure that all three are using the same thing and you don't have to update the user in three places if the user needs to change for some reason. 

Hope this helps,
Joe