HighTechTalks DotNet Forums  

Custom.config for remoting application

Dotnet Security microsoft.public.dotnet.security


Discuss Custom.config for remoting application in the Dotnet Security forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
=?Utf-8?B?TWF1cml6aW8gUG9sZXR0bw==?=
 
Posts: n/a

Default Custom.config for remoting application - 07-19-2007 , 01:34 PM






I developed an application client-server based where an user, using a
Http/Tcp .Net remoting connection, can open a tool to build aspx pages. On
its turn, these pages can be visited through a web browser resident on the
client application. In order to avoid the user can include a malicious code
in codebehind file (for instance File.Delete(path)), I want to limit the
access of the remote resources. For this goal, I have modified the web.config
file adding the following code:

<securityPolicy>
<trustLevel name="Custom" policyFile="web_CustomTrust.config" />
</securityPolicy>
<trust level="Custom" originUrl="" />

where web_CustomTrust.config is custom config file.
Actually this file coincides with web_hightrust.config fetched from
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\CONF IG.
However, through this file authorizes high trust level of access, when I try
to see the page using the web browser, an error occurs in the global.asax so
defined:

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:


Line 148: Application["remoteService"] = texService;
Line 149: }
Line 150: }
Line 151: }
Line 152:}

Can someone suggest how I can modify my web_CustomTrust.config to avoid this
problem ?
Thanks and best regards.





Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.