SecurityException in Web Service using ADOMD.NET

From: Vani Murarka (vani.murarka_at_gmail.com)
Date: 12/03/04


Date: Thu, 02 Dec 2004 23:04:53 -0800

I have a web service that uses ADOMD.NET. This web service runs fine on
most servers, but gives a Security Exception when running on a server
which also has Sharepoint (WSS) installed. The Security Exception I get
is given below.

I found that if I give the trust level=Full in the web.config in
wwwroot, the web service works on the server with sharepoint. But that
is something that is surely not desireable. The trust level that is not
normally set on the server is WSS_Medium. On going to the config file
for WSS_Medium (wss_mediumtrust.config), I could not really figure out
what entries to make for Microsoft.AnalysisServices.AdomdClient.

There is an entry for SqlClient -"SqlClientPermission"
Description="System.Data.SqlClient.SqlClientPermission ..."

Do I have to make any entry in this file (if so, what entry) or some
configuration somewhere else?

I have also specified the web service path to be excluded in the
Sharepoint Central Administration.

Please let me know the way out of this. I posted this query on the OLAP
forums, but with no luck. Maybe people here may be able to help as this
might be a configuration with sharepoint issue.

Thanks

Vani Murarka

------- (the web service is called iGBWebService) ----------
System.Security.SecurityException: Security error.
   at IGB.DataAccess.DataAccessComponent.OpenAdomdConnection()
   at IGB.DataAccess.DataAccessComponent..ctor() in
e:\ilumenwebservice\igbwebservice\dataaccess\dataaccesscomponent.cs:line
43
   at IGB.MetricsRetriever.AggregatedMetricsRetriever..ctor() in
E:\iLumenWebService\iGBWebService\MetricsRetriever\AggregatedMetricsRetr
iever.cs:line
33
   at IGB.iGbWebService..ctor() in
E:\iLumenWebService\iGBWebService\iGBWebService.asmx.cs:line 41

The granted set of the failing assembly was:
<PermissionSet class="System.Security.PermissionSet"
               version="1">
   <IPermission
class="System.Security.Permissions.EnvironmentPermission,
mscorlib, Version=1.0.5000.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089"
                version="1"
                Read="TEMP;TMP;USERNAME;OS;COMPUTERNAME"/>
   <IPermission class="System.Security.Permissions.FileIOPermission,
mscorlib, Version=1.0.5000.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089"
                version="1"
                Read="E:\iLumenWebService\iGBWebService"
                Write="E:\iLumenWebService\iGBWebService"
                Append="E:\iLumenWebService\iGBWebService"
                PathDiscovery="E:\iLumenWebService\iGBWebService"/>
   <IPermission
class="System.Security.Permissions.IsolatedStorageFilePermission,
mscorlib, Version=1.0.5000.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089"
                version="1"
                Allowed="AssemblyIsolationByUser"
                UserQuota="9223372036854775807"/>
   <IPermission class="System.Security.Permissions.SecurityPermission,
mscorlib, Version=1.0.5000.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089"
                version="1"
                Flags="Assertion, Execution, ControlThread,
ControlPrincipal, RemotingConfiguration"/>
   <IPermission class="System.Web.AspNetHostingPermission, System,
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
                version="1"
                Level="Medium"/>
   <IPermission class="System.Net.DnsPermission, System,
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
                version="1"
                Unrestricted="true"/>
   <IPermission class="System.Drawing.Printing.PrintingPermission,
System.Drawing, Version=1.0.5000.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a"
                version="1"
                Level="DefaultPrinting"/>
   <IPermission
class="Microsoft.SharePoint.Security.SharePointPermission,
Microsoft.SharePoint.Security, Version=11.0.0.0, Culture=neutral,
PublicKeyToken=71e9bce111e9429c"
                version="1"
                ObjectModel="True"/>
   <IPermission class="System.Data.SqlClient.SqlClientPermission,
System.Data, Version=1.0.5000.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089"
                version="1"
                Unrestricted="true"/>
   <IPermission class="Microsoft.SharePoint.Security.WebPartPermission,
Microsoft.SharePoint.Security, Version=11.0.0.0, Culture=neutral,
PublicKeyToken=71e9bce111e9429c"
                version="1"
                Connections="True"/>
   <IPermission class="System.Net.WebPermission, System,
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
                version="1">
      <ConnectAccess>
         <URI uri=""/>
      </ConnectAccess>
   </IPermission>
   <IPermission
class="System.Security.Permissions.UrlIdentityPermission,
mscorlib, Version=1.0.5000.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089"
                version="1"

Url="file://E:/iLumenWebService/iGBWebService/bin/iGBWebService.DLL"/>
   <IPermission
class="System.Security.Permissions.ZoneIdentityPermission,
mscorlib, Version=1.0.5000.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089"
                version="1"
                Zone="MyComputer"/>
</PermissionSet>

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!



Relevant Pages

  • ADOMD.NET and Sharepoint
    ... I have a web service that uses ADOMD.NET. ... The Security ... the web service works on the server with sharepoint. ... mscorlib, Version=1.0.5000.0, Culture=neutral, ...
    (microsoft.public.sharepoint.portalserver.development)
  • securityexception with ADOMD
    ... This web service works fine on other web ... servers, but fails on this one - maybe because this server has Windows ... System.Security.SecurityException: Security error. ... mscorlib, Version=1.0.5000.0, Culture=neutral, ...
    (microsoft.public.sqlserver.olap)
  • Re: securityexception with ADOMD
    ... Windows Integrated security. ... web service machine and then a 3rd Analysis server? ... > servers, but fails on this one - maybe because this server has Windows ... > mscorlib, Version=1.0.5000.0, Culture=neutral, ...
    (microsoft.public.sqlserver.olap)
  • RE: Web Service Implementation Security Question
    ... Server was unable to process ... CompilerParameters parameters, Assembly assembly, Hashtable assemblies) at ... > As for the security problems regarding on using TypedDAtaset in asp.net ... Web Service Implementation Security Question ...
    (microsoft.public.inetserver.iis.security)
  • Re: Permission Errors
    ... >a domain account so that it can be validated on the win2k server machine. ... However I have discovered that I can deploy the web service to the W2K ... domain server and there it runs with no problems, ... for me to decide that the new XP dev machine is up and usable. ...
    (microsoft.public.dotnet.general)