asp.net – 具有SQL Server成员资格提供程序的Mono?
发布时间:2020-12-16 09:58:55 所属栏目:asp.Net 来源:网络整理
导读:显然,Mono使用sqlite成员资格提供程序替换对SQL Server成员资格提供程序的引用(请参阅 ASP.NET_Settings_Mapping).有没有办法说服Mono使用SQL Server作为成员资格提供者? 当我尝试登录我的网络应用程序时,我得到以下内容: System.Configuration.Provider.P
显然,Mono使用sqlite成员资格提供程序替换对SQL Server成员资格提供程序的引用(请参阅
ASP.NET_Settings_Mapping).有没有办法说服Mono使用SQL Server作为成员资格提供者?
当我尝试登录我的网络应用程序时,我得到以下内容: System.Configuration.Provider.ProviderException: Operation aborted due to an exception (see Trace for details). at System.Web.Security.SqliteMembershipProvider.ValidateUser (string,string) <0x003bb> at DirectMail.Controllers.AccountMembershipService.ValidateUser (string,string) [0x00000] in [file].cs:404 at DirectMail.Controllers.AccountController.ValidateLogOn (string,string) [0x00040] in [file].cs:346 at DirectMail.Controllers.AccountController.LogOn (string,string,bool,string) [0x00000] in [file].cs:79 at (wrapper dynamic-method) System.Runtime.CompilerServices.ExecutionScope.lambda_method (System.Runtime.CompilerServices.ExecutionScope,System.Web.Mvc.ControllerBase,object[]) <0x001c1> at System.Web.Mvc.ActionMethodDispatcher.Execute (System.Web.Mvc.ControllerBase,object[]) <0x00028> at System.Web.Mvc.ReflectedActionDescriptor.Execute (System.Web.Mvc.ControllerContext,System.Collections.Generic.IDictionary`2<string,object>) <0x0015b> at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod (System.Web.Mvc.ControllerContext,System.Web.Mvc.ActionDescriptor,object>) <0x00036> at System.Web.Mvc.ControllerActionInvoker/<InvokeActionMethodWithFilters>c__AnonStoreyB.<>m__E () <0x00092> at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter (System.Web.Mvc.IActionFilter,System.Web.Mvc.ActionExecutingContext,System.Func`1<System.Web.Mvc.ActionExecutedContext>) <0x00125> 一台Debian Linux机器上文件/usr/local/etc/mono/4.0/settings.map的顶部是: <?xml version="1.0" encoding="utf-8" ?> <settingsMap> <map sectionType="System.Web.Configuration.MembershipSection,System.Web,Version=4.0.0.0,Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a" mapperType="Mono.Web.Util.MembershipSectionMapper,Mono.Web,PublicKeyToken=0738eb9f132ed756" platform="Unix"> <!-- The 'what' tag specifies which region of the section to modify. The 'value' attribute value is mapper-specific and is not defined here. It can be any expression understood by the mapper to designate the section region to modify. --> <what value="providers"> <!-- 'what' can contain any number of occurrences of any three elements: replace - replace the designated region add - add a new entry to the region clear - clear the region remove - remove the designatedregion The attributes to any of the above are freeform and are not processed by the mapper manager. They are stored verbatim for the mapper to peruse. --> <replace name="AspNetSqlMembershipProvider" type="System.Web.Security.SqliteMembershipProvider,PublicKeyToken=b03f5f7f11d50a3a" connectionStringName="LocalSqliteServer" /> </what> </map> <!-- ... --> 解决方法
在您链接到的
ASP.NET Settings Mapping页面上,在标题为“禁止设置映射”的部分中,它表示添加:
<appSettings> <add key="MonoAspnetInhibitSettingsMap" value="anything"/> </appSettings> 到你的应用程序的Web.config文件将禁用设置映射.然而,我发现价值“任何东西”都不起作用.如果我改为使用值“true”,那么它会: <appSettings> <add key="MonoAspnetInhibitSettingsMap" value="true"/> </appSettings> (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
相关内容
- 在asp.net应用程序中启用c#7
- asp.net-mvc-4 – 请求太大
- asp.net-mvc – ASP.NET MVC请求处理序列
- asp.net-mvc-3 – 无效的匿名类型成员声明符 必须使用成员分
- asp.net – “HttpContext.Current”属性和相关事物的交叉线
- 如何在Asp.NET MVC中干净地重用编辑/新视图
- 您完整的ASP.net开发环境是什么?
- ASP.NET – Response.Redirect不填充URL引用
- 在updatepanel asp.net c#中的AsyncFileUpload中上传文件后
- asp.net – 拥有专用应用程序池,将Web应用程序保留在一个默
推荐文章
站长推荐
- asp.net-mvc-3 – Foreach ViewBag数据给出’对象
- asp.net – 如何使我的Web应用程序无状态仍然做一
- asp.net-mvc-3 – 将PartialView Html转换为ITex
- asp.net – 从ASP Classic迁移到.NET并减轻疼痛
- 用ASP.net检测iPad
- asp.net-mvc – MVC5 Microsoft.CSharp.RuntimeB
- asp.net-mvc – 如何在视图中获取会话值asp.net核
- asp.net-mvc – 使用表单身份验证在ASP.NET MVC上
- asp.net-mvc – MVC DateTime文本框格式化问题
- asp.net-mvc – 与ASP.NET MVC集成的经典ASP
热点阅读