Home All Groups Group Topic Archive Search About
Author
19 Sep 2006 8:24 AM
Frank
Hello to all,
We have the following problem:

using: Framework 2, VB.NET, Visual Studio 2005, SQL Server 2005 or MSAccess,
Win XP professional service pack 2.
We developed a WebService that is now installed in a machine. The database
is located in the same machine where web service is installed.
When we call a method of the web service from  a remote web page (internet)
the exception given is the following:

Error loading [....table] dataRequest for the permission of type
'System.Data.OleDb.OleDbPermission, System.Data, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

web service and page have <authentication mode="None"/>

Calling the we service fron Intranet it works.

In the machine is installed Framework1.1 also.
We get the same error using SQL server and access with OleDB and Odbc. (with
ODBC the error is ....permission of type
'System.Data.OleDb.ODBCPermission......)


Any idea? please!!!!

Author
24 Sep 2006 3:01 AM
Joseph Bittman MVP MCSD
Sept. 23, 2006

The problem is web sites have limited Code Access Security permissions
(CAS)... you need to get your web service granted the OleDB permission
through CAS.

You can do this in the web.config of the web service, by adjusting the
<trust> element (do a quick search on MSDN).

The intranet does have the OleDB permission, which is the reason why calling
it from the Internet zone doesn't work..... because the "zone" of your
service gets different permissions.

Hope this helps!
--

                       Joseph Bittman
     Microsoft Certified Solution Developer
Microsoft Most Valuable Professional -- DPM

Blog/Web Site: http://CactiDevelopers.ResDev.Net/
Show quoteHide quote
"Frank" <rfran***@bbinfo.com> wrote in message
news:OlY2RU82GHA.696@TK2MSFTNGP03.phx.gbl...
> Hello to all,
> We have the following problem:
>
> using: Framework 2, VB.NET, Visual Studio 2005, SQL Server 2005 or
> MSAccess, Win XP professional service pack 2.
> We developed a WebService that is now installed in a machine. The database
> is located in the same machine where web service is installed.
> When we call a method of the web service from  a remote web page
> (internet) the exception given is the following:
>
> Error loading [....table] dataRequest for the permission of type
> 'System.Data.OleDb.OleDbPermission, System.Data, Version=2.0.0.0,
> Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
>
> web service and page have <authentication mode="None"/>
>
> Calling the we service fron Intranet it works.
>
> In the machine is installed Framework1.1 also.
> We get the same error using SQL server and access with OleDB and Odbc.
> (with ODBC the error is ....permission of type
> 'System.Data.OleDb.ODBCPermission......)
>
>
> Any idea? please!!!!
>
>