I found the solution of this error. I am using moss2010 there are two possibility for this kind of error
1>your code containing some logical error like you are fetching query string or something like that you need to first check is found or not
2>check your content type that, is your published content type default or sherepoint content type is default?
if you are facing no. 2 problem then make your published content type the default one and you can resolve the error.
View Complete Post