Wednesday, March 7, 2012

Repost:External Assemblies in Reports

Hi ALL,
Is it true that any custom assembly that I create ,by defualt has
"Execution" permission and if it dosn't attempt to have access to protected
resources like files ,that secuity policy will do and I don't need to change
any security policy?
I've cretaed a simple Assemly which only returns an string ,and I'he given
it full permission in report server security policy ,but I still get a
security error...
Any Sugessions?
I appreciate your help.
ALIThis sounds like your custom assembly does more than "just return a string".
Also, just changing the security policy configuration is not sufficient if
your custom assembly needs more than ExecutionOnly permissions. You also
need to explicitly assert permissions in the code of your custom assembly.
Some articles about using custom code / custom assemblies:
*
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnsql2k/html/ERSCstCode.asp
*
http://msdn.microsoft.com/library/en-us/dnsql2k/html/dngrfCodeAccessSecurityInSQLServer2000ReportingServices.asp
Also, if your custom assembly is signed you'll need to put APTCA on it.
http://msdn.microsoft.com/library/en-us/RSPROG/htm/rsp_prog_rdl_2l7m.asp
Debugging custom assembly issues:
http://msdn.microsoft.com/library/en-us/RSPROG/htm/rsp_prog_rdl_8wyq.asp
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"ALI-R" <newbie@.microsoft.com> wrote in message
news:e40e4O45EHA.2592@.TK2MSFTNGP09.phx.gbl...
> Hi ALL,
> Is it true that any custom assembly that I create ,by defualt has
> "Execution" permission and if it dosn't attempt to have access to
protected
> resources like files ,that secuity policy will do and I don't need to
change
> any security policy?
> I've cretaed a simple Assemly which only returns an string ,and I'he given
> it full permission in report server security policy ,but I still get a
> security error...
> Any Sugessions?
> I appreciate your help.
> ALI
>
>|||I think I solved the problem,,,
I added "AllowPartiallyTrustedCallers" attribute to my assembly's manifiest
and now it is working.I think because "Host Expression Assemby" ,which is
responsible to call my custom assembly,has only "Execution" permission,it is
somehow classified as partially Trusted Caller and it can't call my assemly
without my assemly being marked by that attribute.
No My assemly dos nothing except returning a sime string which has been
constructed in its construcotr.
Anyways,thanks for your help .
Ali
"Robert Bruckner [MSFT]" <robruc@.online.microsoft.com> wrote in message
news:OX1d$p%235EHA.4004@.tk2msftngp13.phx.gbl...
> This sounds like your custom assembly does more than "just return a
string".
> Also, just changing the security policy configuration is not sufficient if
> your custom assembly needs more than ExecutionOnly permissions. You also
> need to explicitly assert permissions in the code of your custom assembly.
> Some articles about using custom code / custom assemblies:
> *
>
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnsql2k/html/ERSCstCode.asp
> *
>
http://msdn.microsoft.com/library/en-us/dnsql2k/html/dngrfCodeAccessSecurityInSQLServer2000ReportingServices.asp
> Also, if your custom assembly is signed you'll need to put APTCA on it.
> http://msdn.microsoft.com/library/en-us/RSPROG/htm/rsp_prog_rdl_2l7m.asp
> Debugging custom assembly issues:
> http://msdn.microsoft.com/library/en-us/RSPROG/htm/rsp_prog_rdl_8wyq.asp
> --
> This posting is provided "AS IS" with no warranties, and confers no
rights.
>
> "ALI-R" <newbie@.microsoft.com> wrote in message
> news:e40e4O45EHA.2592@.TK2MSFTNGP09.phx.gbl...
> > Hi ALL,
> >
> > Is it true that any custom assembly that I create ,by defualt has
> > "Execution" permission and if it dosn't attempt to have access to
> protected
> > resources like files ,that secuity policy will do and I don't need to
> change
> > any security policy?
> >
> > I've cretaed a simple Assemly which only returns an string ,and I'he
given
> > it full permission in report server security policy ,but I still get a
> > security error...
> >
> > Any Sugessions?
> >
> > I appreciate your help.
> > ALI
> >
> >
> >
>|||Yes, if the custom assembly is signed, you need to have the
AllowPartiallyTrustedCallers attribute set (this is what I meant with APTCA
in the previous posting).
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"ALI-R" <newbie@.microsoft.com> wrote in message
news:%23k9HrDF6EHA.3708@.TK2MSFTNGP14.phx.gbl...
> I think I solved the problem,,,
> I added "AllowPartiallyTrustedCallers" attribute to my assembly's
manifiest
> and now it is working.I think because "Host Expression Assemby" ,which is
> responsible to call my custom assembly,has only "Execution" permission,it
is
> somehow classified as partially Trusted Caller and it can't call my
assemly
> without my assemly being marked by that attribute.
> No My assemly dos nothing except returning a sime string which has been
> constructed in its construcotr.
> Anyways,thanks for your help .
> Ali
> "Robert Bruckner [MSFT]" <robruc@.online.microsoft.com> wrote in message
> news:OX1d$p%235EHA.4004@.tk2msftngp13.phx.gbl...
> > This sounds like your custom assembly does more than "just return a
> string".
> > Also, just changing the security policy configuration is not sufficient
if
> > your custom assembly needs more than ExecutionOnly permissions. You also
> > need to explicitly assert permissions in the code of your custom
assembly.
> >
> > Some articles about using custom code / custom assemblies:
> > *
> >
>
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnsql2k/html/ERSCstCode.asp
> > *
> >
>
http://msdn.microsoft.com/library/en-us/dnsql2k/html/dngrfCodeAccessSecurityInSQLServer2000ReportingServices.asp
> >
> > Also, if your custom assembly is signed you'll need to put APTCA on it.
> > http://msdn.microsoft.com/library/en-us/RSPROG/htm/rsp_prog_rdl_2l7m.asp
> > Debugging custom assembly issues:
> > http://msdn.microsoft.com/library/en-us/RSPROG/htm/rsp_prog_rdl_8wyq.asp
> >
> > --
> > This posting is provided "AS IS" with no warranties, and confers no
> rights.
> >
> >
> > "ALI-R" <newbie@.microsoft.com> wrote in message
> > news:e40e4O45EHA.2592@.TK2MSFTNGP09.phx.gbl...
> > > Hi ALL,
> > >
> > > Is it true that any custom assembly that I create ,by defualt has
> > > "Execution" permission and if it dosn't attempt to have access to
> > protected
> > > resources like files ,that secuity policy will do and I don't need to
> > change
> > > any security policy?
> > >
> > > I've cretaed a simple Assemly which only returns an string ,and I'he
> given
> > > it full permission in report server security policy ,but I still get a
> > > security error...
> > >
> > > Any Sugessions?
> > >
> > > I appreciate your help.
> > > ALI
> > >
> > >
> > >
> >
> >
>|||Thanks for your excellent help.
"Robert Bruckner [MSFT]" <robruc@.online.microsoft.com> wrote in message
news:%23$g0cwG6EHA.3076@.TK2MSFTNGP15.phx.gbl...
> Yes, if the custom assembly is signed, you need to have the
> AllowPartiallyTrustedCallers attribute set (this is what I meant with
APTCA
> in the previous posting).
> --
> This posting is provided "AS IS" with no warranties, and confers no
rights.
> "ALI-R" <newbie@.microsoft.com> wrote in message
> news:%23k9HrDF6EHA.3708@.TK2MSFTNGP14.phx.gbl...
> > I think I solved the problem,,,
> > I added "AllowPartiallyTrustedCallers" attribute to my assembly's
> manifiest
> > and now it is working.I think because "Host Expression Assemby" ,which
is
> > responsible to call my custom assembly,has only "Execution"
permission,it
> is
> > somehow classified as partially Trusted Caller and it can't call my
> assemly
> > without my assemly being marked by that attribute.
> >
> > No My assemly dos nothing except returning a sime string which has been
> > constructed in its construcotr.
> >
> > Anyways,thanks for your help .
> >
> > Ali
> >
> > "Robert Bruckner [MSFT]" <robruc@.online.microsoft.com> wrote in message
> > news:OX1d$p%235EHA.4004@.tk2msftngp13.phx.gbl...
> > > This sounds like your custom assembly does more than "just return a
> > string".
> > > Also, just changing the security policy configuration is not
sufficient
> if
> > > your custom assembly needs more than ExecutionOnly permissions. You
also
> > > need to explicitly assert permissions in the code of your custom
> assembly.
> > >
> > > Some articles about using custom code / custom assemblies:
> > > *
> > >
> >
>
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnsql2k/html/ERSCstCode.asp
> > > *
> > >
> >
>
http://msdn.microsoft.com/library/en-us/dnsql2k/html/dngrfCodeAccessSecurityInSQLServer2000ReportingServices.asp
> > >
> > > Also, if your custom assembly is signed you'll need to put APTCA on
it.
> > >
http://msdn.microsoft.com/library/en-us/RSPROG/htm/rsp_prog_rdl_2l7m.asp
> > > Debugging custom assembly issues:
> > >
http://msdn.microsoft.com/library/en-us/RSPROG/htm/rsp_prog_rdl_8wyq.asp
> > >
> > > --
> > > This posting is provided "AS IS" with no warranties, and confers no
> > rights.
> > >
> > >
> > > "ALI-R" <newbie@.microsoft.com> wrote in message
> > > news:e40e4O45EHA.2592@.TK2MSFTNGP09.phx.gbl...
> > > > Hi ALL,
> > > >
> > > > Is it true that any custom assembly that I create ,by defualt has
> > > > "Execution" permission and if it dosn't attempt to have access to
> > > protected
> > > > resources like files ,that secuity policy will do and I don't need
to
> > > change
> > > > any security policy?
> > > >
> > > > I've cretaed a simple Assemly which only returns an string ,and I'he
> > given
> > > > it full permission in report server security policy ,but I still get
a
> > > > security error...
> > > >
> > > > Any Sugessions?
> > > >
> > > > I appreciate your help.
> > > > ALI
> > > >
> > > >
> > > >
> > >
> > >
> >
> >
>

No comments:

Post a Comment