Hi Subramaniyan and welcome to our forum,
This is because you are using .NET code which requires domain trust. Your form is likely also set to Domain Trust (verify by going to Tools->Form Options->Security). However, the site you are accessing has likely been added to Trusted Sites. Go to IE->Security and make sure the site where you published the form is not in Trusted Sites. Good luck!
Patrick Halstead [InfoPath MVP]
InfoPathDev
Patrick Halstead
Project Manager at Qdabra