Some issues setting up 2.2.8.0

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.
4/20/2009 7:00:08 AM
Gravatar
Total Posts 18

Re: Some issues setting up 2.2.8.0

IIS6/7, medium trust, mysql, 2.2.9.6.

Sorry to bring up this post again. I'm the original poster who was having issue with the SharedFiles module.

I've now upgraded the same site to 2.2.9.6. Cleanly delete and upload all again except the Data folder.

However, the SharedFiles problem still exist. Whenever I tried to upload a file, I got this message:

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 error log:

2009-04-20 19:47:51,082 ERROR mojoPortal.Web.Global - 60.48.160.234-en-US - /downloads2.aspx
System.Security.SecurityException: Request for the permission of type 'System.Security.Permissions.EnvironmentPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
at System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark& stackMark, Boolean isPermSet)
at System.Security.CodeAccessPermission.Demand()
at System.IO.Path.GetTempPath()
at Brettle.Web.NeatUpload.FilesystemUploadStorageProvider.GetDefaultTempDirectory()
at Brettle.Web.NeatUpload.FilesystemUploadStorageProvider.GetTempDirectory(NameValueCollection attrs)
at Brettle.Web.NeatUpload.FilesystemUploadedFile.Initialize(FilesystemUploadStorageProvider provider, String controlUniqueID, String fileName, String contentType, UploadStorageConfig storageConfig)
at Brettle.Web.NeatUpload.FilesystemUploadedFile..ctor(FilesystemUploadStorageProvider provider, String controlUniqueID, String fileName, String contentType, UploadStorageConfig storageConfig)
at Brettle.Web.NeatUpload.FilesystemUploadStorageProvider.CreateUploadedFile(UploadContext context, String controlUniqueID, String fileName, String contentType, UploadStorageConfig storageConfig)
at Brettle.Web.NeatUpload.FilesystemUploadStorageProvider.CreateUploadedFile(UploadContext context, String controlUniqueID, String fileName, String contentType)
at Brettle.Web.NeatUpload.UploadStorage.CreateUploadedFile(UploadContext context, String controlUniqueID, String fileName, String contentType, UploadStorageConfig storageConfig)
at Brettle.Web.NeatUpload.UploadStorage.ConvertToUploadedFile(String controlUniqueID, HttpPostedFile file)
at Brettle.Web.NeatUpload.UploadModule.ConvertToUploadedFile(String controlUniqueID, HttpPostedFile file)
at Brettle.Web.NeatUpload.FileControl.InitializeFiles()
at Brettle.Web.NeatUpload.FileControl.OnInit(EventArgs e)
at Brettle.Web.NeatUpload.InputFile.OnInit(EventArgs e)
at System.Web.UI.Control.InitRecursive(Control namingContainer)
at System.Web.UI.Control.InitRecursive(Control namingContainer)
at System.Web.UI.Control.InitRecursive(Control namingContainer)
at System.Web.UI.Control.InitRecursive(Control namingContainer)
at System.Web.UI.Control.InitRecursive(Control namingContainer)
at System.Web.UI.Control.InitRecursive(Control namingContainer)
at System.Web.UI.Control.InitRecursive(Control namingContainer)
at System.Web.UI.Control.AddedControl(Control control, Int32 index)
at System.Web.UI.ControlCollection.Add(Control child)
at mojoPortal.Web.UI.Pages.SiteHome.LoadPage()
at mojoPortal.Web.UI.Pages.SiteHome.Page_Load(Object sender, EventArgs e)
at System.Web.UI.Control.OnLoad(EventArgs e)
at mojoPortal.Web.mojoBasePage.OnLoad(EventArgs e)
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest()
at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context)
at System.Web.UI.Page.ProcessRequest(HttpContext context)
at ASP.default_aspx.ProcessRequest(HttpContext context)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
The action that failed was:
Demand
The type of the first permission that failed was:
System.Security.Permissions.EnvironmentPermission
The Zone of the assembly that failed was:
MyComputer
 

Please help as I need this feature as soon as possible. Or else could you please recommend another workaround or another module which I can use for user to upload files?

Best Regards

4/20/2009 7:03:45 AM
Gravatar
Total Posts 18439

Re: Some issues setting up 2.2.8.0

Hi,

You need to follow the instructions for Medium Trust every time you upgrade. 

Hope it helps,

Joe

4/20/2009 7:47:26 AM
Gravatar
Total Posts 18

Re: Some issues setting up 2.2.8.0

I've followed the document and rename Web.config from Web.MediumTrust.config, and after several checking, the relevant NeatUpload sections does already being commented out, except this part:

<add namespace="Brettle.Web.NeatUpload" assembly="Brettle.Web.NeatUpload" tagPrefix="NeatUpload" />

Do I need to comment this out?

The app_data\NeatUpload_Temp folder does already exist, but I'm having doubt it may not be writable. (since I told my host before only 'Data' folder need to be writable)

If that's the case, how can i explictly specify a different directory using the tempDirectory attribute of the NeatUpload element, as mentioned in the document? (Maybe I can specify it in the Data folder?)

Thanks again.

4/21/2009 8:52:32 PM
Gravatar
Total Posts 18

Re: Some issues setting up 2.2.8.0

Hi, I'm glad to inform that the NeatUpload is working now.

After some checking, it seems like is really caused by my App_data not writable. And by referring the NeatUpload manual, I've successfully specify a different temp directory in Data folder (e.g. Data\Sites\1\MyNeatUpload) using the tempDirectory attribute, but beware the directory needs to be the physical path, and make sure the folder exist.

Here is the spec I wrote for my reference, and wish to share it here in case anyone having the same issue:

NeatUpload
----------------------
1. Set App_Data as writable. Or,

2. If App_Data not writable, modify in Web.config to set temp folder in another writable folder:

Added:
<configuration>
   <configSections>
   ...
     <section name="neatUpload" type="Brettle.Web.NeatUpload.ConfigSectionHandler, Brettle.Web.NeatUpload" allowLocation="true" requirePermission="false"/>
   ...
   </configSections>
</configuration>

Added:
<configuration>
  ...
  <neatUpload xmlns="http://www.brettle.com/neatupload/config/2008" defaultStorageProvider="FilesystemUploadStorageProvider">
    <providers>
      <add name="FilesystemUploadStorageProvider" type="Brettle.Web.NeatUpload.FilesystemUploadStorageProvider"
tempDirectory="C:\Domains\mydomain.com\wwwroot\Data\Sites\1\MyNeatUpload"/>
    </providers>
  </neatUpload>
  ...
</configuration>

Thanks.

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