本文介绍了如何在执行metachecker时解决此问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,



所以我为各个帖子制作了元标记。我看到他们在谷歌搜索时没有改变。当我做了metachecker时它出现了以下错误。



有人可以帮我吗?

我会非常感激



'/'应用程序中的服务器错误。

对象引用未设置为对象的实例。

描述:在执行当前Web请求期间发生了未处理的异常。请查看堆栈跟踪以获取有关错误及其源自代码的位置的更多信息。



异常详细信息:System.NullReferenceException:对象引用未设置为实例一个对象。



来源错误:





第213行:{

第214行:Metatag cur = new Metatag();

第215行:cur.Content = m.Attributes [content]。值;

第216行:if(m.Attributes [http-equiv]!= null)

第217行:{





源文件:d:\www \ metachecker.net \ Site \ Analise.aspx.cs行:215



堆栈跟踪:





[NullReferenceException:对象引用未设置为对象的实例。]

Analise.AnaliseMetatags(XhtmlDocument文档)在d:\www \ metachecker.net \ Site:\\ Analise.aspx.cs:215

Analise.Page_Load(Object sender,EventArgs e)在d中: \\ 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



我尝试了什么:



我试图找到我的错误html,失败...

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...

推荐答案

[]



必须定义内容属性,如果名称或http-equiv属性已定义。 如果这些都没有定义,则无法定义内容属性。



这可能不是HTML代码中的错误;它看起来更像是metachecker代码中的错误。即使您的< meta> 标记假设具有内容属性,检查代码如果丢失则不应该崩溃。



您应该联系metachecker网站的制造商报告错误。


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.


这篇关于如何在执行metachecker时解决此问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-26 16:15