Tuesday, December 2, 2008

Internet Scams

Hi Readers,


The rise of the internet has opened up the world to millions of people. It is now possible to do things that were unheard of only ten, or even five, years ago.

Unfortunately, the internet is not free from scams and scammers. Some scams are especially designed to take advantage of the way the internet works.

A lot of internet scams take place without the victim even noticing. It is only when their credit card statement or phone bill arrives that the person realises that they might have been scammed.

There are, however, a number of ways to protect yourself from internet scams. They are simple precautions you can take and are essential because you often cannot be sure exactly who you are dealing with on the internet.

How you access the internet can also make a difference. If you take the right precautions, the chances of being scammed are greatly reduced.

To avoid receiving scams and spam mails, you may do the following (but this will not garrantee that you will not receive scams or spam mails):

1. Avoid filling-up in the site that requires you to enter your Name, Email, Address, Telephone No. etc. As much as possible don’t give your personal particulars to those unknown sites.

2. When you received mail with suspicious title (most specially if it appears in your Spam mail box) do not open, immediately delete it permanently. Note that some spam mails are also appearing in the Inbox folder.

3. When you received authorized email in your Spam folder, select it and click Not Spam (for Yahoo and Google) then it will automatically move into your Inbox folder.

4. Block those email addresses that send Spam emails.

5. When you received advertisements from unknown site, knowing that you never even register to it, try to unsubscribe by clicking its unsubscribe link (mostly it appears at the bottom part of the email content). After unsubscribing, it states how long when it can be unsubscribed youre account, but if after that period and you still receiving emails from it, block the email address.

NOTE: Please bare in mind also that there are internet users who use other’s name and email when they are registering to other sites. There are advertisement sites (even other sites) also that sell their registered users’ particular, so before registering to unknown sites, be very careful and read first their Terms and Conditions. If there is no Terms and Conditions, I suggest dont enter your personal particulars (because they may also capture information from the fields even the moment you are just typing in the text fields) and dont proceed to register.

Click here to see Sample of Scam/Spam Emails

That’s all folks. Hope this would help.


Best Regards,
Shaper Jabneel

Friday, November 21, 2008

IFrame ViewState or PageState lost

Hi Readers,

Do you encounter ViewState or PageState loss in your ASP.Net pages inside IFrame? In my project, I encountered this kind of issue maybe because I used PageStatePersister as the base class of my ASP.Net pages and together with AJAX. I tried to include SavePageStateToPersistenceMedium and LoadPageStateToPersistenceMedium overrided methods in my PageStatePersister base class, but it didn't help me either.

So, what I did is:
In the top of the ASP.Net Page Source Code, after the I added Update Panel . Inside that Update Panel, I added a Timer Control with Interval="5000" (equal to 5 seconds) and with OnTick event property (but you can use without OnTick event property). So that I didn't see the page refreshing, I put my ASP Timer inside the Update Panel. Then, it really solves my problem.

Here is the Example:

<body>
<ajaxtoolkit:toolkitscriptmanager id="tsmMaster" runat="server" enablepartialrendering="true"></ajaxtoolkit:toolkitscriptmanager>
<asp:updatepanel id="UpdatePanel1" runat="server" updatemode="Conditional" rendermode="Inline">
<contenttemplate>
<asp:timer id="tmTimer" runat="server" interval="5000" ontick="tmTimer_Tick"></asp:timer>
</contenttemplate>
</asp:updatepanel>
...
...
...
</body>



Here is my conclusion:
Inside my IFrame, I noticed that the ViewState/PageState of my ASP.Net page always loss within less than 30 seconds without any execution/event in the page (imagine < 30 secs.).

Since every 3 secs the page is being PostBack using ASP Timer, it keeps the ViewState or PageState alive.


I hope this would help your problem in dealing with Iframe, AJAX and PageStatePersister in ASP.Net.



Thanks

Best Regards,
Shaper Jabneel

Thursday, October 16, 2008

Using window.close() without prompt in IE7

Hi Readers,

If you have tried using javascript window.close() method in IE7, you will notice that it is always prompting “The Webpage you are viewing is trying to close the window. Do you want to close this window?”.

To let this prompt not to appear, just do the codes below.

script language="javascript"
function CloseWindow()
{
window.open(”,’_self’,”);
window.close();
}
/script

Or if you want to close the Parent window without prompting, just use:
window.opener.open(”,’_self’,”);
window.opener.close();

The code in bold is used to open a window which lets the browser thinks that the current window is opened using javascript window.open(), so when the close() method is executed it will close it without the message being prompted.


Best Regards,
Shaper Jabneel

Allowing Only One Instance of an Application in C#.Net

Hi Readers,

Standard Windows Form application can be launched multiple times and each instance used completely independently of the others। However, sometimes it is important to restrict the user in launching multiple instance of a program।

See the code snippet below in how to restrict lunching of multiple instance of an application.

Required Namespace:
System.Diagnostics

C# Code:
static void Main()
{
// Detect existing instances
string processName = Process।GetCurrentProcess().ProcessName;
Process[] instances = Process.GetProcessesByName(processName);
if (instances.Length > 1)
{
MessageBox.Show(”This application is already running.”);
return;
}
// End of detection
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Form1());
}

Hope this would help you folks. Thanks.

Best Regards,
Shaper Jabneel