Medium Trust issues ... can anyone help please?

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.
2/13/2007 5:43:02 PM
Gravatar
Total Posts 6

Medium Trust issues ... can anyone help please?

Hi all

I recently downloaded mojoPortal and I am having great difficulty getting it to run. My host runs in Medium Trust using MSSQL2005 and .NET2.

Everything installed fine and the database has been setup with the initial data.
The site instance has been created and when it tries to go to the homepage the page hangs for a while and then the standard windows User Authentication popup is shown.

If I cancel this dialog I get the following error message

Server Error in '/' Application.
Access to the path 'D:\mydomain.co.uk\wwwroot\Data\Sites\1\systemfiles\themecachedependecy.config' is denied.
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.UnauthorizedAccessException: Access to the path 'D:\mydomain.co.uk\wwwroot\Data\Sites\1\systemfiles\themecachedependecy.config' is denied.

ASP.NET is not authorized to access the requested resource. Consider granting access rights to the resource to the ASP.NET request identity. ASP.NET has a base process identity (typically {MACHINE}\ASPNET on IIS 5 or Network Service on IIS 6) that is used if the application is not impersonating. If the application is impersonating via <identity impersonate="true"/>, the identity will be the anonymous user (typically IUSR_MACHINENAME) or the authenticated request user.

To grant ASP.NET access to a file, right-click the file in Explorer, choose "Properties" and select the Security tab. Click "Add" to add the appropriate user or group. Highlight the ASP.NET account, and check the boxes for the desired access.

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:

[UnauthorizedAccessException: Access to the path 'D:\mydomain.co.uk\wwwroot\Data\Sites\1\systemfiles\themecachedependecy.config' is denied.]
mojoPortal.Web.Global.HandleException(Exception ex) +410
mojoPortal.Web.Global.Application_Error(Object sender, EventArgs e) +94
System.EventHandler.Invoke(Object sender, EventArgs e) +0
System.Web.HttpApplication.RaiseOnError() +182


Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.210

Does anyone know a possible solution. I have contacted my host to check security settings on the folders and they are all correctly setup. They have cited a similar issue with DotNetNuke with a URL to the discussion on their forums.

http://www.dotnetnuke.com/Community/ForumsDotNetNuke/tabid/795/forumid/107/threadid/47749/threadpage/1/scope/posts/Default.aspx

TIA

alastair
2/13/2007 5:57:00 PM
Gravatar
Total Posts 18439

Re: Medium Trust issues ... can anyone help please?

Hi Alastair,

The only thing going on during Application_Start that is accessing the file system is logging. To verify if that is the cause of this can you do this?

1. edit log4net.config and set level=OFF
2. type a space in the web.config and upload it to recycle the app.

and let me know if it solves the error.

Thanks,

Joe
2/13/2007 6:06:17 PM
Gravatar
Total Posts 6

Re: Medium Trust issues ... can anyone help please?

No, no change Im afraid.

Alastair
2/13/2007 6:11:30 PM
Gravatar
Total Posts 18439

Re: Medium Trust issues ... can anyone help please?

I would have to add that I'm not convinced of your hosts diagnosis. If you got to the setup page that creates the data, then Application_Start had already fired before you saw the page. So I don't think it has anything to do with Application_Start event.

The only time I ever see a windows login dialog is if IIS is configured for basic authentication or digest authentication. IIS should be configured for anonymous access as authentication happens within the web code.

I would verify does the file at siteroot/Data/Sites/1/systemfiles/themecachedependency.config exist on the disk?
If so then the error is very clear the aspnet user on which the thread is executing does not have permission to access the file. It needs read and write permission and it seems it doesn't have it, nothing ambiguous in the error message.

Hope it helps,

Joe
2/14/2007 2:44:29 AM
Gravatar
Total Posts 6

Re: Medium Trust issues ... can anyone help please?

The files does indeed exist. I will pass your comments back to my host and see what they say.

many thanks

Alastair
2/14/2007 3:52:48 AM
Gravatar
Total Posts 6

Re: Medium Trust issues ... can anyone help please?

My host is adamant that the security settings are as mentioned in above posts.

The host does refer to the DNN issues I mentioned before as the reason for my problems. http://www.dotnetnuke.com/Community/ForumsDotNetNuke/tabid/795/forumid/107/threadid/47749/threadpage/1/scope/posts/Default.aspx
I am afraid I may have to try another CMS as I have already spent 2 weeks trying to get MojoPoertal to work and I am fast running out of time.

Alastair
2/14/2007 7:28:42 AM
Gravatar
Total Posts 18439

Re: Medium Trust issues ... can anyone help please?

2 things are very clear
1. Application_Start is not where this error is happening
2. The thread executing for the request is running in the context of a user that doesn't have permission on the needed files.

The solution is find out what user the thread is executing as and give that user permission.

If it were me, I would try another host rather than another CMS. Being incorrect and adamant is hard to work with.

The hosts listed here work great:

http://www.mojoportal.com/hostingpartners.aspx

Joe
2/14/2007 7:59:18 PM
Gravatar
Total Posts 18439

Re: Medium Trust issues ... can anyone help please?

Hi Alastair,

I did some further research and I think I may have found a possible cause in mojoPortal for this error.

Have you already switched to another CMS or Host or if I were to send you a set of files could you test and see if it solves the problem?

Best Regards,

Joe
2/15/2007 2:42:29 AM
Gravatar
Total Posts 6

Re: Medium Trust issues ... can anyone help please?

If you think you have a result then I can reinstate the original installation in a hour on the host server.

Do send the files...

cheers

Alastair
2/15/2007 10:02:47 AM
Gravatar
Total Posts 18439

Re: Medium Trust issues ... can anyone help please?

Hi Alastair,

Sorry for the delay, I just sent the files.

Please let me know if it solves the problem or not.

Thanks,

Joe
2/21/2007 5:01:24 AM
Gravatar
Total Posts 6

Re: Medium Trust issues ... can anyone help please?

Problems now solved and it is working fine.

Just one issue though...the Feature Modules, Webpart Installation and URL Manager pages return a HTTP 404 error.

Does anyone have any ideas?

cheers

Alastair
2/21/2007 7:49:25 AM
Gravatar
Total Posts 18439

Re: Medium Trust issues ... can anyone help please?

I'm not sure what is causing that. If you want to email me login info so I can look at it I will take a look and try to figure it out.

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