Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Web Services / May 2006

Tip: Looking for answers? Try searching our database.

asp.net and COM

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
doug - 03 May 2006 13:53 GMT
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
Josh Twist - 03 May 2006 15:17 GMT
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/
doug - 03 May 2006 16:34 GMT
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

> Permissions - the Web Service (worker process) will be running under
> the ASPNET account which probably doesn't have permissions to access
[quoted text clipped - 6 lines]
> Josh
> http://www.thejoyofcode.com/
Josh Twist - 04 May 2006 09:41 GMT
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/
doug - 04 May 2006 13:58 GMT
thanks, this is one machine.

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

thanks for taking time out.

doug

> Firstly, If they're on different boxes - are you sure it's the same
> Network Service account?
[quoted text clipped - 6 lines]
> Josh
> http://www.thejoyofcode.com/
Simon Hart - 04 May 2006 21:40 GMT
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.

> thanks, this is one machine.
>
[quoted text clipped - 14 lines]
>> Josh
>> http://www.thejoyofcode.com/

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.