blog community

Welcome to blog community Sign in | Join | Help
in Search

Marcel de Vries, MVP Team System

.NET Technologies, Architecture and Web Development

HTTP Deployment, What is allowed in your local intranet?

Lately I developed some applications that are deployed using HTTP deployment. This is a great way of leveraging the web model of centralized deployment while using the full richness of a windows interface.

This all is great but you must be aware of the fact that you will face a different security model regarding code access security. When deploying an application on a local machine, your assembly will be granted the full trust Permission set. I discovered (the hard way) that not all permissions you might find useful in a windows application are accessible when using HTTP deployment. ( I spawned an additional thread to do background requests to the server, and got the security exception quite unexpected) This is because you assembly will be getting the permission set from the code groups “Intranet_Same_Site_Access” and “Intranet_Same_Directory_Access”. This results in the following set of permissions:

  • Environment Variables:
    •  USERNAME: Granted Read
  • File Dialog: 
    • Unrestricted
  • Isolated Storage
    • File: Usage Allowed
    • Disc quota: 9223372036854775807 (I assume that’s enough :-))
  • Reflection:
    • Member Access: No
    • Type Information: No
    • Reflection Emit: Yes
  • Security Permission:
    • Enable Code Execution: Yes
    • Allow Calls to Unmanaged Code: No
    • Assert any permission that has been granted: Yes
    • Skip Verification: No
    • Enable thread control: No
    • Allow Policy Control: No
    • Allow Domain Policy Control: No
    • Allow Principal Control: No
    • Create and Control Application Domains: No
    • Serialization Formatter: No
    • Allow Evidence Control: No
    • Extend Infrastructure: No
    • Enable Remoting Configuration: No
  • User Interface
    • Unrestricted
  • DNS
    • DNS: Yes
  • Printing
    • Default Printing: Yes
  • EventLog
    • Local Machine: Read Only
  • Web Access 
    • (https|http)://YourHostName /.* Accept: No
    • (https|http)://YourHostName /.* Connect: Yes

As you can see, this is really something you need to take into account when using HTTP deployment. Of course you can grand additional permissions, but then you need to take the effort of configuring code Access security for your assembly or your corporate key used for signing assemblies. Hope this list can help you decide upfront if HTTP deployment with the default code access policies will work for you.

Published Monday, September 05, 2005 1:56 PM by marcelv
Filed under:

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

 

Http deployment and .Net Framework said:

Do you know if the client machine needs to have the .Net framework installed when using http deployment?

Thanks!
January 22, 2006 3:46 PM
 

Marcel de Vries said:

Yes,
You definitely need the .NET framework installed on your client machine. You are downloading the .NET assembly into the download cache and that only contains the compiled code to MS IL. This needs to be JIT compiled and hosted by a runtime, so yes you need to have the .Net framework installed on your client machines.
Hope this helps,
Marcel
January 23, 2006 6:45 AM
 

Dobedani said:

Hi Marcel,

thanks for your post. When I log on to the network of my organisation, I am given a network drive M. Does the Intranet_Same_Directory_Access code group also apply to that network drive? Those who maintain our network and systems encourage that we store our files on that share and I am following their suggestion.

However, I started developing an application with Visual Studio and I am experiencing problems. The app requires access to a MS Access database. Upon opening the connection, I get an error: Request for the permission of type 'System.Data.OleDb.OleDbPermission, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

Do I have to something special to my code to make sure the permissions of the Intranet_Same_Directory_Access code group apply? TIA

Kind regards,

Dobedani

Wageningen ;-)

November 28, 2007 2:59 PM

Leave a Comment

(required) 
(optional)
(required) 
Submit
Powered by Community Server, by Telligent Systems