Microsoft.CSharp.RuntimeBinder.RuntimeBinderException

时间:2013-02-16 19:22:16

标签: asp.net-mvc-3 exception dynamic runtime meta-tags

我的MVC3网络应用程序出了问题。我得到一个RuntimeBinderException。

我的动态页面元标记存在问题。元标记是从.resx文件设置的。我认为它无法在运行时访问资源。而且其他国家的人也无法访问该网站。存在连接超时错误。但我们在美国,我们可以访问该网站。你有什么想法吗?

我的元标记在下面;

public ActionResult Index()
    {
        ViewBag.Description = Glob.HomeDescription;
        ViewBag.Keywords = Glob.HomeKeywords; ;
        ViewBag.Title = Glob.HomeTitle;

        var data = new HomeData();
        data.AnnouncementLists = _announcementService.GetAnnouncementList(LanguageId).Data;
        data.FeedBackLists = _feedbackService.GetFeedbackListHome(LanguageId).Data;
        data.Newfeedback = new FeedBackDTO { Context = "", Id = Guid.NewGuid(), Date = DateTime.Now, FeedBackId = Guid.NewGuid(), LanguageId = LanguageId, Status = false, LanguageName = "", Who = "" };
        return View(data);
    }

错误如下;

Exception Type: Microsoft.CSharp.RuntimeBinder.RuntimeBinderException

Message: 'System.Dynamic.DynamicObject' does not contain a definition for 'Description'

Stack Trace: at Microsoft.CSharp.RuntimeBinder.RuntimeBinderController.SubmitError(CError pError) at Microsoft.CSharp.RuntimeBinder.Semantics.LangCompiler.SubmitError(CParameterizedError error) at Microsoft.CSharp.RuntimeBinder.Semantics.MemberLookup.ReportErrors() at Microsoft.CSharp.RuntimeBinder.RuntimeBinder.BindProperty(DynamicMetaObjectBinder payload, ArgumentObject argument, LocalVariableSymbol local, EXPR optionalIndexerArguments, Boolean fEventsPermitted) at Microsoft.CSharp.RuntimeBinder.RuntimeBinder.BindAssignment(DynamicMetaObjectBinder payload, ArgumentObject[] arguments, Dictionary`2 dictionary) at Microsoft.CSharp.RuntimeBinder.RuntimeBinder.DispatchPayload(DynamicMetaObjectBinder payload, ArgumentObject[] arguments, Dictionary`2 dictionary) at Microsoft.CSharp.RuntimeBinder.RuntimeBinder.BindCore(DynamicMetaObjectBinder payload, IEnumerable`1 parameters, DynamicMetaObject[] args, DynamicMetaObject& deferredBinding) at Microsoft.CSharp.RuntimeBinder.RuntimeBinder.Bind(DynamicMetaObjectBinder payload, IEnumerable`1 parameters, DynamicMetaObject[] args, DynamicMetaObject& deferredBinding) at Microsoft.CSharp.RuntimeBinder.BinderHelper.Bind(DynamicMetaObjectBinder action, RuntimeBinder binder, IEnumerable`1 args, IEnumerable`1 arginfos, DynamicMetaObject onBindingError)**strong text**

任何建议都会有所帮助。感谢。

0 个答案:

没有答案