I'm developing a messaging application that runs within a larger program. When the user logs off in the main program, an event is triggered to log them off in my module. The same occurs for log on. Right now the first user gets in fine, but there is an error about accepting the security certificate every time the second user tries to get in. I have no idea why this error would exist as the first user gets in fine, and the logic is the same. I know this isn't a ton to go on, but are there any obvious things I should check?
I'm using C# with Jabber.NET as my main XMPP library.
Did you wire up the OnInvalidCertificate callback in one and not the other?
Related
I have an app that sends SMS's out to a bunch of people. Those messages contain links. They are not using any link shorteners or any other service. They link back to my site. The links themselves are randomized strings, which are stored in my db, which are associated with an action. (Click "yes" or "no" link and the db tracks what you chose.) For ALL users, this works perfectly. With one user - and it's always the same user, as soon as the cron job runs, which triggers this event, his "vote" comes in. This is without him clicking or even seeing the message sometimes.
So, the question: has anyone ever seen or heard of a cell provider or a messaging app or similar that "clicks" links as part of some process before sharing the content with the user? I can't see ANYTHING in the code that would single him out so I'm thinking it has to be something in between when the message goes out and he does what he does. Especially because the timestamp is also always within seconds of the cron job running.
Sending an SMS can sometimes go through multiple carriers before reaching an end destination. As such, providers may be "handling" the content in this case.
The best thing to do would for any cases of this in the future would be to write support for further investigation.
I want to develop a mobile app where a registered user can search among other registred users. User A can chat with user B. User A can view user B's profile. Upon this, user B have to be informed that user A is watching him.
So its some kind of chatroom where the server should be able to be notified when a user watched/contact another user, and let the latter know about this.
My first idea was to use node.js. But I begun to read a lot on XMPP-protocol. Do you think an XMPP-server would be more adequate to this kind of app? What I udnerstand you can customize your xmpp-server, write plugins so it can behave the way you want. Is this correct?
This is a perfect use case for socket IO using NodeJS. In fact, I have implemented exactly what you are describing with an iOS client and node backend in less than 50 lines of code. See https://github.com/MegaBits/SIOSocket for the iOS library, and http://socket.io/ for SocketIO.
XMPP is much heavier and verbose, and you'll be spending a lot of time parsing/building XML when you could just be communicating in JSON all the way. Take a look at my repo here:
https://github.com/alhill10/chatapp3/blob/master/View%20Control%20App/ChatView.m#L34
You can see on the viewDidLoad method it simply opens a websocket connection and listens for events from the server, then updates the tableview being used as a chat window with any new incoming messages in real time.
Then, look here https://github.com/alhill10/simplechat/blob/master/app.js for a simple example of the Socket IO backend that receives and relays the messages, as well as maintaining the state of current users online. You could trivially add in user authentication and .
Whats the standard way to detect the browser window close event in any standard browser? By standard I mean something that sites like Google or Facebook implement when the "keep me signed in" checkbox is unchecked. I have an interactive website in place where theres an Instant Messaging module and I need to inform the other user that the partner has logged out.
Thanks in advance.
The keep me signed in links are managed via cookies and cookie timeout lengths.
One approach to doing something like this is to have the browser make an async ajax call every (1 minute) to your server so you know they are still logged in. If you dont receive one of these calls within say 90 seconds you can say they are logged out.
This approach would also catch cases where for example their connection went or their computer crashed.
I have a monotouch application which has a timer and gets the data from the server.
Once the data is received i want to show the notification on the status bar.
It wrks fine when the app is in foreground. When the app is in background ,neither the timer nor the notification works
Please help me in rectifying this issue.
getting you app to run in the background is easy, add App registers for location updates in the info.plist, create a CLlocation singleton register for significant location change and you are done, your app will be resurrected every time there is a significant location change
When an iOS app transitions to the suspended (i. e. backgrounded) state, it stops its timers and disables locl notifications (and does some more memory optimization-related actions). A possible solution (JB only) to display user alerts while your app is in the background is to run a server (true unix server which is not bothered by an app getting backgrounded!) and use the undocumented CFUserNotificationDisplayAlert() function (just google it).
Your best chance is to extend the lifetime of your app by a little bit, by requesting a grace period in the background. As long as you receive this message during this time frame, you will be able to post the notification.
You do this by calling UIApplication.BeginBackgroundTask. This will let you run for a little bit, and the method you pass will be invoked shortly before your grace period runs out.
When you have an App with registers for location updates it seems to always run in the background to a certain extent, as you get significan location changes and you get the enter/exit regions, so you app is running code or is being waken up to run code... the problem is that the UILocalnotification doesn't trigger a sound and alert consitently ( but all the calls are displayed in the notification center... ) The big problem here is that the significan location changes, and the enter/exit regions are useless if you can not notify your user reliably.... is CFUserNotificationDisplayAlert() the only solution to trigger an alert to the user... ? does it work ? will your app be rejected if you use it ?
I got this working as follows :(Not a good design, but a working one)
Addded location support in info.plist, create a clocation manager and kept on requsting the location services. On the same loop schedule the UIlocalnotification .
It works perfectly. :)
NOTE : One issue is that it will give the user a propmpt as "This app uses your location, Do you want o allow"
It is complex, I'll trying to describe it here.
If the user and his group have no access rights to anything on the SP site, the user will get a proper "Error:Access Denied" SharePoint page upon logon.
If the user has some access to something through his group membership, then
a. If the user is listed in the All People list, then the user can logon and use the site with no problem.
b. If the user is not listed in the All People list, then the user will get a IIS 403 Error page. Back on the server, there will be an event of "A process serving application pool '[IIS app pool name]' suffered a fatal communication error with the World Wide Web Publishing Service", which indicates a crash in the IIS app pool. If the user is keen and keeps trying, he can crash the app pool frequently and eventually cause the app pool to stop and the application is down!!!
We are using forms authentication and Asp.net membership provider and role provider. It appears that when 2b is happening, SP is repeatedly (should be only once) calling membership provider GetUser method (until the fatal communication error is coming up I guess). I believe it is for the initila user profile import. When 2a is happening, the GetUser method is not called.
We can manually do things like adding the user to the Visitors group and then taking the user out of the Visitors group, which will add the user to the All People list so he will be able to log on. During the manual process, the membership provider GetUesr is also called but just once and works fine.
This problem only just started occuring recently and only in one environment (the PRODUCTION!). It was all fine and the other environments UAT and training environment both don't have this issue. We've compared the environments and checked all the obvious and couldn't find any differences that could cause this. The production has got around 110 users, which is more than the other environments but still not a lot.
Anyone out there can help?
Based on the comment below it looks like the error is occuring in the custom implementation of GetUser, after the call to the web service. It is also only occuring in the environment that has the most data.
The next thing to check therefore is the code between the call to the web service and the return of getuser. Do you have any arrays where the max length is set? Do you make any assumptions about which data is contained i a spesific item in an array? How do you check/log that the web service is returning a valid result?
Hope this helps
Shiraz
Cause of the problem found. The advanced setting on All People list has got Item Level Edit permission set to none.