I'm having a problem implementing the new Messenger Connect functionality inside an existing Sitefinity site to enable client logins using Live IDs.
Namely, when I'm using the following code to implement the client-side functionality:
<head runat="server">
<script type="text/javascript" src="http://js.live.net/4.1/loader.js"></script>
</head>
<body>
<form runat="server" id="form1">
<asp:ScriptManager ID="ScriptManager1" runat="server"/>
<wl:app
client-id="<%= ConfigurationManager.AppSettings["wl_wrap_client_id"] %>"
scope="WL_Profiles.View"
callback-url="<%= ConfigurationManager.AppSettings["wl_wrap_client_callback"] %>?wl_session_id=<%=SessionId %>"
channel-url="/channel.htm">
</wl:app>
... I get three errors in Firebug that I can't quite identify correctly:
Sys.ArgumentTypeException: Object of type 'Sys._Application' cannot be converted to type 'Sys.IDisposable'. Parameter name: object
(in ScriptResource.axd?d=.... line 4993)
Sys.Application._doInitialize is not a function
(in MicrosoftAjaxBase.js line 1)
Sys.InvalidOperationException: The script 'MicrosoftAjaxGlobalization.js' has been referenced multiple times. If referencing Microsoft AJAX scripts explicitly, set the MicrosoftAjaxMode property of the ScriptManager to Explicit.
(in ScriptResource.axd?d=.... line 984)
The errors are only triggered when I include the loader.js
script from js.live.net.
EDIT: Seems the errors aren't necessarily triggered in that order. Refreshing the page seems to shuffle those errors and/or introduce other ones, such as a Sys.ParameterCountException
in ScriptResource.axd?...
on line 1842, for example.
Hey, I tried some combinations here, and the one that worked was:
1) Set the ScriptMode property of the ScriptManager to Release;
2) Load the MSN library in the CodeBehind Page_Load event, using the ClientScript class:
Firebug isn't showing any error anymore, and in my case, the authentication window is opening as desired.
Hope it helps!
EDIT
As told before, here follows the whole code I use to avoid this issue:
Default.aspx
Default.aspx.cs
Web.config
To see it running, you can access http://labs.asteria.com.br/wlm. It seems that the Consent URL (https://consent.live.com/AccessToken.aspx) is not responding at this time.