Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Security Exception error

Status
Not open for further replies.

vincentw56

IS-IT--Management
Oct 10, 2002
47
US
I am working on converting an ASP page to ASP.NET. The problem is that I keep getting a Security Exception error. I guess this has to do with the Access database, but it works fine with the ASP code. I even used some code I found on here to see if it would work. Got the same thing. The code is posted below. The website is hosted on a 3rd party server. Any help would be appreciated.

Code:
<%@ Page Language=&quot;vb&quot; Debug=&quot;True&quot;%>
<%@ import Namespace=&quot;System.Data&quot; %>
<%@ import Namespace=&quot;System.Data.OleDb&quot; %>

<script runat=&quot;server&quot;>

    Sub Page_Load (Source As Object, E As EventArgs)

            Dim strConnection As String = &quot;Provider=Microsoft.Jet.OleDb.4.0;data source=e:\InetPub\Clients\kmwgamezone.com\fpdb\DVDGameAppList.mdb&quot;
            Dim ojbConnection As New OleDbConnection(strConnection)
            Dim strSQL As String = &quot;SELECT * FROM tblMain&quot;
            Dim ojbCommand As New OleDBCommand(strSQL, ojbConnection)

            ojbConnection.Open()
            dgNameList.DataSource = ojbCommand.ExecuteReader()
            dgNameList.DataBind()
            ojbConnection.Close()

    End Sub

</script>

<html>
<head>
</head>
<body>
    <asp:DataGrid id=&quot;dgNameList&quot; runat=&quot;server&quot; />
</body>
</html>


The website page is:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top