Click here to Skip to main content
15,893,564 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello,

So I made meta tags for individual posts. I saw they didn't change when searched for in google. When I did metachecker it gave the following error.

Can someone help me with this?
I would be very grateful

Server Error in '/' Application.
Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

Source Error:


Line 213: {
Line 214: Metatag cur = new Metatag();
Line 215: cur.Content = m.Attributes["content"].Value;
Line 216: if (m.Attributes["http-equiv"] != null)
Line 217: {


Source File: d:\www\metachecker.net\Site\Analise.aspx.cs Line: 215

Stack Trace:


[NullReferenceException: Object reference not set to an instance of an object.]
Analise.AnaliseMetatags(XhtmlDocument document) in d:\www\metachecker.net\Site\Analise.aspx.cs:215
Analise.Page_Load(Object sender, EventArgs e) in d:\www\metachecker.net\Site\Analise.aspx.cs:112
System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +24
System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +41
System.Web.UI.Control.OnLoad(EventArgs e) +131
System.Web.UI.Control.LoadRecursive() +65
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2427

What I have tried:

I have tried to find the error in my html, unsuccessfully...
Posted
Updated 13-May-16 3:30am

1 solution

Your site has a <meta> tag without a content attribute, and the "metachecker" code can't cope with it.

The content attribute MUST be defined if the name or the http-equiv attribute is defined. If none of these are defined, the content attribute CANNOT be defined.

That's probably not an error in your HTML code; it looks more like a bug in the "metachecker" code. Even if your <meta> tag is supposed to have a content attribute, the checking code shouldn't crash if it's missing.

You should contact the makers of the "metachecker" site to report a bug.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900