System.Security.SecurityException. Plzz Help

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.
11/1/2007 8:13:44 AM
Gravatar
Total Posts 17

System.Security.SecurityException. Plzz Help

Hey Joe!

I am getting the following error message..

plzz get back to me soon.

 

Thank you.

 

Server Error in '/' Application.
Security Exception
Description: The application attempted to perform an operation not allowed by the security policy. To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file.

Exception Details: System.Security.SecurityException: Request for the permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

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:

[SecurityException: Request for the permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.]
System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark& stackMark, Boolean isPermSet) +0
System.Security.CodeAccessPermission.Demand() +59
System.Web.HttpContext.System.IServiceProvider.GetService(Type service) +54
Brettle.Web.NeatUpload.UploadHttpModule.GetCurrentWorkerRequest() +57
Brettle.Web.NeatUpload.UploadHttpModule.Application_BeginRequest(Object sender, EventArgs e) +72
System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +92
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +64


Version Information: Microsoft .NET Framework Version:2.0.50727.832; ASP.NET Version:2.0.50727.832

 

11/1/2007 8:29:02 AM
Gravatar
Total Posts 18439

Re: System.Security.SecurityException. Plzz Help

Hi Kunjan,

See this documentation:

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

Hope it helps,

Joe

11/2/2007 12:48:53 AM
Gravatar
Total Posts 17

Re: System.Security.SecurityException. Plzz Help

Hey! Joe

I followed your documentation regarding running in Medium trust, but stuck now with this following error

I also wanna know how to install tht Neatupload in GAC ?

 

Thank you.

 

Server Error in '/' Application.
Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

Parser Error Message: Could not load file or assembly 'Brettle.Web.NeatUpload, Version=1.3.2392.26076, Culture=neutral, PublicKeyToken=c95290d92c5893c8' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) (F:\Domains\gillespieandanderson.co.uk\wwwroot\web.config line 571)

Source Error:

Line 569: <!-- if using Medium trust install NeatUpload in the GAC and un-comment this and comment out the one above -->
Line 570:
Line 571: <add name="UploadHttpModule" type="Brettle.Web.NeatUpload.UploadHttpModule, Brettle.Web.NeatUpload, Version=1.3.2392.26076, Culture=neutral, PublicKeyToken=c95290d92c5893c8" />
Line 572:
Line 573:


Source File: F:\Domains\gillespieandanderson.co.uk\wwwroot\web.config Line: 571

Version Information: Microsoft .NET Framework Version:2.0.50727.832; ASP.NET Version:2.0.50727.832

11/2/2007 4:45:20 AM
Gravatar
Total Posts 17

Re: System.Security.SecurityException. Plzz Help

Hey! Joe

I solved tht above error.

And i also made web.config changes for medium trust, But still getting the error Message of Security Exception. see below.

 

Server Error in '/' Application.
Security Exception
Description: The application attempted to perform an operation not allowed by the security policy. To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file.

Exception Details: System.Security.SecurityException: Request for the permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

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:

[SecurityException: Request for the permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.]
System.Reflection.MethodBase.PerformSecurityCheck(Object obj, RuntimeMethodHandle method, IntPtr parent, UInt32 invocationFlags) +0
System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +172
System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) +1036
System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) +114
System.Activator.CreateInstance(Type type, Object[] args) +16
System.Resources.ResourceManager.CreateResourceSet(Stream store, Assembly assembly) +549
System.Resources.ResourceManager.InternalGetResourceSet(CultureInfo culture, Boolean createIfNotExists, Boolean tryParents) +1161
System.Resources.ResourceManager.InternalGetResourceSet(CultureInfo culture, Boolean createIfNotExists, Boolean tryParents) +681
System.Resources.ResourceManager.InternalGetResourceSet(CultureInfo culture, Boolean createIfNotExists, Boolean tryParents) +681
System.Resources.ResourceManager.GetString(String name, CultureInfo culture) +77
System.Resources.ResourceManager.GetString(String name) +6
Brettle.Web.NeatUpload.Config..ctor() +274
Brettle.Web.NeatUpload.Config.CreateFromConfigSection(Config parent, XmlNode section) +83
Brettle.Web.NeatUpload.ConfigSectionHandler.Create(Object parent, Object context, XmlNode section) +21
System.Configuration.RuntimeConfigurationFactory.CreateSectionImpl(RuntimeConfigurationRecord configRecord, FactoryRecord factoryRecord, SectionRecord sectionRecord, Object parentConfig, ConfigXmlReader reader) +251
System.Configuration.RuntimeConfigurationFactory.CreateSectionWithRestrictedPermissions(RuntimeConfigurationRecord configRecord, FactoryRecord factoryRecord, SectionRecord sectionRecord, Object parentConfig, ConfigXmlReader reader) +93
System.Configuration.RuntimeConfigurationRecord.CreateSection(Boolean inputIsTrusted, FactoryRecord factoryRecord, SectionRecord sectionRecord, Object parentConfig, ConfigXmlReader reader) +82
System.Configuration.BaseConfigurationRecord.CallCreateSection(Boolean inputIsTrusted, FactoryRecord factoryRecord, SectionRecord sectionRecord, Object parentConfig, ConfigXmlReader reader, String filename, Int32 line) +64


Version Information: Microsoft .NET Framework Version:2.0.50727.832; ASP.NET Version:2.0.50727.832

11/2/2007 7:37:08 AM
Gravatar
Total Posts 18439

Re: System.Security.SecurityException. Plzz Help

I don't think you have commented out all the references to NeatUpload from Web.connfig

Joe

11/2/2007 8:25:46 AM
Gravatar
Total Posts 17

Re: System.Security.SecurityException. Plzz Help

hey! Joe.

I tried to un-comment all relative stuff. but still stuck with tht same System.Security.SecurityException error.

I given below my current Web.config file, with the relevant fields in BOLD.

Plzz check it, and tell me where i am making mistakes. Your help will be appreciated.

Thank you.

--------------------------------------------------------------------------

<?xml version="1.0"?>
<configuration>

<configSections>

<sectionGroup name="system.web">

<section name="mojoEncryption" type="mojoPortal.Web.Framework.mojoEncryptionConfigurationHandler, mojoportal.Web.Framework" />


<!--
if installed in a Medium Trust environment, you can still use NeatUpload if
you install it in the GAC and uncomment this and several other things commented below.

-->
<section name="neatUpload" type="Brettle.Web.NeatUpload.ConfigSectionHandler, Brettle.Web.NeatUpload, Version=1.3.2392.26069, Culture=neutral, PublicKeyToken=c95290d92c5893c8" allowLocation="true" />



</sectionGroup>

<!-- Microsoft AJAX Extensions Support -->

<sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
<sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
<section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication"/>
<sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
<section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="Everywhere" />
<section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication" />
<section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication" />
</sectionGroup>
</sectionGroup>
</sectionGroup>

</configSections>

<!-- application specific settings -->

<!-- ERROR Logging
Look in the log4net.config file for settings to configure logging
by default it will log to a text file Data/mojoportal-log.config
as long as the Data folder is writeable
-->

<!-- for development purposes, if you create a user.config file and put it in the root
of the web, you can put development app settings like connections strings there
and they won't be overwritten by svn update. user.config is not under source control
there is a sample user.config.sample you can use as a basis but don't raname this file,
create your own
user.config and copy from the sample

settings in user.config will take precedence over settings in web.config
but changes to user.config will not be detected automatically or cause app to restart
so if you make a change there, enter a space in web.config and save to make it pickup
your change in user.config
-->
<appSettings file="user.config">

<add key="DisableSetup" value="false" />
<add key="ShowConnectionErrorOnSetup" value="true" />
<add key="ShowHistoryOnUpgradePage" value="true" />

<!-- Database Settings *************************************** -->


<add key="MySqlConnectionString" value="Data Source=mysql5int.gillespieandanderson.co.uk;Database=gacms;User ID=gaadmin;Password=1234;Charset=utf8;" />

<!-- mojoProject is a feature currently under development, you do not need this connection string at this time -->
<add key="mojoProjectMySqlConnectionString" value="Data Source=mysql5int.gillespieandanderson.co.uk;Database=gacms;User ID=gaadmin;Password=1234" />

<!-- pooling=true; Port=3306; min pool size=33;max pool size=66;Charset=latin1; -->

<add key="PostgreSQLConnectionString" value="Server=localhost;Port=5432;Encoding=unicode;User Id=mojouser;Password=mojo123;Database=mojoportal;Pooling=false" />

<!-- mojoProject is a feature currently under development, you do not need this connection string at this time -->
<add key="mojoProjectPostgreSQLConnectionString" value="Server=localhost;Port=5432;User Id=mojouser;Password=mojo123;Database=mojoportal;Pooling=false" />
<!--
Paramater caching is not yet supported in NpgsqlHelper; however,
PostgreSQLData is written in anticipation of taking advantage of this feature.
Keep value as False for now.
-->
<add key="CachePostgreSQLParameters" value="false" />

<!--
you can use a fully qualified file path as shown below
or if you are using the default db at /Data/sqlitedb/mojoportal.db
just leave this set to "defaultdblocation"
<add key="SqliteConnectionString" value="version=3,URI=file:C://Projects/mojoportal/Web/Data/sqlitedb/mojoportal.db" />
-->
<add key="SqliteConnectionString" value="defaultdblocation" />

<!--
<add key="FirebirdConnectionString" value="Data Source=localhost;Server Type=0;Port Number=3050;Database=mojoportal;Dialect=3;Charset=UTF8;Pooling=True;Min Pool Size=0;Max Pool Size=200;Connection Timeout=10;Connection Lifetime=60;Fetch Size=200;User Id=SYSDBA;Password=masterkey" />
-->
<add key="FirebirdConnectionString" value="Data Source=localhost;Server Type=0;Port Number=3050;Database=C:/Users/JoeAudette/devprojects/mojoportal/mojoportal.fdb;Dialect=3;Charset=UTF8;Pooling=True;Min Pool Size=0;Max Pool Size=200;Connection Timeout=10;Connection Lifetime=60;Fetch Size=200;User Id=SYSDBA;Password=masterkey" />

<!-- End Database Settings *********************************** -->

<!-- Site Settings ******************************************* -->

<!-- Clock Hours = 12 or 24 -->
<add key="ClockHours" value="12" />

<add key="EnableOpenIDAuthentication" value="false" />
<!-- this feature is not ready for use so leave it false -->
<add key="EnableWindowsLiveAuthentication" value="false" />

<add key="AllowMultipleSites" value="true" />
<add key="AllowDeletingChildSites" value="false" />
<add key="AllowFileManagerInChildSites" value="false" />
<add key="AllowPasswordFormatChangeInChildSites" value="false" />
<add key="ShowSystemInformationInChildSiteAdminMenu" value="true" />
<add key="UseFoldersInsteadOfHostnamesForMultipleSites" value="false" />
<add key="DisallowedVirtualFolderNames" value="Admin;ClientScript;Controls;Data;FCKeditor;Modules;NeatHtml;NeatUpload;Secure;Services;Setup;SiteOffice;WebStore" />
<add key="AllowPasswordFormatChange" value="true" />
<add key="SSLIsAvailable" value="false" />
<add key="EnableSSLInChildSites" value="false" />
<add key="EnableLogViewer" value="true" />
<!-- Default to All Users role, i.e public pages by default -->
<add key="DefaultPageRoles" value="All Users" />

<!--

if users will be accessing your site on a port other
than port 80
set MapAlternatePort to true so that links will
include the port.
set MapAlternatePort to false if you are using a proxy server
that doesn't add X-Forwarded-Host headers (most do).
This setting has no effect if you are using port 80,
the standard web port.

this must also be true for debugging with the VS Web server
as it uses alternate ports

-->
<add key="MapAlternatePort" value="true" />
<add key="MapAlternateSSLPort" value="true" />
<add key="AlternateSSLPort" value="443" />

<!-- if using a proxy and it prevents detection of ssl
it can cause an infinite loop in the SiteUtils.ForceSSL function
set this to true to prevent that if you encounter this problem
-->
<add key="ProxyPreventsSSLDetection" value="false" />


<!--
Note you also need to specify smtp settings further below in system.net section
-->
<add key="SMTPServer" value="localhost" />
<add key="SMTPRequiresAuthentication" value="false" />
<add key="SMTPPort" value="25" />
<add key="SMTPUser" value="UserName" />
<add key="SMTPPassword" value="UPassword" />

<add key="DefaultEmailFrom" value="noreply@yoursite.com" />
<add key="WebMaster" value="noreply@yoursite.com" />
<add key="MemberListPageSize" value="20" />
<add key="DefaultBlogPageSize" value="10" />

<!-- this should be the preferred timezone offset to display for unauthenticated users -->
<add key="PreferredGreenwichMeantimeOffset" value="-4.00" />

<!--
In general practice english letters are used for urls
and domain names must be in english letters.
For cultures that do no use english letters you
may wish to disable the friendly url autosuggestion
feature by setting this variable to false.
-->
<add key="AutoSuggestFriendlyUrls" value="true" />

<add key="SiteSettingsCacheDurationInSeconds" value="360" />
<add key="MenuCacheDurationInSeconds" value="360" />
<add key="DefaultModuleCacheDurationInSeconds" value="360" />
<add key="RedirectHomeFromSetupPagesWhenSystemIsUpToDate" value="true" />
<add key="WebPageInfoCacheMinutes" value="20" />
<!-- When page level skinning is enabled, if this is true, then pages created
beneath a page that has a specific skin assigned
will use the same skin by default
-->
<add key="AssignNewPagesParentPageSkinByDefault" value="true" />

<!-- RolesThatCanViewMemberList
semi colon separated role names
examples:
<add key="RolesThatCanViewMemberList" value="Authenticated Users" />
<add key="RolesThatCanViewMemberList" value="Admins" />
All Users means even anonymous users can view
<add key="RolesThatCanViewMemberList" value="All Users" />
this affects all sites in a multi site setup
maybe later we can make this site specific
-->
<add key="RolesThatCanViewMemberList" value="Authenticated Users" />


<!-- RoundModuleCornersByDefault
Disabling viewstate at the page level can reduce the size of the page
which improves performance. Modules that do postback usually need
ViewState Enabled so in the Page_Load event of modules that postback
I add a line of code like this
Page.EnableViewState = true;
This works fine for all the built in modules but I've had at least one
developer tell me it did not work for his custom modules so I added this
setting here which you can set to false if you find it breaks any functionality
in your custom modules. If it doesn't break anything I recommend leaving this
set to true
-->
<add key="DisablePageViewStateByDefault" value="true" />

<add key="DisableHelpSystem" value="false" />
<add key="DisableFileManager" value="false" />

<!-- End Site Settings *************************************** -->

<!-- RSS Settings ******************************************* -->
<add key="RSSCSS" value="/Data/style/rss1.css" />
<add key="RSSXsl" value="/Data/xsl/rss1.xsl" />

<!-- End RSS Settings *************************************** -->

<!-- Forum Module Settings ******************************************* -->
<add key="PostsApprovedByDefault" value="True" />

<!-- End Forum Module Settings *************************************** -->

<!--
UrlRewrite Settings -->

<add key="UseUrlReWriting" value="true" />

<!-- End UrlRewrite Settings -->

<add key="UseShortcutKeys" value="false" />
<!-- SiteOffice feature this is not yet implemented so leave
it false for this version of mojoPortal -->
<add key="UseSiteMailFeature" value="false" />
<add key="UseOfficeFeature" value="false" />
<add key="UseExternalMailFeature" value="true" />
<add key="AllowAttachmentsInSiteMailFeature" value="true" />
<add key="AllowAttachmentsInExternalMailFeature" value="true" />
<!-- end SiteOffice section -->

<add key="NumberOfWebPartsToShowInMiniCatalog" value="15" />

<add key="SiteStatistics_ShowMemberStatistics_Default" value="true" />
<add key="SiteStatistics_ShowOnlineStatistics_Default" value="true" />
<add key="SiteStatistics_ShowOnlineMembers_Default" value="true" />


<!--
this sets the max size of an upload when the
UploadHttpModule is being used. In that case the
request is streamed to disk, so the primary reason
for limiting the size would be to prevent any single
upload from using too much disk space.
-->
<add key="UseNeatUpload" value="false" />
<add key="NeatUpload.MaxRequestLength" value="1000000" />

<add key="UseNeatHtmlForXSSPrevention" value="true" />


<add key="EditContentImage" value="pencil.gif" />
<add key="DeleteLinkImage" value="delete.gif" />
<add key="EditPropertiesImage" value="edit.gif" />
<add key="NewPageImage" value="page_add.gif" />
<add key="CancelUploadImage" value="cancel.png" />
<add key="RefreshImage" value="refresh.png" />
<add key="StopRefreshImage" value="stop_refresh.png" />
<add key="RSSImageFileName" value="xml.gif" />
<add key="ForumThreadImage" value="thread.gif" />

<add key="GetAlphaPagerCharsFromResourceFile" value="false" />
<add key="AlphaPagerChars" value="ABCDEFGHIJKLMNOPQRSTUVWXYZ" />

<!--
if installed under Medium trust, un-comment this and make sure it maps
to the index folder of your site.
you will not want to use the multiple sites on one installation
technique under medium trust as all sites would use this single search index location
which would not be a good thing
-->

<add key="Lucene.Net.lockdir" value="/Data/Sites/1/index" />




<!--
<add key="mojoProfileConfigFileName" value="mojoProfile.config" />

This file needs tobe in the root of the web folder, but you can use an
alternate file with your own profile options or edit the mojoProfile.config file
to use your own custom options.

There is also a setting below in the system.web section for
<mojoProfile configSource="mojoProfile.config"></mojoProfile>
if you set that to the same value as the setting immediately below
then the web application will recycle automatically if you edit the
specified file. This will ensure your customizations are used right away.
-->

<add key="mojoProfileConfigFileName" value="mojoProfile.config" />
<add key="mojoEditorConfigFileName" value="mojoEditor.config" />
<add key="SiteOfficeConfigFolder" value="/SiteOffice/Config/" />

<!--
Valid values for RecatchaTheme are red, white, blackglass
-->
<add key="RecaptchaTheme" value="white" />

<!-- this setting allows you to force specific cultures for specific sites
I recommend that you don't do this unless you have a specific reason to.
You would also need to know the siteid of each site and specify it here like this:
<add key="site1culture" value="en-US" />
<add key="site2culture" value="nl-NL" />
-->
<add key="UseCultureOverride" value="false" />


</appSettings>

<location path="SharedFilesDownload.aspx">
<system.web>
<neatUpload useHttpModule="false" />
<httpRuntime maxRequestLength="2097151" executionTimeout="14400" />
</system.web>
</location>

<system.web>

<!--
<identity impersonate="true" />
-->
<!--
Note for best practice you should replace this machine key with one you generate.
If you use encrypted passwords, don't change the machine key after that or you will not
be able to decrypt passwords.
To generate your own, you can use this nice online utility:
http://www.aspnetresources.com/tools/keycreator.aspx
or this newer one which is more up to date as of 1/4/2007:
http://www.developmentnow.com/articles/machinekey_generator.aspx

-->

<machineKey
validationKey="55BA53B475CCAE0992D6BF9FE463A5E97F00C6C16DA3D7DF9202E560078AB501643C15514785FEE30FEF26FC27F5CE594B42FFCA55452EF90E8A056B4DAE9F39"
decryptionKey="939232D527AC4CD3E449441FE887DA110A16C1A36924C424CBAAE3F00282436C"
validation="SHA1"
decryption="AES"/>

<!--
The above key is better so I changed it, but leaving this one here
in case anyone is using encrypted passwords and did not generate their own key.

<machineKey
validationKey="00D550C22F4C0C5F42FBBDCABF8FCB1B1D3F19CDE656139EB740ECDA32A5B8D49D2F3EA9EB06E416521B5AF72EEBC606503B2E10D1BA7FC4AF1397A4C0139974"
decryptionKey="EFF08CB3637258A9C33650CC1C5D10ACD1FC88DCEDE6D7B5"
validation="SHA1"
decryption="3DES" />

-->


<xhtmlConformance mode="Strict" />

<!--
example culture settings

af-ZA Africaans South Africa
bg-BG Bulgarian Bulgaria - need to fix the datepicker .js file
zh-CN Chinese China - need to fix the datepicker .js file
cs-CZ Czech
en-US English US
en-GB English United Kingdom
es-ES Spanish Spain
es-MX Spanish Mexico
el-GR Greek Greece
da-DK Danish Denmark
de-DE German Germany
fi-FI Finnish Finland
fr-FR French France
fr-CA French Canada
he-IL Hebrew Israel - need to fix the datepicker .js file
it-IT Italian Italy
ko-KR Korean Korea - need to fix the datepicker .js file
nl-NL Dutch Netherlands
nl-BG Dutch Belgium
pt-BR Portuguese Brazil
pl-PL Polish Poland
sv-SE Swedish Sweden
sv-FI Swedish Finland
ru-RU Russian Russia
tr-TR Turkish Turkey

more complete list here
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfSystemGlobalizationCultureInfoClassTopic.asp

auto:en-US causes asp.net to try and find resources for the prefered language
in the browser settings with fallback to the default culture, en-US in this example
-->

<globalization
culture="auto:en-US"
uiCulture="auto:en"
requestEncoding="utf-8"
responseEncoding="utf-8"
fileEncoding="iso-8859-15" />

<!--
<identity impersonate="true" />
-->

<!--
For best security, you should generate your own RSA Key, put it here then encrypt this config section
-->

<mojoEncryption>
<RSAKeyValue>
<Modulus>uckRHFWrxsDV+NR+oEK1csTkjic4E2byaUMV8FmTDhyzZMrDV3dJV8T00Esa+rgrlN08CCJC0epPyWGheI3KHgQmbq2iHak4Y67SHL0ZhRG7OHFFkITFSeVPQIqcinwk0PZfgbE239cM/0u7r9DQLIFTbRZKhd8fS//X7AsW3Js=</Modulus>
<Exponent>AQAB</Exponent>
<P>70rN3bB8CzW7iF5QEicDiGM5chkza5DxqRPVvXnnjejS2CAzlvzUdPSArjZUbupg4iaBJsN26TxwQ6OB99QrLw==</P>
<Q>xsHc6I+1yCxaPsqst/gDuKwPyutK3s7P2hfj6fIpNwmsvqxxMRAgPhw8mr3OK0yZjPRCZLCxBEVyoNEkB2paVQ==</Q>
<DP>5pz4+gX0Bfmq2inKkTP4O6Ek48lVvPzbaU8sVob9mc4gJRojngfb2TsqKLtDdAF9jXX+UhVerDkLGKSjxOw9EQ==</DP>
<DQ>dw5/XktfT3XJ5R0Qku6chA2FND73TTnC5dgzrNpi99XyxRCUiRgoyCuv3d1eVy9+NyHFd30ju/RBsrU0iMCbNQ==</DQ>
<InverseQ>6DNVGM4aB5jSXJgCYwwZdB6w09RofYWOi27g59k5+I1DC/VqgSo3QXY+dWK3qWReAYr2qAJJEhlRCvsou82d9Q==</InverseQ>
<D>mywXAIWFrcHOdcB16sEM8EkHZLvZGEt52PVRU6hdLQJHy72XHmzhc09r8rVoWVSOAg4uX9TN3qpH7bl/tkMnNjD9UCToIqQ+FF+TYL3+/irWEDqixujDeQAPEFCdYmviuRiMf7q3alBqF3Be39Fkbu/NJ75wgZKWmP1pE049abE=</D>
</RSAKeyValue>
</mojoEncryption>


<siteMap enabled="true" defaultProvider="mojosite1">
<providers>
<clear />
<add name="mojosite1" type="mojoPortal.Web.mojoSiteMapProvider" securityTrimmingEnabled="false" />
<add name="mojosite2" type="mojoPortal.Web.mojoSiteMapProvider" securityTrimmingEnabled="false" />
<add name="mojosite3" type="mojoPortal.Web.mojoSiteMapProvider" securityTrimmingEnabled="false" />
<add name="mojosite4" type="mojoPortal.Web.mojoSiteMapProvider" securityTrimmingEnabled="false" />
<add name="mojosite5" type="mojoPortal.Web.mojoSiteMapProvider" securityTrimmingEnabled="false" />
<add name="mojosite6" type="mojoPortal.Web.mojoSiteMapProvider" securityTrimmingEnabled="false" />
<add name="mojosite7" type="mojoPortal.Web.mojoSiteMapProvider" securityTrimmingEnabled="false" />
<add name="mojosite8" type="mojoPortal.Web.mojoSiteMapProvider" securityTrimmingEnabled="false" />
<add name="mojosite9" type="mojoPortal.Web.mojoSiteMapProvider" securityTrimmingEnabled="false" />
<add name="mojosite10" type="mojoPortal.Web.mojoSiteMapProvider" securityTrimmingEnabled="false" />
<!--
This is configured to allow up to 10 sites in a single installation, if you need more you can add more
and just increment the number part of the name which corresponds to the site id
-->
</providers>
</siteMap>

<webParts>
<personalization defaultProvider="mojoPersonalizationProvider">
<providers>
<clear />
<add name="mojoPersonalizationProvider" type="mojoPortal.Web.mojoPersonalizationProvider" />
</providers>
<authorization>
<allow roles="Admins" verbs="enterSharedScope" />
</authorization>
</personalization>
</webParts>

<membership defaultProvider="mojoMembershipProvider" userIsOnlineTimeWindow="20">
<providers>
<clear />
<add name="mojoMembershipProvider" type="mojoPortal.Web.mojoMembershipProvider" />
</providers>
</membership>

<roleManager enabled="true" defaultProvider="mojoRoleProvider">
<providers>
<clear />
<add name="mojoRoleProvider" type="mojoPortal.Web.mojoRoleProvider" />
</providers>
</roleManager>


<pages validateRequest="false" enableViewStateMac="false" viewStateEncryptionMode="Auto">
<namespaces>
<add namespace="System.Globalization" />
<add namespace="mojoPortal.Business" />
<add namespace="mojoPortal.Business.WebHelpers" />
<add namespace="mojoPortal.Web" />
<add namespace="mojoPortal.Web.Controls" />
<add namespace="mojoPortal.Web.Framework" />
<add namespace="mojoPortal.Web.UI" />

</namespaces>
<controls>
<add tagPrefix="portal" namespace="mojoPortal.Web.UI" assembly="mojoPortal.Web" />
<add tagPrefix="mp" namespace="mojoPortal.Web.Controls" assembly="mojoPortal.Web.Controls" />
<add tagPrefix="mpe" namespace="mojoPortal.Web.Editor" assembly="mojoPortal.Web.Editor" />

<add tagPrefix="portal" tagName="ChildPageMenu" src="/Controls/ChildPageMenu.ascx" />
<add tagPrefix="portal" tagName="Breadcrumbs" src="/Controls/BreadcrumbsControl.ascx" />
<add tagPrefix="portal" tagName="SearchInput" src="/Controls/SearchInput.ascx" />
<add tagPrefix="portal" tagName="SiteMenu" src="/Controls/SiteMenu.ascx" />
<add tagPrefix="portal" tagName="StyleSheet" src="/Controls/StyleSheet.ascx" />
<add tagPrefix="portal" tagName="MetaContent" src="/Controls/MetaContent.ascx" />
<add tagPrefix="portal" tagName="PageMenu" src="/Controls/PageMenu.ascx" />
<add tagPrefix="portal" tagName="MembershipStatistics" src="/Controls/MembershipStatisticsControl.ascx" />
<add tagPrefix="portal" tagName="OnlineStatistics" src="/Controls/OnlineStatisticsControl.ascx" />
<add tagPrefix="portal" tagName="OnlineMemberList" src="/Controls/OnlineMemberListControl.ascx" />
<add tagPrefix="portal" tagName="ModuleWrapper" src="/Controls/ModuleWrapper.ascx" />
<add tagPrefix="portal" tagName="OpenIDLoginControl" src="/Controls/OpenIDLoginControl.ascx" />
<add tagPrefix="portal" tagName="WindowsLiveLoginControl" src="/Controls/WindowsLiveLoginControl.ascx" />

<add namespace="Brettle.Web.NeatUpload" assembly="Brettle.Web.NeatUpload" tagPrefix="NeatUpload"/>
<add namespace="NerdBank.OpenId.Consumer" assembly="Janrain.OpenId" tagPrefix="oid"/>

<!-- AJAX Extensions support -->
<add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

<!-- comment this out for Mono -->
<add tagPrefix="asp" namespace="Microsoft.Web.Preview.UI" assembly="Microsoft.Web.Preview"/>
<add tagPrefix="asp" namespace="Microsoft.Web.Preview.UI.Controls" assembly="Microsoft.Web.Preview"/>


</controls>
<tagMapping>

<!-- comment this out for Mono -->
<add tagType="System.Web.UI.WebControls.WebParts.WebPartManager"
mappedTagType="Microsoft.Web.Preview.UI.Controls.WebParts.WebPartManager"/>

<add tagType="System.Web.UI.WebControls.WebParts.WebPartZone"
mappedTagType="Microsoft.Web.Preview.UI.Controls.WebParts.WebPartZone"/>


</tagMapping>


</pages>

<!-- for testing purposes only
Some hosted environments enforce Medium trust
this setting in the machine.config will override any setting made here

<trust level="Medium" originUrl="" /> <trust level="Medium" originUrl="" />
-->






<!-- ASMX is mapped to a new handler so that proxy javascripts can also be served. -->

<httpHandlers>

<!-- AJAX Extensions support -->
<remove verb="*" path="*.asmx"/>
<add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/>
<add verb="GET,HEAD,POST" path="*.asbx" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/>

<add verb="*" path="*CaptchaImage.ashx" type="Subkismet.Captcha.CaptchaImageHandler, Subkismet" />

</httpHandlers>

<httpModules>
<!--
<add name="BannedIPBlockingHttpModule"
type="mojoPortal.Web.BannedIPBlockingHttpModule, mojoPortal.Web"/>
-->
<add name="UrlRewriter" type="mojoPortal.Web.UrlRewriter, mojoPortal.Web" />

<!-- Comment the UploadHttpModule out if running in Medium Trust -->
<!--<add name="UploadHttpModule" type="Brettle.Web.NeatUpload.UploadHttpModule, Brettle.Web.NeatUpload" /> -->


<!-- if using Medium trust install NeatUpload in the GAC and un-comment this and comment out the one above
-->

<add name="UploadHttpModule" type="Brettle.Web.NeatUpload.UploadHttpModule, Brettle.Web.NeatUpload, Version=1.3.2392.26069, Culture=neutral, PublicKeyToken=c95290d92c5893c8" />


<!-- AJAX Extensions support -->
<add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>



</httpModules>



<!-- if using Medium trust install NeatUpload in the GAC and un-comment this-->


<neatUpload useHttpModule="false" maxNormalRequestLength="4096" maxRequestLength="2097151" defaultProvider="FilesystemUploadStorageProvider">
<providers>
<add name="FilesystemUploadStorageProvider"
type="Brettle.Web.NeatUpload.FilesystemUploadStorageProvider, Brettle.Web.NeatUpload, Version=1.3.2392.26069, Culture=neutral, PublicKeyToken=c95290d92c5893c8"
tempDirectory="/Data" />
</providers>
</neatUpload>

<!--
To use the AJAX Extensions enabled mojoWebPartManager, copy this scriptmanager tag into the
MPPageEdit placeholder on MyPage.aspx and uncomment the script module in the httpmodules section
and put the compiled mojoWebPartManager into the bin or if working with code set a reference to the project
from mojoportal.web. Also uncoment the Microsoft.Web section up above

<asp:ScriptManager ID="ScriptManager1" EnablePageMethods="true" runat="server" />

-->


<!--
this sets the max size of an upload if the
UploadHttpModule is not being used. In that case, the
entire request is stored in memory so large uploads
could be used as a Denial of Service attack.
use you own judgement in determining the max size of
a request you want to allow.
-->
<httpRuntime maxRequestLength="1000000" executionTimeout="360" useFullyQualifiedRedirectUrl="true" />

<!-- set debugmode to false for production -->
<compilation debug="false">

<assemblies>

<!-- if using Medium trust install NeatUpload in the GAC and un-comment this -->

<add assembly="Brettle.Web.NeatUpload, Version=1.3.2392.26069, Culture=neutral, PublicKeyToken=c95290d92c5893c8"/>


<!-- AJAX Extensions suport -->
<add assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

<!-- comment this out for Mono -->
<add assembly="Microsoft.Web.Preview, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>


</assemblies>

<!-- AJAX Extensions suport
<buildProviders>
<add extension="*.asbx" type="Microsoft.Web.Preview.Services.BridgeBuildProvider"/>
</buildProviders>
-->

</compilation>

<!--mojoPortal supports either Forms authentication (Internet)
or Windows authentication (for intranets). Forms Authentication is
the default. To change to Windows authentication, comment the
<authentication mode="Forms"> section below, and uncomment the
<authentication mode="Windows"> section.

For using Active Directory or OpenLDAP use Forms authentication

-->

<authentication mode="Forms">
<forms
name=".mojochangeme"
protection="All"
timeout="50000000"
path="/"

/>
</authentication>

<!--<authentication mode="Windows" />
<authorization>
<deny users="?" />
</authorization>-->

<anonymousIdentification
enabled="false"
cookieName=".ASPXANONYMOUS"
cookieTimeout="43200"
cookieSlidingExpiration="true"
cookieless="UseCookies"
cookieProtection="All"
/>


<!-- CUSTOM ERROR MESSAGES
Set customErrors mode="On" or "RemoteOnly" to enable custom error messages, "Off" to disable.
Add <error> tags for each of the errors you want to handle.

"On" Always display custom (friendly) messages.
"Off" Always display detailed ASP.NET error information.
"RemoteOnly" Display custom (friendly) messages only to users not running
on the local Web server. This setting is recommended for security purposes, so
that you do not display application detail information to remote clients.

-->
<customErrors mode="Off" />


<!-- set enabled to true if you want to trace -->
<trace
enabled="false"
requestLimit="50"
pageOutput="true"
traceMode="SortByTime"
localOnly="false" />


</system.web>

<!-- AJAX Extensions suport
<system.webServer configSource="WebServer.config"></system.webServer>
-->



<system.net>
<mailSettings>
<smtp from="noreply@yourdomain.com">
<network
host="localhost"
port="25"
password=""
userName=""
/>
</smtp>
</mailSettings>
</system.net>


</configuration>

11/2/2007 8:39:11 AM
Gravatar
Total Posts 18439

Re: System.Security.SecurityException. Plzz Help

No, you misunderstood the instructions. You should be commenting it out not uncommenting it. Remove all references by commenting it out.

The only part of the instructions about medium trust that says uncomment anything about NeatUpload is "if it is installed in the GAC by the host".

In your case it is not in the GAC and you are runniing in medium trust so you can't use NeatUpload at all.

Comment out  all references to NeatUplaod in web.config.

Joe

11/2/2007 9:28:49 AM
Gravatar
Total Posts 17

Re: System.Security.SecurityException. Plzz Help

Thanks alott! Joe

That Neatupload error is Solved.

But now this screen of errors comes. May be i think its Mysql problem. I have checked all connectionstrings, tht r ok. Database is also Ok.

 

[SecurityException: Request for the permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.]
System.Reflection.MethodBase.PerformSecurityCheck(Object obj, RuntimeMethodHandle method, IntPtr parent, UInt32 invocationFlags) +0
System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +172
System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) +1036
System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) +114
System.Activator.CreateInstance(Type type, Object[] args) +16
System.Resources.ResourceManager.CreateResourceSet(Stream store, Assembly assembly) +549
System.Resources.ResourceManager.InternalGetResourceSet(CultureInfo culture, Boolean createIfNotExists, Boolean tryParents) +1161
System.Resources.ResourceManager.InternalGetResourceSet(CultureInfo culture, Boolean createIfNotExists, Boolean tryParents) +681
System.Resources.ResourceManager.InternalGetResourceSet(CultureInfo culture, Boolean createIfNotExists, Boolean tryParents) +681
System.Resources.ResourceManager.GetString(String name, CultureInfo culture) +77
MySql.Data.MySqlClient.Resources.get_UnableToConnectToHost() +24
MySql.Data.MySqlClient.NativeDriver.Open() +248
MySql.Data.MySqlClient.MySqlPool.GetPooledConnection() +50
MySql.Data.MySqlClient.MySqlPool.GetConnection() +142
MySql.Data.MySqlClient.MySqlConnection.Open() +209
MySql.Data.MySqlClient.MySqlHelper.ExecuteScalar(String connectionString, String commandText, MySqlParameter[] commandParameters) +59
mojoPortal.Data.dbPortal.SiteFolder_Exists(String folderName) +205
mojoPortal.Business.SiteFolder.Exists(String folderName) +5
mojoPortal.Business.WebHelpers.VirtualFolderEvaluator.VirtualFolderName() +531
mojoPortal.Web.UrlRewriter.RewriteUrl(HttpApplication app) +83
mojoPortal.Web.UrlRewriter.UrlRewriter_BeginRequest(Object sender, EventArgs e) +368
System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +92
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +64

11/2/2007 10:18:41 AM
Gravatar
Total Posts 18439

Re: System.Security.SecurityException. Plzz Help

Hi,

As mentioned on the Medium Trust page, for Data access to work in Medium trust the ADO provider for it must be in the GAC.

So you can either use MS SQL or convince your host to install the MySql Connector on the sever which would put it in the GAC.

The latest mojoPortal from svn turnk has the new version of MySql Connector and I've been told it works in medium trust without being in the GAC but not sure its true as I haven't tested that myself. You can try replacing the MySql.Data.dll in your bin folder with version 5.1.3.0 which you can download from the MySql site or get from svn trunk. However, I think if it does work it will require re-compiling the solution.

The current relase version doesn't have the new MySql Connector.

Hope it helps,

Joe

11/3/2007 6:53:05 AM
Gravatar
Total Posts 17

Re: System.Security.SecurityException. Plzz Help

Hey Joe!

Thnx for giving time to time reply.

I followed your instructions and Downloaded the new 5.1.3.0 MySql.Data.Dll file and replaced with the existing  MySql.Data.Dll. Also my Hosting Provider will not going to install MySql Dll file into their GAC.

Now this Error is being displayed

I m really getting lost now........ Dnt know what to do now. Plzz help.........

Thank you

---------------------------------------------------------------------------------------

Could not load file or assembly 'MySql.Data, Version=5.0.8.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
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.IO.FileLoadException: Could not load file or assembly 'MySql.Data, Version=5.0.8.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

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.

Assembly Load Trace: The following information can be helpful to determine why the assembly 'MySql.Data, Version=5.0.8.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d' could not be loaded.

WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].


Stack Trace:

[FileLoadException: Could not load file or assembly 'MySql.Data, Version=5.0.8.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)]
mojoPortal.Data.dbPortal.SiteFolder_Exists(String folderName) +0
mojoPortal.Business.SiteFolder.Exists(String folderName) +5
mojoPortal.Business.WebHelpers.VirtualFolderEvaluator.VirtualFolderName() +531
mojoPortal.Web.UrlRewriter.RewriteUrl(HttpApplication app) +83
mojoPortal.Web.UrlRewriter.UrlRewriter_BeginRequest(Object sender, EventArgs e) +368
System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +92
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +64

11/3/2007 7:02:27 AM
Gravatar
Total Posts 18439

Re: System.Security.SecurityException. Plzz Help

As I mentioned in my previous post. I think to use the newer version of MySql connector the mojoPortal code would have to be re-compiled against that version. I will do that for you and send you an email with a new mojoPortal.Data.dll in a little while.

Joe

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