Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
DB Engine
SQL ServerMSDESQL Server CE
Services
Analysis (Data Mining)Analysis (OLAP)DTSIntegration ServicesNotification ServicesReporting Services
Programming
CLRConnectivitySQLXML
Other Technologies
ClusteringEnglish QueryFull-Text SearchReplicationService Broker
General
Data WarehousingPerformanceSecuritySetupSQL Server ToolsOther SQL Server Topics
DirectoryUser Groups
Related Topics
MS AccessOther DB ProductsMS Server Products.NET DevelopmentVB DevelopmentJava DevelopmentMore Topics ...

SQL Server Forum / Services / Reporting Services / July 2008

Tip: Looking for answers? Try searching our database.

Custom Assembly, Web Service, and System.Net.WebPermission

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
cori - 03 Jul 2008 16:21 GMT
I've deployed a report that uses a custom assembly which calls a web service
to return a specific string value.  The web service is running on the same
server as the web front end for Reporting Services, and works as expected
when called separately.  When I run the report the column that holds the web
service's return value instead shows an error message:
"Request for the permission of type 'System.Net.WebPermission, System,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed."

I've also got the stack trace, but I'm not sure that'll be helpful in this
context.  If it is, however, I'm happy to paste it in here.

The custom assembly is asserting that permission, with no luck.  I can
however retrieve that value if I set the Reporting Services web site's
web.config file to use FullTrust permissions instead of relying on the
rssrvpolicy.config file for permissions settings (replacing

"      <securityPolicy>
       <trustLevel name="RosettaSrv" policyFile="rssrvpolicy.config" />
     </securityPolicy>
   <trust level="RosettaSrv" originUrl="" />"

with

"      <securityPolicy>
       <trustLevel name="Full" policyFile="internal" />
     </securityPolicy>
   <trust level="Full" originUrl="" />")

That implies to me that I could set a more resrictive security policy in
rssrvpolicy.config and still be able to use my web service resource, if only
I knew what settings to use.  And, for what it's worth, if I access the
report on the web site on the sql server that's running this instance of
Reporting Services I see the exact same behavior (a WebPermissions failed
error when under the default web.config and success when using a completely
permissive web.config setting) with the web service itself running on a
remote machine (the machine that's hosting the web front end for reporting
services).  Also, FWIW, I've tried setting FullTrust on the custom assembly
in rssrvpolicy.config as well, and the custom assembly is installed in the
GAC, to boot.  That also has produced no joy.

Anybody have a tip to point me in the right direction of which permissions I
should set in rssrvpolicy.config to allow this behavior?

If it would be helpful I can also detail the web service's internals, though
it doesn't seem to be the source of the problem.  Short form: the web service
uses the SAP .Net Connector to access a long text field in the SAP database
and return its value for a given SAP object.  I can't do this directly in the
report because the SAP .Net Connector's assemblies are 32-bit .Net 1.1x
beasts and we're running on a 64-bit SQL Server box, thus the web service.
Signature

Thanks;
cori

cori - 08 Jul 2008 20:57 GMT
Additional Context for my original post: the permissions problem seems not to
occur when the web service is running on the same machine - in our
development/testing environment we have a SQL server running
ReportingServices and a remote web front-end connected to it.  The
web-service is running on the same machine as the web-front end, and I don't
get the permissions error there, but I do on the sql server itself.
Signature

Thanks;
cori

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.