ADOMD.NET and Sharepoint

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


Date: 2 Dec 2004 21:25:23 -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\AggregatedMetricsRetriever.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>



Relevant Pages

  • 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: WSE 2.0, smart client, Username authentication, no x.509
    ... web services WSE 3.0 hosts them without a web server for you (read the WSE ... To perform authentication, because your database does not contain user ... the implementation William Stacey has uses Security ... > server where my web service is ...
    (microsoft.public.dotnet.framework.webservices.enhancements)
  • SecurityException in Web Service using ADOMD.NET
    ... I have a web service that uses ADOMD.NET. ... the web service works on the server with sharepoint. ... <IPermission ... mscorlib, Version=1.0.5000.0, Culture=neutral, ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: Web Service Security problem
    ... The web service project should hav a web.config. ... Allowin that account access to lan resources would be a large security risk. ... > different username that is known to the domain server? ... > Another possible issue is the ASPNET account on the server. ...
    (microsoft.public.dotnet.framework.aspnet.webservices)
  • Web Service Security problem
    ... I wrote a test web service using managed C++. ... failed logon attempt by user ASPNET every time I try to open the file. ... different username that is known to the domain server? ... I read somewhere that asp.net security does not apply to non .NET ...
    (microsoft.public.dotnet.framework.aspnet.webservices)