OracleOleDb in C#

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am using Oracle OleDb objects to connenct to database. It is working fine
in my development machine. When I copied the application code to the server
it is failing to make a connection and query the data.

Initially I thought that there might be MDAC upgrade I did that, but still
no luck. Is there anyhelp please.

Thanks in advance.
 
TMC,

Is this an ASP.NET app? Is the database on a different machine in the
production environment? If so, this could be the case, since the ASP.NET
environment runs under the local ASPNET user account by default (which
doesn't have network access).

If this is the case, you will have to change the application so that the
pages that want to access the database run under a different user account
than the ASPNET local account. You can do this through the identity tag in
the web.config file for the directory, or through code (check the
documentation for the Impersonate method on the WindowsIdentity class for
more details).

Hope this helps.
 
Yes this is ASP.NET app., but the database is on the same machine.

Can you tell me how to set identity tag in the web.config file for the
directory. And what to set the identiy tag.

Please let me know. Thanks.


Nicholas Paldino said:
TMC,

Is this an ASP.NET app? Is the database on a different machine in the
production environment? If so, this could be the case, since the ASP.NET
environment runs under the local ASPNET user account by default (which
doesn't have network access).

If this is the case, you will have to change the application so that the
pages that want to access the database run under a different user account
than the ASPNET local account. You can do this through the identity tag in
the web.config file for the directory, or through code (check the
documentation for the Impersonate method on the WindowsIdentity class for
more details).

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

TMC said:
I am using Oracle OleDb objects to connenct to database. It is working fine
in my development machine. When I copied the application code to the
server
it is failing to make a connection and query the data.

Initially I thought that there might be MDAC upgrade I did that, but still
no luck. Is there anyhelp please.

Thanks in advance.
 
Tim,

Check out this link titled "How to implement impersonation in
ASP.NET web application", located at (watch for line wrap) for information
on how to use the identity tag to change the user that the local application
runs under:

http://www.dotnetspider.com/Technology/KBPages/403.aspx


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Tim said:
Yes this is ASP.NET app., but the database is on the same machine.

Can you tell me how to set identity tag in the web.config file for the
directory. And what to set the identiy tag.

Please let me know. Thanks.


Nicholas Paldino said:
TMC,

Is this an ASP.NET app? Is the database on a different machine in
the
production environment? If so, this could be the case, since the ASP.NET
environment runs under the local ASPNET user account by default (which
doesn't have network access).

If this is the case, you will have to change the application so that
the
pages that want to access the database run under a different user account
than the ASPNET local account. You can do this through the identity tag
in
the web.config file for the directory, or through code (check the
documentation for the Impersonate method on the WindowsIdentity class for
more details).

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

TMC said:
I am using Oracle OleDb objects to connenct to database. It is working
fine
in my development machine. When I copied the application code to the
server
it is failing to make a connection and query the data.

Initially I thought that there might be MDAC upgrade I did that, but
still
no luck. Is there anyhelp please.

Thanks in advance.
 
Back
Top