Need Help setting up integration project

Last post 10-20-2006, 8:47 AM by kuljitsingh. 6 replies.
Sort Posts: Previous Next
  •  10-12-2006, 12:24 PM 23521

    Need Help setting up integration project

    I am trying to integrate Cutechat in portal software. We wish to keep the rooms open (anonymous users) but at the same time make sure only portal users are accessing the chat.
    Our portal has a framework and I tried embedding it in the source code of cutechat (few of portal DLLs). Using these portal libraries I can check if the request is coming from a portal user that is logged in.
     
    I am getting TRUST LEVEL error while accessing portal methods.
     
    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.EnvironmentPermission, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 failed.
    I have tried changing "TRUST LEVEL" in web.config and configuring ".NET Configuration tool".
     
    I would appreciate any help. 
    Thanx
  •  10-12-2006, 2:06 PM 23533 in reply to 23521

    Re: Need Help setting up integration project

    kuljitsingh,
     
    >>We wish to keep the rooms open (anonymous users) but at the same time make sure only portal users are accessing the chat.
     
    This can be achieved after you create chat rooms. There is an option which allows you set "Allow anonymous".
     
    Is you solution folder on the network instead of local machine?
     
    If yes, please copy the solution to local machine.
     
     
    If no, please check the thread below:
     
    System.Security.Permissions.EnvironmentPermission,mscorlib

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

  •  10-13-2006, 8:58 AM 23553 in reply to 23533

    Re: Need Help setting up integration project

    hi Adam
     
    Solution file is local.
     
    I folowed thelink you sent. I tried similar yesterday but it did not work. In my case i have to change web.config as oppose to rssvrsecurity.config (which is for reporting services) . i am tryint to use PortalEDK.dll in my application. For this i created "EDKdllCuteChat" Code group using .NEt config tool with Fulltrust. Adding following lines to my web.config. I am not sure what I am doing wrong.
     
    Really appreciate your help. Thanks
     
     <mscorlib>
      <security>
       <policy>
        <PolicyLevel version="1">
         <SecurityClasses>
          <SecurityClass Name="EnvironmentPermission" Description="System.Security.Permissions.EnvironmentPermission, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
         </SecurityClasses>
         <NamedPermissionSets>
          <PermissionSet class="NamedPermissionSet" version="1" Unrestricted="true" Name="FullTrust" Description="Allows full access to all resources" />
         </NamedPermissionSets>
         <CodeGroup class="UnionCodeGroup"
                                 version="1"
                                 PermissionSetName="FullTrust"
                                 Name="EDKdllCuteChat"
                                 Description="">
                         <IMembershipCondition class="UrlMembershipCondition"
                                               version="1"
                                               Url="http://ptportalplay/Sampleportal/bin/PortalEDK.dll"/>
                      </CodeGroup> 
        </PolicyLevel>
       </policy>  
      </security>
     </mscorlib>
  •  10-19-2006, 9:05 AM 23700 in reply to 23553

    Re: Need Help setting up integration project

    Hi Adam
    I found following about our portal library (called EDK). It is a set of dll files
     
    Granting any <trust> level below Full could potentially cause the .NET EDK to throw the following error: System.Security.SecurityException: Request for the permission of type System.Security.Permissions.EnvironmentPermission, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 failed. ...
     
    one way around suggested (but i cudn't get it work):
    Normal EDK operation does not exhibit this behavior. Only grant the <trust> level Full if your application encounters this error or if it is required for another reason. The strongly named .NET EDK allows partially trusted callers (AllowPartiallyTrustedCallers). For information on partially trusted callers see Microsoft's documentation of AllowPartiallyTrustedCallers
     
    Is there way to make cutechat work with TRUST LEVEL = FULL?
    Or Do you know how to get above mentioned workaround in motion? (I have 6 strongly named portal LLs) :-(
     
    Thanks for ur help.
    Kuljit 
     
  •  10-19-2006, 2:50 PM 23718 in reply to 23700

    Re: Need Help setting up integration project

    Kuljit,
     
    Cute Chat can work with full trust by default.
     
    Just make sure you check your web.confg file and remove the following code:
     
    <trust level="Medium" />
     
    Keep me posted
     

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

  •  10-19-2006, 7:41 PM 23727 in reply to 23718

    Re: Need Help setting up integration project

    I tried that ealier and again today... I get the following error
     

    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: Assembly cutesoft.chat.dll security permission grant set is incompatible between appdomains.

    Source Error:

    Line 196:				<add assembly="System.EnterpriseServices, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
                Line 197:				<add assembly="System.Web.Mobile, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
                Line 198:				<add assembly="*"/>
                Line 199:			</assemblies>
                Line 200:		</compilation>

    Source File: c:\windows\microsoft.net\framework\v1.1.4322\Config\machine.config    Line: 198


    Version Information: Microsoft .NET Framework Version:1.1.4322.2300; ASP.NET Version:1.1.4322.2300
  •  10-20-2006, 8:47 AM 23738 in reply to 23727

    Re: Need Help setting up integration project

    hi Adam

    I created a new project, copied over cute chat code, and removed "Trust level = medium' from webconfig and everything works now.
    Thanks for all your help

    Kuljit

View as RSS news feed in XML