Authorization plugin: URL referer retrieving problem

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Hello all.

I am currently developping an authorization plugin.
The authorization is based on the URL referer.

In a few words, I would like to retrieve the client URL referer (if
available), and compare it to a list of referers authorized to access
to the content of my publication point.

In the AuthorizeEvent interface implementation, I combine the
UserContext and the GetStringValue method to retrieve the URL Referer:

string l__URLRefererString= string.Empty;
io__UserContext.GetStringValue
(
WMSDefines.WMS_USER_REFERER,
WMSDefines.WMS_USER_REFERER_ID,
out l__URLRefererString,
0
);

However, il still get the same problem, this method throws the
following exception:
Exception from HRESULT: 0x8002000B (DISP_E_BADINDEX))

Although the following code worked perfectly

string l__UserIPAddress = string.Empty;
io__UserContext.GetStringValue
(
WMSDefines.WMS_USER_IP_ADDRESS_STRING,
WMSDefines.WMS_USER_IP_ADDRESS_STRING_ID,
out l__UserIPAddress,
0
);

It seems that the value of WMS_USER_REFERER is not included in the User
Context, but the documentation indicates the opposite.
I tested to read my stream publication point via my Windows media
player. This gave me no URL referer (pretty normal in this case)
But I also tested to read my stream publication point via an embed
Windows media player object in HTML page. The result was the same.

Is there anyone who encountered such trouble?
To Summarize, how can retrieve the URL referer from my AuthorizeEvent
interface implementation?

Thanks in advance.

Jordan

.



Relevant Pages

  • Re: Authorization plugin: URL referer retrieving problem
    ... I am currently working on Windows Media service authorization plugin. ... and I still not manage to retrieve the ... void IWMSBasicPlugin.InitializePlugin ... IWMSContext i__ServerContext, ...
    (microsoft.public.windowsmedia.server)
  • Re: Forms Authentication - "Deny users = ?" necessary
    ... I can't believe Authentication and Authorization are mixed... ... If I want to identify/authenticate a user (for example to retrieve his ... settings from the server, let's say), the only way is to direct him to ...
    (microsoft.public.dotnet.framework.aspnet.security)