I used RSocket to access the network in s60 3rd SDK. To avoid the IAP dialog pop up before net connection. Here are the snippets of my code.

[----Begin snippet------]

RSocket iSocket;
RSocketServ iSocketServ;
RConnection iConnection;

//begin IAP setting, we call this on App start.
iConnection.Open(iSocketServ);
TCommDbConnPref pref;
pref.SetIapId(aIap); // IAP ID for connection to be used
pref.SetDialogPreference( ECommDbDialogPrefDoNotPrompt );
pref.SetDirection( ECommDbConnectionDirectionOutgoing );
iConnection.Start(pref);

…….

//for every data transfer, we recreate the socket.
iSocket.Open(iSocketServ, KAfInet, KSockStream, KProtocolInetTcp);
iAddress.SetPort(KConnectPort);
iAddress.SetAddress(aAddr);
iSocket.Connect(iAddress);

[----End snippet------]

That code works fine in normal situation. But if the network is not well. I should closed the socket and recreate one to connect to remote server. This time the IAP dialog will appear. To reproduct these situation, you can stop the corresponding socket in the connection manager.

Anyone can help me out of these.
Thanks in advance