Closed GoogleCodeExporter closed 9 years ago
This was worked in the first version 1.0.0 but not the latest version. I wonder
if
there is any code need to be modified?
Original comment by maryanto...@gmail.com
on 11 Nov 2009 at 8:26
I'll see about this, for now. Hopefully I can get something out of this, with
the
limited time.
Original comment by electk...@gmail.com
on 11 Nov 2009 at 8:46
checked on other 2 stable version. 2.5.0 and 2.0.5 both are working fine..
Original comment by maryanto...@gmail.com
on 11 Nov 2009 at 8:51
Thanks for the information. I will see what I can do; now I'm just testing it
currently.
Original comment by electk...@gmail.com
on 11 Nov 2009 at 8:59
If possible, which version are you using which isn't working?
Original comment by electk...@gmail.com
on 11 Nov 2009 at 8:59
I've tried on the latest 3.0 ++ are not working
Original comment by maryanto...@gmail.com
on 11 Nov 2009 at 9:02
Okay, I'll see about it now. I'll attempt and see the reasoning for it. Thanks
for the
report.
Original comment by electk...@gmail.com
on 11 Nov 2009 at 9:04
Thanks for the help..
Original comment by maryanto...@gmail.com
on 11 Nov 2009 at 9:09
A you sure 2.5.0 can work? I think all of the version can't work because it
needs to
write files on the harddisk of client side, web app just don't have the
permission.
Original comment by freezing...@gmail.com
on 11 Nov 2009 at 9:43
yes it is work on mine.. I wonder why..
Original comment by maryanto...@gmail.com
on 11 Nov 2009 at 10:02
Same thing with me, under version 3.0.0 work, but this one doesn't work at all.
I'm
conering to this problem, using both versions to compare.
Original comment by electk...@gmail.com
on 11 Nov 2009 at 10:06
I got to do something else now, but I got some ideas from where this exception
is
coming from (I think):
NSMessageHandler, with the protected virtual void "OnUSRReceived". I'll try to
do more
research tomorrow, I'm not sure why it would cause this problem with the
comparisons
also.
Original comment by electk...@gmail.com
on 11 Nov 2009 at 10:14
Original comment by freezing...@gmail.com
on 11 Nov 2009 at 2:46
while (messenger.Owner.Status != PresenceStatus.Online)
{
if (messenger.Nameserver.IsSignedIn == true)
{
Nameserver_SignedIn(); // never triggered
}
}
messenger.Nameserver.IsSignedIn is always false, because you must set owner
precence:
Owner.Status = Online...
Original comment by hepha...@gmail.com
on 11 Nov 2009 at 3:16
Here is the code:
messenger = new Messenger();
messenger.Credentials = new Credentials("account", "pw");
messenger.Connect();
while (messenger.ContactService.AddressBookSynchronized == false)
{
Thread.Sleep(100);
Application.DoEvents();
}
messenger.Owner.Status = PresenceStatus.Online;
Original comment by hepha...@gmail.com
on 11 Nov 2009 at 3:34
Are you trying on windows application?
It works fine on windows application but not on web.
my point is that why in web application the event of
messenger.Nameserver.SignedIn
never triggered?
Original comment by maryanto...@gmail.com
on 12 Nov 2009 at 1:50
Place a break point at line 1058 of NSMessageHandler.cs:
OnAuthenticationErrorOccurred(e); and see what happend.
Original comment by freezing...@gmail.com
on 12 Nov 2009 at 5:27
Hello there maruantoLiauw,
With tests from a web application from what you wrote (with a few changes), I
breakpointed a couple of areas (thanks to freezingsoft) and eventually I got
this
exception:
"Asynchronous operations are not allowed in this context. Page starting an
asynchronous operation has to have the Async attribute set to true and an
asynchronous operation can only be started on a page prior to PreRenderComplete
event."
Assuming with the changes of code, try this and see how it goes. I've added a
tutorial which can help you turn on the Async option:
http://littletalk.wordpress.com/2008/06/05/asynchronous-operations-are-not-allow
ed-
in-this-context-page-starting-an-asynchronous-operation-has-to-have-the-async-
attribute-set-to-true-and-an-asynchronous-operation-can-only-be-started-on-a-pag
e/
Original comment by electk...@gmail.com
on 12 Nov 2009 at 10:14
[deleted comment]
Might be better to copy that link instead of pressing it, sorry if it appears
broken :(
Original comment by electk...@gmail.com
on 12 Nov 2009 at 10:16
I have tried, but nothing help as well. It works perfectly on version 2.0.5..
Weird
though.
Original comment by maryanto...@gmail.com
on 13 Nov 2009 at 3:07
That is because in 2.0.5 we use sync method to request a security token key for
your
password authentication. But in 3.0, we use async method to avoid blocking the
UI.
Maybe you need to write a background system to login, don't use this directly
on the
web page.
Original comment by freezing...@gmail.com
on 13 Nov 2009 at 4:04
By the way, you said 2.0.5 can work, can you get your contact list after login?
I
think in 2.0.5 you also can't get your contct list.
Original comment by freezing...@gmail.com
on 13 Nov 2009 at 4:08
Yes, I can. It works fine in 2.0.5 version.
Original comment by maryanto...@gmail.com
on 16 Nov 2009 at 3:59
Original comment by hepha...@gmail.com
on 16 Nov 2009 at 11:13
Hmm... I will see about this; I will try to look upon it, despite being busy.
Original comment by electk...@gmail.com
on 16 Nov 2009 at 11:37
I got a workaround for this if it can help.
{
System.Timers.Timer timer;
timer = new System.Timers.Timer(1);
timer.AutoReset = false;
timer.Elapsed += new System.Timers.ElapsedEventHandler(timer_Elapsed);
timer.Start();
while (messenger.Owner.Status != PresenceStatus.Online)
{
if (messenger.Nameserver.IsSignedIn == true)
{
Nameserver_SignedIn(); // never triggered
}
}
}
void timer_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
{
messenger.Connect();
}
Original comment by cheng....@gmail.com
on 5 Nov 2010 at 12:41
Can you give us more detail? If it is proved to work, maybe we can add a wiki
for your solution.
Original comment by freezing...@gmail.com
on 5 Nov 2010 at 1:44
[deleted comment]
And this code is better
System.Threading.Thread thread = new System.Threading.Thread(messenger.Connect);
thread.Start();
while (messenger.Owner.Status != PresenceStatus.Online)
{
if (messenger.Nameserver.IsSignedIn == true)
{
Nameserver_SignedIn(); // never triggered
}
}
it looks like you are using async connection, which can't be use in same thread
of .net web pages. So, if I start the connection in another thread, it will be
ok.
Original comment by cheng....@gmail.com
on 12 Nov 2010 at 1:49
Original issue reported on code.google.com by
maryanto...@gmail.com
on 11 Nov 2009 at 8:09