milop
Thu May 01 13:11:34 CDT 2008
I figured you were half-serious.
I thought about looking at the call stack but your way looks cleaner. I'll
take a closer look at it.
Thanks again,
Mike
"sloan" <sloan@ipass.net> wrote in message
news:uFqEYW7qIHA.5096@TK2MSFTNGP02.phx.gbl...
>
> Assembly.GetExecutingAssembly().
> Assembly.GetCallingAssembly Method
>
>
>
http://msdn.microsoft.com/en-us/library/system.reflection.assembly.getcallingassembly.aspx
>
>
>
> You can play around with those...I don't know if they'll work, but its at
> least a hint.
>
>
> The best solution is to put together a standards document and make people
> stick to it.
> It takes at least 1 person with some authority in the organization to get
> it to work.
> If you have a bunch of knights at the round table, then FIRING (at least)
> one of them is the best route.
> I'm half joking and half serious.
>
> ..
>
> Good luck.
>
>
>
>
>
> "milop" <milop@slomins.com> wrote in message
> news:%2320Zkn6qIHA.1436@TK2MSFTNGP05.phx.gbl...
>> Thanks for replying.
>>
>> Yes, it's in its own assembly.
>>
>> Aside from firing the person I was wondering if there was a way, in the
>> DAL code, to detect the "caller".
>>
>>
>>> "sloan" <sloan@ipass.net> wrote in message
>>> news:evVSjw5qIHA.2064@TK2MSFTNGP05.phx.gbl...
>>>>
>>>> Well, this is one reason I put the layers into different assemblies.
>>>>
>>>> So that the Presentation layers .... do NOT reference the
>>>> DAL(assembly), and thus you can't break the rules.
>>>>
>>>> Are you asking because of security? Or because of just enforcing good
>>>> design.
>>>>
>>>> If its just good design, break the code out into different assemblies.
>>>>
>>>> And if someone adds a reference from the Pres to the DAL.dll, fire
>>>> them.
>>>>
>>>> ..
>>>>
>>>> See:
>>>>
http://sholliday.spaces.live.com/Blog/cns!A68482B9628A842A!139.entry
>>>>
>>>> Also look at the "bird's eye view" article I mention at that blog
>>>> entry.
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> "milop" <milop@slomins.com> wrote in message
>>>> news:%23%23ns%23v3qIHA.4912@TK2MSFTNGP03.phx.gbl...
>>>>> Hello.
>>>>>
>>>>> We have an app with UI, Business, and Data Tiers.
>>>>>
>>>>> How can we ensure that the DAL tier is accessed only from the BLL
>>>>> tier? The idea is to prevent direct access to the DAL from the UI
>>>>> (asp.net pages in our case).
>>>>>
>>>>> Thanks in advance,
>>>>>
>>>>> Mike
>>>>>
>>>>
>>
>
>