Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
using lastest version of castle.dynamicproxy with nhibernate
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  15 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Gitted  
View profile  
 More options Dec 4 2009, 11:58 am
From: Gitted <sahmed1...@gmail.com>
Date: Fri, 4 Dec 2009 08:58:28 -0800 (PST)
Local: Fri, Dec 4 2009 11:58 am
Subject: using lastest version of castle.dynamicproxy with nhibernate
I tried using the lastest version of castle.dynamic proxy but it seems
there are API changes and I just don't want to go there myself :)

Is this planned soon?

if not, or in the meantime, I can't find the castle.dynamic build used
in the current nhibernate release ?

the subversion repo also seems to have /trunk.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jonathon Rossi  
View profile  
 More options Dec 4 2009, 12:15 pm
From: Jonathon Rossi <j...@jonorossi.com>
Date: Sat, 5 Dec 2009 03:15:58 +1000
Local: Fri, Dec 4 2009 12:15 pm
Subject: Re: using lastest version of castle.dynamicproxy with nhibernate

IIRC NHibernate's current release is using DynamicProxy 2.1 RTM which should
be in the NHibernate zip file downloadable from sourceforge.

--
Jono

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Krzysztof Koźmic  
View profile  
 More options Dec 4 2009, 12:17 pm
From: Krzysztof Koźmic <krzysztof.koz...@gmail.com>
Date: Fri, 04 Dec 2009 18:17:31 +0100
Local: Fri, Dec 4 2009 12:17 pm
Subject: Re: using lastest version of castle.dynamicproxy with nhibernate
yeah,

provider for Castle will be updated soon.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Gitted  
View profile  
 More options Dec 4 2009, 12:42 pm
From: Gitted <sahmed1...@gmail.com>
Date: Fri, 4 Dec 2009 09:42:59 -0800 (PST)
Local: Fri, Dec 4 2009 12:42 pm
Subject: Re: using lastest version of castle.dynamicproxy with nhibernate
So are you both saying the opposite things here? :)

On Dec 4, 12:17 pm, Krzysztof KoŒmic <krzysztof.koz...@gmail.com>
wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Krzysztof Koźmic  
View profile  
 More options Dec 4 2009, 12:45 pm
From: Krzysztof Koźmic <krzysztof.koz...@gmail.com>
Date: Fri, 04 Dec 2009 18:45:58 +0100
Local: Fri, Dec 4 2009 12:45 pm
Subject: Re: using lastest version of castle.dynamicproxy with nhibernate
no,

Current NH uses DP 2.1 but will update soon.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Gitted  
View profile  
 More options Dec 4 2009, 12:49 pm
From: Gitted <sahmed1...@gmail.com>
Date: Fri, 4 Dec 2009 09:49:51 -0800 (PST)
Local: Fri, Dec 4 2009 12:49 pm
Subject: Re: using lastest version of castle.dynamicproxy with nhibernate
Thanks, currently I am stuck because of medium trust issues at
rackspacecloud sites.

Exception Details: System.Security.SecurityException: That assembly
does not allow partially trusted callers.

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: That assembly does not allow partially trusted
callers.]
   Castle.DynamicProxy.ModuleScope..ctor(Boolean savePhysicalAssembly,
String strongAssemblyName, String strongModulePath, String
weakAssemblyName, String weakModulePath) +0
   Castle.DynamicProxy.ModuleScope..ctor(Boolean savePhysicalAssembly)
+35
   Castle.DynamicProxy.ProxyGenerator..ctor() +38
   NHibernate.ByteCode.Castle.ProxyFactory..cctor() +49

This is the web.config they gave for testing, although it works
locally so not sure if this "test" web.config is of any use!

<!-- medium-trust testing -->

  <mscorlib>
    <security>
      <policy>
        <PolicyLevel version="1">
          <SecurityClasses>
            <SecurityClass Name="AllMembershipCondition"
Description="System.Security.Policy.AllMembershipCondition, mscorlib,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
            <SecurityClass Name="AspNetHostingPermission"
Description="System.Web.AspNetHostingPermission, System,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
            <SecurityClass Name="ConfigurationPermission"
Description="System.Configuration.ConfigurationPermission,
System.Configuration, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a"/>
            <SecurityClass Name="DnsPermission"
Description="System.Net.DnsPermission, System, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
            <SecurityClass Name="EnvironmentPermission"
Description="System.Security.Permissions.EnvironmentPermission,
mscorlib, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089"/>
            <SecurityClass Name="FileIOPermission"
Description="System.Security.Permissions.FileIOPermission, mscorlib,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
            <SecurityClass Name="FirstMatchCodeGroup"
Description="System.Security.Policy.FirstMatchCodeGroup, mscorlib,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
            <SecurityClass Name="IsolatedStorageFilePermission"
Description="System.Security.Permissions.IsolatedStorageFilePermission,
mscorlib, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089"/>
            <SecurityClass Name="NamedPermissionSet"
Description="System.Security.NamedPermissionSet"/>
            <SecurityClass Name="PrintingPermission"
Description="System.Drawing.Printing.PrintingPermission,
System.Drawing, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a"/>
            <SecurityClass Name="SecurityPermission"
Description="System.Security.Permissions.SecurityPermission, mscorlib,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
            <SecurityClass Name="SmtpPermission"
Description="System.Net.Mail.SmtpPermission, System, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
            <SecurityClass Name="SqlClientPermission"
Description="System.Data.SqlClient.SqlClientPermission, System.Data,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
            <SecurityClass Name="StrongNameMembershipCondition"
Description="System.Security.Policy.StrongNameMembershipCondition,
mscorlib, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089"/>
            <SecurityClass Name="UIPermission"
Description="System.Security.Permissions.UIPermission, mscorlib,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
            <SecurityClass Name="UnionCodeGroup"
Description="System.Security.Policy.UnionCodeGroup, mscorlib,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
            <SecurityClass Name="UrlMembershipCondition"
Description="System.Security.Policy.UrlMembershipCondition, mscorlib,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
            <SecurityClass Name="WebPermission"
Description="System.Net.WebPermission, System, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
            <SecurityClass Name="ZoneMembershipCondition"
Description="System.Security.Policy.ZoneMembershipCondition, mscorlib,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
            <SecurityClass Name="ReflectionPermission"
Description="System.Security.Permissions.ReflectionPermission,
mscorlib, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089"/>
            <SecurityClass Name="OleDbPermission"
Description="System.Data.OleDb.OleDbPermission, System.Data,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
            <SecurityClass Name="OdbcPermission"
Description="System.Data.Odbc.OdbcPermission, System.Data,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
            <SecurityClass Name="SocketPermission"
Description="System.Net.SocketPermission, System, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
          </SecurityClasses>
          <NamedPermissionSets>
            <PermissionSet class="NamedPermissionSet" version="1"
Unrestricted="true" Name="FullTrust" Description="Allows full access
to all resources"/>
            <PermissionSet class="NamedPermissionSet" version="1"
Name="Nothing" Description="Denies all resources, including the right
to execute"/>
            <PermissionSet class="NamedPermissionSet" version="1"
Name="ASP.Net">
              <IPermission class="AspNetHostingPermission" version="1"
Level="Medium"/>
              <IPermission class="ConfigurationPermission" version="1"
Unrestricted="true"/>
              <IPermission class="DnsPermission" version="1"
Unrestricted="true"/>
              <IPermission class="EnvironmentPermission" version="1"
Read="TEMP;TMP;USERNAME;OS;COMPUTERNAME"/>
              <IPermission class="FileIOPermission" version="1"
Read="$AppDir$" Write="$AppDir$" Append="$AppDir$"
PathDiscovery="$AppDir$"/>
              <IPermission class="IsolatedStorageFilePermission"
version="1" Allowed="AssemblyIsolationByUser"
UserQuota="9223372036854775807"/>

   <IPermission class="PrintingPermission" version="1"
Level="DefaultPrinting"/>

              <IPermission class="SecurityPermission" version="1"
Flags="Assertion, Execution, ControlThread, ControlPrincipal,
RemotingConfiguration"/>
              <IPermission class="SmtpPermission" version="1"
Access="ConnectToUnrestrictedPort"/>
              <IPermission class="SqlClientPermission" version="1"
Unrestricted="true"/>
              <IPermission class="WebPermission" version="1"
Unrestricted="true"/>
              <IPermission class="OleDbPermission" version="1"
Unrestricted="true"/>
              <IPermission class="OdbcPermission" version="1"
Unrestricted="true"/>
              <IPermission class="SocketPermission" version="1"
Unrestricted="true" />
              <IPermission class="ReflectionPermission" version="1"
Unrestricted="true"/>
            </PermissionSet>
          </NamedPermissionSets>
          <CodeGroup class="FirstMatchCodeGroup" version="1"
PermissionSetName="Nothing">
            <IMembershipCondition class="AllMembershipCondition"
version="1"/>
            <CodeGroup class="UnionCodeGroup" version="1"
PermissionSetName="ASP.Net">
              <IMembershipCondition class="UrlMembershipCondition"
version="1" Url="$AppDirUrl$/*"/>
            </CodeGroup>
            <CodeGroup class="UnionCodeGroup" version="1"
PermissionSetName="ASP.Net">
              <IMembershipCondition class="UrlMembershipCondition"
version="1" Url="$CodeGen$/*"/>
            </CodeGroup>
            <CodeGroup class="UnionCodeGroup" version="1"
PermissionSetName="Nothing">
              <IMembershipCondition class="ZoneMembershipCondition"
version="1" Zone="MyComputer"/>
              <CodeGroup class="UnionCodeGroup" version="1"
PermissionSetName="FullTrust" Name="Microsoft_Strong_Name"
Description="This code group grants code signed with the Microsoft
strong name full trust. ">
                <IMembershipCondition
class="StrongNameMembershipCondition" version="1"
PublicKeyBlob="002400000480000094000000060200000024000052534131000400000100 010007D1FA57C4AED9F0A32E84AA0FAEFD0DE9E8FD6AEC8F87FB03766C834C99921EB23BE79 AD9D5DCC1DD9AD236132102900B723CF980957FC4E177108FC607774F29E8320E92EA05ECE4 E821C0A5EFE8F1645C4C0C93C1AB99285D622CAA652C1DFAD63D745D6F2DE5F17E5EAF0FC49 63D261C8A12436518206DC093344D5AD293"/


              </CodeGroup>
              <CodeGroup class="UnionCodeGroup" version="1"
PermissionSetName="FullTrust" Name="Ecma_Strong_Name"
Description="This code group grants code signed with the ECMA strong
name full trust. ">
                <IMembershipCondition
class="StrongNameMembershipCondition" version="1"
PublicKeyBlob="00000000000000000400000000000000"/>
              </CodeGroup>
            </CodeGroup>
          </CodeGroup>
        </PolicyLevel>
      </policy>
    </security>
  </mscorlib>

  <!--/medium-trust -->

On Dec 4, 12:45 pm, Krzysztof KoŒmic <krzysztof.koz...@gmail.com>
wrote:

...

read more »


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
fire  
View profile  
 More options Jan 1 2010, 5:12 pm
From: fire <dan...@gmail.com>
Date: Fri, 1 Jan 2010 14:12:05 -0800 (PST)
Local: Fri, Jan 1 2010 5:12 pm
Subject: Re: using lastest version of castle.dynamicproxy with nhibernate
I get the issue off the trunk binaries.
Narrowed down to ModuleScope.
 Did a quick test to make sure it was and here is a photo (in the
files section):
http://groups.google.com/group/castle-project-users/web/dynamicproxy2...

On Dec 4 2009, 6:49 pm, Gitted <sahmed1...@gmail.com> wrote:

...

read more »


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Sam Kimmel  
View profile  
 More options Jan 22 2010, 2:45 am
From: Sam Kimmel <sweep...@gmail.com>
Date: Thu, 21 Jan 2010 23:45:05 -0800 (PST)
Local: Fri, Jan 22 2010 2:45 am
Subject: Re: using lastest version of castle.dynamicproxy with nhibernate
Same issue here.  I thought Medium Trust issues were fixed in 2.2?

On Jan 1, 4:12 pm, fire <dan...@gmail.com> wrote:

...

read more »


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
2 Krzysztof Koźmic  
View profile  
 More options Jan 22 2010, 2:51 am
From: Krzysztof Koźmic (2) <krzysz...@kozmic.pl>
Date: Thu, 21 Jan 2010 23:51:41 -0800 (PST)
Local: Fri, Jan 22 2010 2:51 am
Subject: Re: using lastest version of castle.dynamicproxy with nhibernate
Sam,

Yes, they were, but you need the assembly to have the
AllowPartiallyCallersAttribute, which means you will have to build it
yourself, since we do not provide such version for security reasons.

On 22 Sty, 08:45, Sam Kimmel <sweep...@gmail.com> wrote:

...

read more »


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Sam Kimmel  
View profile  
 More options Jan 22 2010, 3:33 am
From: Sam Kimmel <sweep...@gmail.com>
Date: Fri, 22 Jan 2010 00:33:47 -0800 (PST)
Local: Fri, Jan 22 2010 3:33 am
Subject: Re: using lastest version of castle.dynamicproxy with nhibernate
Thanks Krzysztof.  I downloaded Nant and haven't had any luck building
from the trunk.  I went to the buildscripts folder and ran the
build.cmd as per the instructions.  When I ran it I got an error:

=======================
This project is not configured to be built with MSBuild.
Please use the NAnt script in the root folder of this project.
=======================

So then I went back to the root and ran NAnt. Exactly where do I need
to specify to allow partially trusted callers?  Also is there a way to
get it to do a release build instead of a debug?  Below are the
results of the NAnt process...

But before that, exactly what are the security reasons for not
providing a AllowPartiallyCallers version? If web users have to go
beyond Medium Trust to use Dynamic Proxy aren't they already making
their app less secure?

=======================

NAnt 0.86 (Build 0.86.2898.0; beta1; 12/8/2007)
Copyright (C) 2001-2007 Gerry Shaw
http://nant.sourceforge.net

Buildfile: file:///C:/Web/CastleDynamicProxy/default.build
Target framework: Microsoft .NET Framework 3.5
Target(s) specified: build

common.find-svninfo:

     [exec] C:\Web\CastleDynamicProxy\buildscripts\common.xml(195,4):
     [exec] 'svn' failed to start.
  [xmlpeek] Peeking at 'C:\Web\CastleDynamicProxy\_revision.xml' with
XPath expression '/info/entry/@revision'.
  [xmlpeek] C:\Web\CastleDynamicProxy\buildscripts\common.xml(206,4):
  [xmlpeek] XML file 'C:\Web\CastleDynamicProxy\_revision.xml' does
not exist.
     [echo] INFO: Using Subversion revision number: 0

common.build:

common.build.internal:

     [nant] C:\Web\CastleDynamicProxy\src\Castle.DynamicProxy
\default.build
            Buildfile: file:///C:/Web/CastleDynamicProxy/src/Castle.DynamicProxy/default.build
            Target framework: Microsoft .NET Framework 3.5
            Target(s) specified: build

            common.find-svninfo:

                 [exec] C:\Web\CastleDynamicProxy\buildscripts
\common.xml(195,4):
                 [exec] 'svn' failed to start.
              [xmlpeek] Peeking at 'C:\Web\CastleDynamicProxy\src
\Castle.DynamicProxy\_revision.xml' with XPath expression '/info/entry/
@revision'.
              [xmlpeek] C:\Web\CastleDynamicProxy\buildscripts
\common.xml(206,4):
              [xmlpeek] XML file 'C:\Web\CastleDynamicProxy\src
\Castle.DynamicProxy\_revision.xml' does not exist.
                 [echo] INFO: Using Subversion revision number: 0

            set-framework-configuration:

               [script] Scanning assembly "op4sf4wa" for extensions.

            set-net-3.5-framework-configuration:

            set-project-configuration:

            set-debug-project-configuration:

            common.init:

            init:

            common.set-assembly-attribute-values:

            common.generate-assemblyinfo:

               [attrib] Setting file attributes for 1 files to Normal.

            common.copy.project.references:

                 [copy] Copying 1 file to 'C:\Web\CastleDynamicProxy
\build\net-3.5\debug'.
                 [copy] Copying 1 file to 'C:\Web\CastleDynamicProxy
\build\net-3.5\debug'.
                 [copy] Copying 1 file to 'C:\Web\CastleDynamicProxy
\build\net-3.5\debug'.
                 [copy] Copying 1 file to 'C:\Web\CastleDynamicProxy
\build\net-3.5\debug'.

            common.compile-dll:

            build:

            BUILD SUCCEEDED - 2 non-fatal error(s), 0 warning(s)

            Total time: 1 seconds.

     [nant] C:\Web\CastleDynamicProxy\src\Castle.DynamicProxy.Tests
\default.build
            Buildfile: file:///C:/Web/CastleDynamicProxy/src/Castle.DynamicProxy.Tests/default.bui ld
            Target framework: Microsoft .NET Framework 3.5
            Target(s) specified: test

            common.find-svninfo:

                 [exec] C:\Web\CastleDynamicProxy\buildscripts
\common.xml(195,4):
                 [exec] 'svn' failed to start.
              [xmlpeek] Peeking at 'C:\Web\CastleDynamicProxy\src
\Castle.DynamicProxy.Tests\_revision.xml' with XPath expression '/info/
entry/@revision'.
              [xmlpeek] C:\Web\CastleDynamicProxy\buildscripts
\common.xml(206,4):
              [xmlpeek] XML file 'C:\Web\CastleDynamicProxy\src
\Castle.DynamicProxy.Tests\_revision.xml' does not exist.
                 [echo] INFO: Using Subversion revision number: 0

            set-framework-configuration:

               [script] Scanning assembly "waldny83" for extensions.

            set-net-3.5-framework-configuration:

            set-project-configuration:

            set-debug-project-configuration:

            common.init:

            common.copy.project.references:

                 [copy] Copying 1 file to 'C:\Web\CastleDynamicProxy
\build\net-3.5\debug'.
                 [copy] Copying 1 file to 'C:\Web\CastleDynamicProxy
\build\net-3.5\debug'.
                 [copy] Copying 1 file to 'C:\Web\CastleDynamicProxy
\build\net-3.5\debug'.
                 [copy] Copying 1 file to 'C:\Web\CastleDynamicProxy
\build\net-3.5\debug'.

            init:

            common.compile-tests:

            common.set-assembly-attribute-values:

            common.generate-assemblyinfo:

               [attrib] Setting file attributes for 1 files to Normal.

            common.copy.project.references:

                 [copy] Copying 1 file to 'C:\Web\CastleDynamicProxy
\build\net-3.5\debug'.
                 [copy] Copying 1 file to 'C:\Web\CastleDynamicProxy
\build\net-3.5\debug'.
                 [copy] Copying 1 file to 'C:\Web\CastleDynamicProxy
\build\net-3.5\debug'.
                 [copy] Copying 1 file to 'C:\Web\CastleDynamicProxy
\build\net-3.5\debug'.

            common.compile-dll:

            common.configure-tests:

               [attrib] Setting file attributes for 1 files to Normal.
              [xmlpoke] No matching nodes were found with XPath
expression '/configuration/appSettings/add[@key='tests.src']/@value'.

            common.run-tests:

                 [echo] Running tests in 'Castle.DynamicProxy2.Tests'

            BUILD FAILED - 2 non-fatal error(s), 1 warning(s)

            C:\Web\CastleDynamicProxy\buildscripts\common-project.xml
(311,5):
            'nunit-console.exe' failed to start.
                The system cannot find the file specified

            Total time: 1 seconds.

BUILD FAILED - 2 non-fatal error(s), 0 warning(s)

Nested build failed.  Refer to build log for exact reason.

Total time: 2.2 seconds.

On Jan 22, 1:51 am, Krzysztof KoŒmic (2) <krzysz...@kozmic.pl> wrote:

...

read more »


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
2 Krzysztof Koźmic  
View profile  
 More options Jan 22 2010, 3:54 am
From: Krzysztof Koźmic (2) <krzysz...@kozmic.pl>
Date: Fri, 22 Jan 2010 00:54:18 -0800 (PST)
Local: Fri, Jan 22 2010 3:54 am
Subject: Re: using lastest version of castle.dynamicproxy with nhibernate
Sam,

sorry for the inconvenience, we are changing our build, moving away
from nant.

try to build with the following command (assuming you have NAnt in
your PATH)

nant -D:assembly.allow-partially-trusted-callers=true clean merge
build

about the reasons for not providing APTCA assemblies OOTB see this
thread:
http://groups.google.com/group/castle-project-devel/browse_thread/thr...

On 22 Sty, 09:33, Sam Kimmel <sweep...@gmail.com> wrote:

...

read more »


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Sam Kimmel  
View profile  
 More options Jan 22 2010, 2:32 pm
From: Sam Kimmel <sweep...@gmail.com>
Date: Fri, 22 Jan 2010 13:32:08 -0600
Local: Fri, Jan 22 2010 2:32 pm
Subject: Re: using lastest version of castle.dynamicproxy with nhibernate

Krzysztof,

Thanks again.  What you said makes sense. Unfortunately, I don't think the
command is working. Should the final assembly sill end up in *debug
*directory?
I put in the fresh assembly and rebuilt the NHibernate.ByteCode.Castle
project and my project but still get the same permission error (below).  Do
I need a different version of NAnt? I've tried NAnt 0.85 and 0.86 beta.

In Matijn Boland's
blog<http://blogs.taiga.nl/martijn/2009/06/24/new-adventures-under-medium-...>he
talked about adding the APTCA attribute and needing to make a
modification to the code so that debug info wasn't emitted for
AssemblyBuilder.DefineDynamicModule. The svn trunk already had this
modification made (ModuleScope class). So I don't think that is the problem.

Medium Trust seems like a fairly common restraint put on shared hosting
customers.  How difficult would it be for the Castle team to set up the
build process to output DynamicProxy2.dll and a DynamicProxy2MT.dll (with a
disclaimer saying that the 2MT version should only be used when Medium Trust
is the only option)?

Is there anyone out there  with a working Medium Trust version of Dynamic
Proxy 2.2 that would be willing to share the final assembly?

==========================
[SecurityException: That assembly does not allow partially trusted
callers.]
   Castle.DynamicProxy.ModuleScope..ctor(Boolean savePhysicalAssembly,
INamingScope namingScope, String strongAssemblyName, String
strongModulePath, String weakAssemblyName, String weakModulePath) +0
   Castle.DynamicProxy.ModuleScope..ctor(Boolean savePhysicalAssembly,
String strongAssemblyName, String strongModulePath, String
weakAssemblyName, String weakModulePath) +75
   Castle.DynamicProxy.ModuleScope..ctor(Boolean savePhysicalAssembly)
+62
   Castle.DynamicProxy.ModuleScope..ctor() +31
   Castle.DynamicProxy.DefaultProxyBuilder..ctor() +44
   Castle.DynamicProxy.ProxyGenerator..ctor() +44
   NHibernate.ByteCode.Castle.ProxyFactory..cctor() +49
=============================

2010/1/22 Krzysztof Koźmic (2) <krzysz...@kozmic.pl>

...

read more »


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
xtoff  
View profile  
 More options Jan 22 2010, 3:02 pm
From: xtoff <krzysztof.koz...@gmail.com>
Date: Fri, 22 Jan 2010 12:02:52 -0800 (PST)
Local: Fri, Jan 22 2010 3:02 pm
Subject: Re: using lastest version of castle.dynamicproxy with nhibernate
http://groups.google.com/group/castle-project-users/web/APTCA-DP-UNSU...

On 22 Sty, 20:32, Sam Kimmel <sweep...@gmail.com> wrote:

...

read more »


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Sam Kimmel  
View profile  
 More options Jan 22 2010, 6:45 pm
From: Sam Kimmel <sweep...@gmail.com>
Date: Fri, 22 Jan 2010 15:45:17 -0800 (PST)
Local: Fri, Jan 22 2010 6:45 pm
Subject: Re: using lastest version of castle.dynamicproxy with nhibernate
Thanks xtoff.  When I saw the assemblies you posted I realized that
both the Core and the Dynamic Proxy were rebuilt.  I was only
rebuilding the Dynamic Proxies.

Just in case anyone else is interested in getting NHibernate + Castle
Dynamic Proxy working in medium trust, this is what you need to do:

1. If you don't have a SVN client, you'll need to download one.  I
used SubCommander (http://subcommander.tigris.org/), and while there
seem to be a couple quirky interface bugs, it did allow me to download
the trunks to the directories of my choice.
2. Download Nant (I used 0.86 beta) from http://nant.sourceforge.net/.
To install:
   a. Extract it to a directory
   b. Create a file called nant.bat with the following contents and
save it in C:\Windows
          @echo off
          "C:\<Path_To_Nant>\bin\NAnt.exe" %*

3. Download Castle Core from the svn: https://svn.castleproject.org/svn/castle/Core/trunk
    a. Edit the file buildscripts\CommonAssemblyInfo.cs and add the
following:
          using System.Security;
          [assembly: AllowPartiallyTrustedCallers]
          (**Note**: I added this because the nant parameter below
didn't seem to do inject it)
    b. Open the command prompt and navigate to the root directory,
then run:
          nant -D:assembly.allow-partially-trusted-callers=true clean
merge build

4. Download Castle Dynamic Proxies from the svn:
https://svn.castleproject.org/svn/castle/DynamicProxy/trunk
    a. Copy the Castle.Core.dll from the build directory in Step 3
into the lib directory of the Dynamic Proxy project
    b. Open the command propomt and navigate to the root directory,
then run:
         nant -D:assembly.allow-partially-trusted-callers=true clean
merge build

5. Download the NHibernate source from: http://sourceforge.net/projects/nhibernate/files/
    a. Open src\NHibernate.Everything.sln in Visual Studio
    b. Expand the NHibernate.ByteCode.Castle project
        i. Delete the references to Castle.Core and
Castle.DynamicProxy2 and replace them with the assemblies created in
steps 3 & 4
        ii.  Build NHibernate.ByteCode.Castle

6.  Open the projects you are working on that require medium trust
     a. Update the references to Castle.Core, Castle.DynamicProxy2,
and NHibernate.ByteCode.Castle in your project
     b. Make sure you have the [assembly:
AllowPartiallyTrustedCallers] attribute in the AssemblyInfo.cs file
for each of your own projects
     c. When setting up your NHibernate configuration, do this:
           /* for whatever reason, the <reflection-optimizer
use="false"/> is being ignored in hibernate.cfg.xml, so we need this
*/
           NHibernate.Cfg.Environment.UseReflectionOptimizer = false;
           config = new Configuration().Configure();

7. Build your projects and run your web pages in Medium Trust!

On Jan 22, 2:02 pm, xtoff <krzysztof.koz...@gmail.com> wrote:

...

read more »


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Krzysztof Koźmic  
View profile  
 More options Jan 23 2010, 5:05 am
From: Krzysztof Koźmic <krzysztof.koz...@gmail.com>
Date: Sat, 23 Jan 2010 11:05:35 +0100
Local: Sat, Jan 23 2010 5:05 am
Subject: Re: using lastest version of castle.dynamicproxy with nhibernate
Sam

could you post that to the wiki:
http://using.castleproject.org/display/CASTLE/Castle+Project

it would be more easily discoverable... google thread will disappear
quickly and we'll have people asking the same question over again.

cheers,

Krzysztof

On 2010-01-23 00:45, Sam Kimmel wrote:

...

read more »


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »