asp.net and COM

D

doug

hello all,
my client has purchased a third party COM object. my directive is to wrap
this up in a web service to save on licensing cost as this will need to be
accessed from 2+ machines.

this COM object uses ODBC to connect to a sql server. i know this as it
requires a data source of a select name on the machine.

i wrapped this up using interop and a class library in .Net.

when i instantiate this class in a web form or console where i have been
testing, all is good. when i instantiate this under a web service (worker
process). the calls to this objects connection method all fail!

i am confident it is using SQL Security as the connection properties ask for
a userid and password.

any thoughts as to what may be missing in the architecture?

thanks for reading.


Doug
 
J

Josh Twist

Permissions - the Web Service (worker process) will be running under
the ASPNET account which probably doesn't have permissions to access
your SQL server.

You'll either need to use impersonation (search on google for more
info) or allow the ASPNET account (probably a bad idea) permissions to
access your db.

Josh
http://www.thejoyofcode.com/
 
D

doug

thanks for the reply...

the Network Service account (it is running under that) is setup in dev as a
SQL Admin

i also did an ODBC Trace and i get nothing.

the trace shows activity whe ni run the same class under an exe.

doug
 
J

Josh Twist

Firstly, If they're on different boxes - are you sure it's the same
Network Service account?

Secondly, running ASP.NET under an admin enabled goes against all
security advice. Think carefully about this.

Let me know how you get on.

Josh
http://www.thejoyofcode.com/
 
D

doug

thanks, this is one machine.

also, this a dev environment and i am just attempting to troubleshoot.

thanks for taking time out.

doug
 
S

Simon Hart

If you are connecting to SQL Server using SQL security (providing a user id
and password) then it shouldn't matter what user the Web Service is running
under.

Are you sure you are not using Integrated Security?

Simon.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Com Events in ASP.Net 1
Losing com pointer 0
COM ActiveX 0
Asp.net interactive map 0
COM+ Proxy 1
COM Object with CLR 0
Controlling a COM application with a .NET web service 5
COM, again 0

Members online

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,073
Latest member
DarinCeden

Latest Threads

Top