<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://forums.asp.net/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Security</title><link>http://forums.asp.net/25.aspx</link><description>All about ASP.NET security (authentication, authorization, membership, roles, etc.) and the Login controls. &lt;a href="http://aspadvice.com/SignUp/list.aspx?l=24&amp;c=17" target="_blank"&gt;Email List&lt;/a&gt;</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>Re: Access databases in Medium Trust</title><link>http://forums.asp.net/thread/1606563.aspx</link><pubDate>Tue, 06 Mar 2007 04:58:59 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1606563</guid><dc:creator>Dsypher</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1606563.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=25&amp;PostID=1606563</wfw:commentRss><description>&lt;blockquote&gt;&lt;div&gt;&lt;img src="http://forums.asp.net/Themes/default/images/icon-quote.gif" /&gt; &lt;strong&gt;DhanrajSeri:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Did you get this one resolved?, if yes, could you please provide me a resolution?. Thanks.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;p&gt;&amp;nbsp;Ya I did. I moved my Database to a different server where they dont have these stupid restrictions.&lt;br /&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Access databases in Medium Trust</title><link>http://forums.asp.net/thread/1605785.aspx</link><pubDate>Mon, 05 Mar 2007 18:40:21 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1605785</guid><dc:creator>DhanrajSeri</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1605785.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=25&amp;PostID=1605785</wfw:commentRss><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Did you get this one resolved?, if yes, could you please provide me a resolution?. Thanks.&lt;/p&gt;</description></item><item><title>Re: Access databases in Medium Trust</title><link>http://forums.asp.net/thread/1283373.aspx</link><pubDate>Thu, 11 May 2006 17:23:51 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1283373</guid><dc:creator>Dsypher</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1283373.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=25&amp;PostID=1283373</wfw:commentRss><description>Hi,&lt;br /&gt;&lt;br /&gt;Im facing exactly the same problem. As Jawad mentioned, I could use ODBC but my app has a GridView control which is bound to an AccessDataSource control which uses OleDb. So how can I make the AccessDataSource control use ODBC?&lt;br /&gt;&lt;br /&gt;I get the following exception when I load my page after uploading it to the server:&lt;br /&gt;&lt;br /&gt;&lt;span&gt;&lt;h2&gt; &lt;i&gt;Security Exception&lt;/i&gt; &lt;/h2&gt;&lt;/span&gt;

            &lt;font face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif "&gt;

            &lt;b&gt; Description: &lt;/b&gt;The
application attempted to perform an operation not allowed by the
security policy. &amp;nbsp;To grant this application the required permission
please contact your system administrator or change the application's
trust level in the configuration file. &lt;br /&gt;&lt;br /&gt;

            &lt;b&gt; Exception Details: &lt;/b&gt;System.Security.SecurityException:
Request for the permission of type 'System.Data.OleDb.OleDbPermission,
System.Data, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089' failed.&lt;/font&gt;&lt;br /&gt;</description></item><item><title>Re: Access databases in Medium Trust</title><link>http://forums.asp.net/thread/921473.aspx</link><pubDate>Tue, 10 May 2005 15:11:37 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:921473</guid><dc:creator>JawadKhan</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/921473.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=25&amp;PostID=921473</wfw:commentRss><description>&lt;P&gt;You can use ODBC besides OleDB as follows:&lt;/P&gt;
&lt;P&gt;For Access (JET) ODBC Driver &lt;/P&gt;
&lt;P&gt;Imports System.Data.Odbc; &lt;/P&gt;
&lt;P&gt;&lt;FONT color=green&gt;OdbcConnection oODBCConnection = new OdbcConnection(); &lt;BR&gt;&lt;BR&gt;oODBCConnection.ConnectionString = "Driver={Microsoft Access Driver (*.mdb)};" + &lt;BR&gt;"Dbq=" + Server.MapPath(".") + "MDBPathMDBName.mdb;" + &lt;BR&gt;"Uid=Admin;" + &lt;BR&gt;"Pwd="; &lt;BR&gt;oODBCConnection.Open(); &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;For Access (JET) OLE DB Provider &lt;/P&gt;
&lt;P&gt;using System.Data.OleDb; &lt;/P&gt;
&lt;P&gt;&lt;FONT color=green&gt;OleDbConnection oOleDbConnection = new OleDbConnection(); &lt;BR&gt;&lt;BR&gt;oOleDbConnection.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" + &lt;BR&gt;"Data Source=" + Server.MapPath(".") + "MDBPathMDBName.mdb;" + &lt;BR&gt;"User ID=Admin;" + &lt;BR&gt;"Password="; &lt;BR&gt;oOleDbConnection.Open(); &lt;/FONT&gt;&lt;/P&gt;
&lt;P align=left&gt;&lt;B&gt;OLEDB vs ODBC -- Which should you use?&lt;/B&gt;&lt;BR&gt;Given the option, it's a no brainer to use OLEDB over ODBC. But if you are restricted as you mentioned by your ISV then ODBC might be an option.ODBC has been &lt;BR&gt;around for years and is based on older and more bug laden technology. Therefore, ALWAYS use OLEDB if your server/host supports it. Microsoft even says it themselves:&lt;BR&gt;
&lt;BLOCKQUOTE&gt;When running Microsoft Jet in an IIS environment, it is recommended that you use the native Jet OLE DB Provider in place of the Microsoft Access ODBC driver. The Microsoft Access ODBC driver (Jet ODBC driver) can have stability issues due to the version of Visual Basic for Applications that is invoked because the version is not thread safe. As a result, when multiple concurrent users make requests of a Microsoft Access database, unpredictable results may occur. The native Jet OLE DB Provider includes fixes and enhancements for stability, performance, and thread pooling (including calling a thread-safe version of Visual Basic for Applications).&lt;/BLOCKQUOTE&gt;</description></item><item><title>Access databases in Medium Trust</title><link>http://forums.asp.net/thread/921264.aspx</link><pubDate>Tue, 10 May 2005 11:55:51 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:921264</guid><dc:creator>littlecharva</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/921264.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=25&amp;PostID=921264</wfw:commentRss><description>&lt;P&gt;&lt;FONT face=Arial size=2&gt;Hi,&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Arial size=2&gt;My new ASP.NET webhost, who had told me prior to ordering that I could use Access databases, has now told me that they operate a Medium Trust environment, and so the OleDb is off limits.&amp;nbsp; Having confronted them about this, they sent back:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Arial size=2&gt;&lt;EM&gt;You do not need OLEdb permissions to access an Access DB on the server. We've heard reports of many successful attempts to use Access DB's without changing any environment settings.&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Arial size=2&gt;So, is this true?&amp;nbsp; Can I use an Access database without using System.Data.OleDb?&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Arial size=2&gt;Little'un&lt;/FONT&gt;&lt;/P&gt;</description></item></channel></rss>