image gallery (simple folder version) on medium trust

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.
This thread is closed to new posts. You must sign in to post in the forums.
11/30/2009 10:23:26 AM
Gravatar
Total Posts 4

image gallery (simple folder version) on medium trust

Hi everyone.
I've just manage to get my site up and running (www.marinodellapuppa). At the moment, just in Italian language.

The database platform is MSSQL and the mojoPortal version is 2.3.3.0.


I would like to create an image gallery (simple folder version) in a way that only registered users can view a particular foldergallery sub directory.
This works perfectly on my local machine, but when I try to do this in my real environment I got an error I provide here:



Assembly o AppDomain con errori:

Brettle.Web.NeatUpload, Version=1.3.3520.16252, Culture=neutral, PublicKeyToken=null

Metodo che ha causato il problema:

System.IO.DirectoryInfo GetDefaultTempDirectory()

Area dell'assembly con errori:

MyComputer

URL dell'assembly con errori:

file:///D:/inetpub/webs/marinodellapuppait/bin/Brettle.Web.NeatUpload.DLL

2009-11-30 17:15:47,668 ERROR mojoPortal.Web.Global - 151.84.165.65-it-IT - /FolderGallery/Edit.aspx?mid=25&pageid=15

System.Security.SecurityException: Richiesta di autorizzazione di tipo 'System.Security.Permissions.EnvironmentPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' non soddisfatta.

in System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark& stackMark, Boolean isPermSet)

in System.Security.CodeAccessPermission.Demand()

in System.IO.Path.GetTempPath()

in Brettle.Web.NeatUpload.FilesystemUploadStorageProvider.GetDefaultTempDirectory()

in Brettle.Web.NeatUpload.FilesystemUploadStorageProvider.GetTempDirectory(NameValueCollection attrs)

in Brettle.Web.NeatUpload.FilesystemUploadedFile.Initialize(FilesystemUploadStorageProvider provider, String controlUniqueID, String fileName, String contentType, UploadStorageConfig storageConfig)

in Brettle.Web.NeatUpload.FilesystemUploadedFile..ctor(FilesystemUploadStorageProvider provider, String controlUniqueID, String fileName, String contentType, UploadStorageConfig storageConfig)

in Brettle.Web.NeatUpload.FilesystemUploadStorageProvider.CreateUploadedFile(UploadContext context, String controlUniqueID, String fileName, String contentType, UploadStorageConfig storageConfig)

in Brettle.Web.NeatUpload.FilesystemUploadStorageProvider.CreateUploadedFile(UploadContext context, String controlUniqueID, String fileName, String contentType)

in Brettle.Web.NeatUpload.UploadStorage.CreateUploadedFile(UploadContext context, String controlUniqueID, String fileName, String contentType, UploadStorageConfig storageConfig)

in Brettle.Web.NeatUpload.UploadStorage.ConvertToUploadedFile(String controlUniqueID, HttpPostedFile file)

in Brettle.Web.NeatUpload.UploadModule.ConvertToUploadedFile(String controlUniqueID, HttpPostedFile file)

in Brettle.Web.NeatUpload.FileControl.InitializeFiles()

in Brettle.Web.NeatUpload.FileControl.get_Files()

in Brettle.Web.NeatUpload.FileControl.OnUnload(EventArgs e)

in System.Web.UI.Control.UnloadRecursive(Boolean dispose)

in System.Web.UI.Control.UnloadRecursive(Boolean dispose)

in System.Web.UI.Control.UnloadRecursive(Boolean dispose)

in System.Web.UI.Control.UnloadRecursive(Boolean dispose)

in System.Web.UI.Control.UnloadRecursive(Boolean dispose)

in System.Web.UI.Control.UnloadRecursive(Boolean dispose)

in System.Web.UI.Control.UnloadRecursive(Boolean dispose)

in System.Web.UI.Control.UnloadRecursive(Boolean dispose)

in System.Web.UI.Page.UnloadRecursive(Boolean dispose)

in System.Web.UI.Page.ProcessRequestCleanup()

in System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

in System.Web.UI.Page.ProcessRequest()

in System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context)

in System.Web.UI.Page.ProcessRequest(HttpContext context)

in ASP.foldergallery_edit_aspx.ProcessRequest(HttpContext context)

in System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()

in System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

Azione non riuscita:

Demand

Tipo della prima autorizzazione non riuscita:

System.Security.Permissions.EnvironmentPermission

Prima autorizzazione non riuscita:

<IPermission class="System.Security.Permissions.EnvironmentPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"

version="1"

Unrestricted="true"/>

 

Scopo della richiesta:

<IPermission class="System.Security.Permissions.EnvironmentPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"

version="1"

Unrestricted="true"/>

 

Set concesso dell'assembly con errori:

<PermissionSet class="System.Security.PermissionSet"

version="1">

<IPermission class="System.Security.Permissions.EnvironmentPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"

version="1"

Read="TEMP;TMP;USERNAME;OS;COMPUTERNAME"/>

<IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"

version="1"

Unrestricted="true"/>

<IPermission class="System.Security.Permissions.IsolatedStorageFilePermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"

version="1"

Allowed="AssemblyIsolationByUser"

UserQuota="9223372036854775807"/>

<IPermission class="System.Security.Permissions.ReflectionPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"

version="1"

Unrestricted="true"/>

<IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"

version="1"

Unrestricted="true"/>

<IPermission class="System.Security.Permissions.UrlIdentityPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"

version="1"

Url="file:///D:/inetpub/webs/marinodellapuppait/bin/Brettle.Web.NeatUpload.DLL"/>

<IPermission class="System.Security.Permissions.ZoneIdentityPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"

version="1"

Zone="MyComputer"/>

<IPermission class="System.Web.AspNetHostingPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"

version="1"

Level="Medium"/>

<IPermission class="System.Net.DnsPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"

version="1"

Unrestricted="true"/>

<IPermission class="System.Configuration.ConfigurationPermission, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"

version="1"

Unrestricted="true"/>

<IPermission class="System.Data.Odbc.OdbcPermission, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"

version="1"

Unrestricted="true"/>

<IPermission class="System.Net.SocketPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"

version="1"

Unrestricted="true"/>

<IPermission class="System.Drawing.Printing.PrintingPermission, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"

version="1"

Level="DefaultPrinting"/>

<IPermission class="System.Net.Mail.SmtpPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"

version="1"

Access="Connect"/>

<IPermission class="System.Data.SqlClient.SqlClientPermission, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"

version="1"

Unrestricted="true"/>

<IPermission class="System.Data.OleDb.OleDbPermission, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"

version="1"

Unrestricted="true"/>

<IPermission class="System.Net.WebPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"

version="1"

Unrestricted="true"/>

<IPermission class="System.Net.NetworkInformation.NetworkInformationPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"

version="1"/>

<IPermission class="System.Data.OracleClient.OraclePermission, System.Data.OracleClient, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"

version="1"

Unrestricted="true"/>

<IPermission class="System.Diagnostics.PerformanceCounterPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"

version="1"

Unrestricted="true"/>

</PermissionSet>

 

Assembly o AppDomain con errori:

Brettle.Web.NeatUpload, Version=1.3.3520.16252, Culture=neutral, PublicKeyToken=null

Metodo che ha causato il problema:

System.IO.DirectoryInfo GetDefaultTempDirectory()

Area dell'assembly con errori:

MyComputer

URL dell'assembly con errori:

file:///D:/inetpub/webs/marinodellapuppait/bin/Brettle.Web.NeatUpload.DLL

 

As far as I understand there may be a problem with medium trust. So the question is....is there a way to fix this other than running in full trust (which I cannot do)?

Thank you in advance,

 

Marino

11/30/2009 11:29:18 AM
Gravatar
Total Posts 2186

Re: image gallery (simple folder version) on medium trust

Marino,

The NeatUpload utility doesn't work in Medium Trust. Have you followed the instructions here: http://www.mojoportal.com/mediumtrust.aspx?

HTH,
Joe D.

12/1/2009 2:53:54 AM
Gravatar
Total Posts 4

Re: image gallery (simple folder version) on medium trust

Well, actually I thought I followed the link you gave me, but indeed, I didn't. Embarassed

The problem was the App_Data was not writable.

The good news is that the simple folder version image gallery works perfectly in medium trust.
If you go to my site, you can only see one gallery if you're not a registered user.

Thank you everybody! Laughing

 

Marino

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