简体   繁体   English

ASP.Net网站管理工具“安全性”选项卡错误。 无法访问的寄存器:安全性

[英]ASP.Net Web Site Administration Tool Security tab error. Inaccessible registers: Security

I am trying to create a login form with the membership table in a MySql server. 我正在尝试使用MySql服务器中的成员资格表创建登录表单。 Al seems to work OK, but I am not able access the Security tab inside the ASP.Net Website. Al似乎可以正常运行,但是我无法访问ASP.Net网站内的“安全性”选项卡。 I get the following message (It is in Spanish so translated it is more or less like this): 我收到以下消息(它是西班牙语,所以或多或少都是这样翻译的):

There is a problem with your selected data store. 您选择的数据存储有问题。 This can be caused by an invalid server name or credentials, or by insufficient permission. 这可能是由于无效的服务器名称或凭据或权限不足引起的。 It can also be caused by the role manager feature not being enabled. 也可能是由于未启用角色管理器功能引起的。 Click the button below to be redirected to a page where you can choose a new data store. 单击下面的按钮将重定向到页面,您可以在其中选择新的数据存储。

The following message may help in diagnosing the problem: No source was found, but could not find in some or all event logs. 以下消息可能有助于诊断问题:找不到源,但在某些或所有事件日志中找不到源。 To create the source, you need permission to read all event records in order to verify that the new source name is unique. 要创建源,您需要具有读取所有事件记录的权限,以验证新的源名称是否唯一。 Inaccessible records: Security. 不可访问的记录:安全性。

I tried everything. 我尝试了一切。 Setting all permissions for all users for the Security in Windows registry (I was not able to add NetworkService user). 在Windows注册表中为所有用户设置所有权限(我无法添加NetworkService用户)。

Also the MySql works great. MySql也很好用。 It created the necessary tables and the website is working. 它创建了必要的表,并且网站正在运行。 The problem is I'm not able to access Security tab in order to add rules, roles, users, block pages, etc... 问题是我无法访问“安全性”选项卡以添加规则,角色,用户,阻止页面等。

Thanks for your help! 谢谢你的帮助!

Try by running Visual Studio as Administrator. 尝试通过以管理员身份运行Visual Studio。 With admin previleges the application may be able to access the Security logs as it may have sufficient permissions (thus preventing the error). 使用管理员特权,应用程序可能具有足够的权限(因此可以防止错误),因此可以访问安全日志。

This problem can occur not only due to permissions, but also due to event source key missing because it wasn't registered successfully (you need admin privileges to do it - if you just open Visual Studio as usual and run the program normally it won't be enough). 不仅由于权限,而且由于未成功注册而导致事件源密钥丢失,都会发生此问题(您需要管理员权限才能执行此操作-如果您像往常一样打开Visual Studio并正常运行该程序,则不会成功)还不够)。 Make sure that your event source "MyApp" is actually registered, ie that it appears in the registry under HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\services\\eventlog\\Application. 确保事件源“ MyApp”已实际注册,即它出现在注册表中的HKEY_LOCAL_MACHINE \\ SYSTEM \\ CurrentControlSet \\ services \\ eventlog \\ Application下。

To create an event source in Windows, you must have administrative privileges. 要在Windows中创建事件源,您必须具有管理权限。

So you must either run the event source registration code as an admin (also, check if the source already exists before - see the below MSDN example) or you can manually add the key to the registry: 因此,您必须以管理员身份运行事件源注册代码(也请检查源是否以前已经存在-请参见下面的MSDN示例),或者您可以手动将注册表项添加到注册表中:

1.create a regkey HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\eventlog\Application\MyApp;
2.inside, create a string value EventMessageFile and set its value to e.g. C:\Windows\Microsoft.NET\Framework\v2.0.50727\EventLogMessages.dll

You can see this link. 您可以看到此链接。 Create a Registry key 创建一个注册表项
MSDN EventLog.CreateEventSource(): MSDN EventLog.CreateEventSource():

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM