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 / .NET Framework / Interop / September 2003

Tip: Looking for answers? Try searching our database.

Access Denied trying to create New Instantance of Object

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Ian - 25 Sep 2003 15:17 GMT
The beginning of my assembly that I am getting the access error from looks
like this.
*********************************
Imports System.EnterpriseServices
Imports System
Imports System.Collections
Imports System.Configuration
Imports System.Data
Imports System.Data.Common
Imports System.Reflection
Imports System.Data.SqlClient
Imports System.Xml

Public Class AdoHelper
  Inherits ServicedComponent

  Public Sub New()
      MyBase.New()
  End Sub 'New
*********************************

When I am in my application and trying to create a instantance of the object
it looks like this.
Private oSql As New DataLayer.AdoHelper

And it throws an access denied error when I use the word "NEW". This
assembly was working fine in my application until I added the
EnterpriseServices assembly so that I can have the object hosted in com+. So
I don't where the disconnect is for me. I know it has something to do with
EnterpriseServices but I just don't what?

Any help would be helpful
Ying-Shen Yu[MSFT] - 26 Sep 2003 10:47 GMT
Hi lan,
   I'm not clear about the detail of the error. However, according to the
MSDN,
your client would be required to get full trust to create the
ServiedComponent, if you didn't
provide an AllowPartialTrustedCaller Attribute to your Component.
You may check the .NET security level of your account/computer using .NET
Wizards v1.1,
or try adding the AllowPartialTrustedCaller attribute to your component.

If you still have problem, please be free to let me know, and give me the
exception message.

Thanks!
Best regards,

Ying-Shen Yu [MSFT]
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security

This posting is provided "AS IS" with no warranties and confers no rights.
You should not reply this mail directly, "Online" should be removed before
sending, Thanks!

--------------------
| Reply-To: "Ian" <idalton@dlbabson.com>
| From: "Ian" <idalton@dlbabson.com>
[quoted text clipped - 44 lines]
|
| Any help would be helpful

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



©2008 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.