Home All Groups Group Topic Archive Search About

Security Exception due to Medium trust level

Author
18 Mar 2005 5:43 AM
vrush Deshpande
Hello,

We have a web application developed in ASP.NET and MySQL database.

The code works fine if trust level of web server is kept high for
ASP.NET. It seems all service providers keep trust level Medium by
default.

If database read, write is commented, it works fine with Medium trust
level.

Database is MySQL database, DSN less connection with MyODBC 3.51 is
used.

We also tried with database provider CoreLab.MySql.dll instead of MyODBC
3.51

Regards,
Vrushali


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

Author
18 Mar 2005 8:20 PM
Nicole Calinoiu
Full trust demands are imposed on most (or all?) of the classes in the
System.Data.Odbc namespace.  Given this, the only practical way to call into
it from code running at the ASP.NET default medium trust level is to place
all calls via a fully trusted broker assembly that asserts full trust on
behalf of its callers.  Of course, this means creating the broker assembly
(which does require quite a bit of care in order to avoid opening some
pretty big security holes) then convincing server administrators install it
and let you use it.  Since the latter part is likely to be as difficult as
convincing them to run your web application under full trust, this probably
isn't the way to go.

I'm not familiar with the CoreLab provider for the MySQL, but I'm guessing
that it probably demands some permission not granted to your code under
medium trust.  It's also possible that it simply does not allow partially
trusted callers.

Your best bet for resolving this problem might be attempting to find an
ADO.NET provider for MySQL that will work with partially trusted callers.
There appear to be several providers, but you'll probably have better luck
asking about them in an ADO.NET or MySQL group.




Show quote
"vrush Deshpande" <vrusha***@gmail.com> wrote in message
news:uvBj213KFHA.1476@TK2MSFTNGP09.phx.gbl...
> Hello,
>
> We have a web application developed in ASP.NET and MySQL database.
>
> The code works fine if trust level of web server is kept high for
> ASP.NET. It seems all service providers keep trust level Medium by
> default.
>
> If database read, write is commented, it works fine with Medium trust
> level.
>
> Database is MySQL database, DSN less connection with MyODBC 3.51 is
> used.
>
> We also tried with database provider CoreLab.MySql.dll instead of MyODBC
> 3.51
>
> Regards,
> Vrushali
>
>
> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!

AddThis Social Bookmark Button