delegation

Is there a way to emulate PHP5's __call() magic method in PHP4 ?

PHP5 has a "magic method" __call()that can be defined on any class that is invoked when an undefined method is called -- it is roughly equivalent to Ruby's method_missing or Perl's AUTOLOAD. Is it possible to do something like this in older versions of PHP? ...

Kerberos Delegation for Clients Ouside the Firewall

I am trying to run a SQL Server Reporting Services where the data for the report is on a SQL Server database that's on a different server. Integrated Authentication is turned on for both the Report Server and the report. I have confirmed that Kerberos delegation is working fine by using Internet Explorer to run the report from inside t...

Need to Impersonate user forAccessing Network resource, Asp.Net Account

Hi, I need to access a network resource on which only a given Domain Account has access. I am using the LogonUser call, but get a "User does not have required priviliege" exception, as the web application is running with the asp.net account and it does not have adequate permissions to make this call. Is there a way to get around it? Ch...

HOWTO - Set delegated Active Directory privileges

I've created a c# webservice that allows our front end support teams to view and update a few selected Active Directory values using system.directoryservices Fields that I want to update are [job] title, department, telephone and employeeid. I can use a service account with "delegates rights" to update [job] title, department, telephon...

Why does my web part throw an error about "NT Authority/Anonymous User"?

My Sharepoint 2007 web part executes code to start a K2 workflow process. The workflow server resides on another server. When my code executes, I get the following error: "24408 K2:NT AUTHORITY\ANONYMOUS LOGON from 172.172.172.172:1721 does not have rights to Start Process MyProject\MyProcessName" I'm sure this is a general IIS delegat...

How can i start a console application using the 'network service' account

Hello, I have a console application that i would like to run as 'NT AUTHORITY\NetworkService', but i cant remember how to do so - the only reason is that i will be hosting my service in a windows service, but for kerberos authentication testing i want to use the spn that is already at the domain (it does have delegation enabled) In sho...

Impersonation and Delegation

I am using impersonation is used to access file on UNC share as below. var ctx = ((WindowsIdentity)HttpContext.Current.User.Identity).Impersonate(); string level = WindowsIdentity.GetCurrent().ImpersonationLevel); On two Windows 2003 servers using IIS6, I am getting different impersonation levels: Delegation on one server and Impe...

Objective-C Delegation Explained to a Java Programmer

I am fairly new to Objective-C, but experienced in Java. Is there the equivalent concept of Objective-C "delegation" in Java, so that I may understand this notion better? Would there be a way to emulate the delegation concept in Java? ...

C# method call delegation

Say I have a DLL assembly, containing an auto-generated class with two methods: public class AutoGeneratedClass { public int DoSomething(bool forReal) { ??? } public void DoSomethingElse(string whatever) { ??? } } The methods could be anything, really. The above is just an illustration. What kind of code would I need to gener...

OpenID Delegation

I have tried all the possible options to use openID delegation on my site, but none of the methods are working for me. I'm having the "link rel" tags in the head section of the HTML file. I'm having the xrds location meta tags in the head section of the HTML file. I'm setting HTTP Headers for X-XRDS-Location and X-YADIS-Location. I've...

C++/Java Inheritance vs. Delegation vs. etc...

Hello, I am creating a class library with many different options for possible customizations. For example, you can design your class so that it can perform FeatureX(), or you can design your class so that it can perform FeatureY(). Under normal circumstances, you would simply create an interface IFeatureX with a pure virtual method cal...

change event on a table fails in IE

I am using jQuery to capture a change event on a table. The table has many rows and each row has a few inputs boxes and a checkbox. To do this, I am using event delegation. I am capturing any changes at the tbody level. This is the code below $j('#orderItems tbody').change(function(event){ var target = $j(event.target); ...

When to use delegation instead of inheritance?

Could someone please explain when would I want to use delegation instead of inheritance? ...

Can I use OpenID delegation with a standard Google account?

I'm currently using ClaimID and have the following data on my website to allow delegation: <link rel="openid.server" href="http://openid.claimid.com/server" /> <link rel="openid.delegate" href="http://openid.claimid.com/tjrobinson" /> Are there equivalent URLs for Google? If not, has there been any mention of support in future? Befor...

What patterns do you use to decouple interfaces and implementation in C++?

One problem in large C++ projects can be build times. There is some class high up in your dependency tree which you would need to work on, but usually you avoid doing so because every build takes a very long time. You don't necessarily want to change its public interface, but maybe you want to change its private members (add a cache-vari...

LogonUser and delegation

I'm using the LogonUser win32 api: token = LogonUser(...) WindowsIdentity newId = new WindowsIdentity(token); WindowsImpersonationContext impersonatedUser = newId.Impersonate(); However when calling a WCF service after this I'm not able to use the impersonated identity. I think this is because impersonatedUser.Impersonatio...

Emulating membership-test in Python: delegating __contains__ to contained-object correctly

Hi, I am used to that Python allows some neat tricks to delegate functionality to other objects. One example is delegation to contained objects. But it seams, that I don't have luck, when I want to delegate __contains __: class A(object): def __init__(self): self.mydict = {} self.__contains__ = self.mydict.__contains_...

How to implement delegation the right way?

I'm trying to implement delegation for a class which should call it's delegate (if any), when special things happen. From Wikipedia I have this code example: @implementation TCScrollView -(void)scrollToPoint:(NSPoint)to; { BOOL shouldScroll = YES; // If we have a delegate, and that delegate indeed does implement our delegate m...

difference between strategy pattern and delegation pattern

What is the difference between strategy pattern and delegation pattern (not delegates)? ...

Tool to generate interface implementation by delegation ?

I often need to implement an interface by delegating the implementation to a member of my class. This task is quite tedious because, even though Visual Studio generates stubs for the interface methods, I still have to write the code to delegate the implementation. It doesn't require much thinking, so it could probably be automated by a c...