RE: Custom Configuration Section Handler and Code Access Security
- From: stcheng@xxxxxxxxxxxxxxxxxxxx (Steven Cheng[MSFT])
- Date: Mon, 18 Jun 2007 06:09:48 GMT
Hi Doug,
From your descirption, you've defined a custom configuration sectionhandler and use it in your .net application(the class also be compiled to
the main exe assembly), this worked well on local drive but encounter some
assembly loading issue when deploy on a remote share, correct?
As for this problem application, so far the deployed application folder
should only contains two files:
** the application's main exe assembly
** the app.config (exe.config)
correct? I have performed a local test which is a console application use a
custom configuration section handler( defined in the main assembly). After
I deploy the application to a UNC share folder and access from another
box(windows 2003), here are what I got based on the testing:
1. If I grant the unc share folder "FullTrust" through URL evidence, then
the application can work without problem
2. If you do not grant the entire share folder "FullTrust", and only grant
the main assembly "FullTrust" by strong-name evidence, you need to make
sure you always use the strong-name signature(include public key token) in
any configuration setting or code which reference the assembly. For
example, in the app.config's custom configuration section register section,
you need to use full assembly name(with publickey token) when declare the
custom section handler type (as below);
===============
<configuration>
<configSections>
<sectionGroup name="myCustomGroup">
<section
name="myCustomSection"
type="CASSection.CASSection, CASSection, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=04e2c2d696067136"
allowLocation="true"
allowDefinition="Everywhere"
/>
...................
===========================
If you use a private assembly name, it will also cause problem.
You can have a try on your side to see whether this is the cause. If you
have any other finding, please feel free to post here.
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
.
- Follow-Ups:
- RE: Custom Configuration Section Handler and Code Access Security
- From: Dougie Brown
- RE: Custom Configuration Section Handler and Code Access Security
- Prev by Date: Re: Windows XP Pro Won't Reboot
- Next by Date: Autorun an exe file after setup is finished
- Previous by thread: Re: Backgroundworker chokes
- Next by thread: RE: Custom Configuration Section Handler and Code Access Security
- Index(es):
Relevant Pages
|