We help IT Professionals succeed at work.

com+  security issue

sinochek
sinochek asked
on

Hello ALL,
I have COM+ component that creates connection with SQL
Server 2000 and opens recordset.In my client application I
call the method of my component that opens
recordset        
 Set m_DLLObject = CreateObject("SQLSTProc.clsRunSQL")
 Set rs1 = New ADODB.Recordset
 m_DLLObject.GetServerDate rs1
This code works only locally when I test component on my
PC.When I export it I get error 70"Permission denied". If
I open recordset on my client my component works fine.
Does anybody know what I need to do to be able open ADO
recordset in the COM + component?
                                  Thank you very much.
.

Comment
Watch Question

Commented:
I have had this problem with one thirdparty component.

The solution in my case where to:
Change the properties of the package that your component is located in.

If you select properties on your package and then "click" the identity tab and view which account that your component uses. (currently logged on user or specified user on the server). You should choose "This user" and then specify a user account.

Then you check your users security level.
The properties of the user can you find in the Computer Managment tool under "Local users and groups".

Here you can change the properties for your user to a correct security level for your dll.

I supose that your DLL uses the administrators account on your computer (the user currently logged on). Developers are usually administrators of their own machines -:)

Author

Commented:
dannic,
I think that you are right. Unfortunately I can't try to do this now from my home PC. The one thing that I forgot to say in my question is the folowing.I've set Identity property of my component as valid user, but for username and password I used username and password that don't correspond me and my PC in Domain. I would appreciate if you express your opinion about this.
                                                 Thanks a lot.
           

Commented:
I would do something like this.

1) Create a new user account on the server where your components are running. eg. "COM" (Computer Managment->Local Users and groups)

2) Set the password for this local user.

3)Make this new user as "Member of" the correct usergroup. I would start to add the user to "Administrators" just to se if it works. If it works then I would try to set a little higher securty level on this user -:)

4) Dont forget to run your packages with components under the user account you have created and the correct password -:)

Good luck!

Author

Commented:
Thank you.
I'll try to do this.I'll let you know about the result.
            Again thank you for your consideration
If this proposed answer has helped you, please accept it, grade it and close this question.  If it did not, reject it and add comments as to your progress and what else is needed.  If no action is taken here by next week, we'll need to decide this outcome.  Expert input always welcome as well.

Thanks,
Moondancer
Community Support Moderator @ Experts Exchange
Unresponsive to my request, thus finalized.

Explore More ContentExplore courses, solutions, and other research materials related to this topic.