在为该请求提供服务所需的资源的编译过程中发生错误。源错误:[无相关源代码行]

im在asp.net mvc上构建管理仪表板。即时消息使用全局资源管理页面,因此当管理员更改html标签的内容时,会将请求发送到服务器以编辑资源。一切正常,直到我添加了多语言资源(.en-Us,.tr-Tr等)。 该页面可以刷新,并且错误仅在15秒后消失。

这是我的c#操作:

public void resEditor(string attr,string newVal)
          {
            var xmlDoc = new XmlDocument();
            string resFile = httpruntime.AppDomainAppPath + @"\App_GlobalResources\Resource1.en-US.resx";
            xmlDoc.Load(resFile);
            foreach (XmlNode nodee in xmlDoc.DocumentElement.ChildNodes)
            {
                if (nodee.Name == "data")
                {
                    if (nodee.Attributes["name"].Value == attr)
                    {
                        nodee.InnerXml = "<value>" + newVal + "</value>";
                        break;
                    }
                }
            }
            xmlDoc.Save(resFile);
        }

这是发送更改请求的Ajax

$.ajax({
                url: '@Url.action("resEditor","Admin")',type: "POST",[enter image description here][1]
                async: false,data: { "attr": ab,"newVal": cd },success: function () {
                    location.reload(true);
                },error: function () {
                    alert('error dude');
                }
            });

and here is my error:

b806826296 回答:在为该请求提供服务所需的资源的编译过程中发生错误。源错误:[无相关源代码行]

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/2491710.html

大家都在问