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

时间:2022-04-29 05:34:43

I am trying to create a login form with the membership table in a MySql server. Al seems to work OK, but I am not able access the Security tab inside the ASP.Net Website. I get the following message (It is in Spanish so translated it is more or less like this):

我正在尝试使用MySql服务器中的成员资格表创建登录表单。 Al似乎工作正常,但我无法访问ASP.Net网站内的安全选项卡。我得到以下消息(它是西班牙文,所以翻译它或多或少像这样):

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

MySql也很棒。它创建了必要的表格,网站正在运行。问题是我无法访问安全选项卡以添加规则,角色,用户,阻止页面等...

Thanks for your help!

谢谢你的帮助!

1 个解决方案

#1


0  

Try by running Visual Studio as Administrator. With admin previleges the application may be able to access the Security logs as it may have sufficient permissions (thus preventing the error).

尝试以管理员身份运行Visual Studio。使用admin previleges,应用程序可能能够访问安全日志,因为它可能具有足够的权限(从而防止出现错误)。

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). Make sure that your event source "MyApp" is actually registered, i.e. that it appears in the registry under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\eventlog\Application.

这个问题不仅可能由于权限而发生,而且由于事件源密钥丢失,因为它未成功注册(您需要管理员权限才能执行此操作 - 如果您只是像往常一样打开Visual Studio并正常运行程序它会赢得'够了)。确保您的事件源“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():

#1


0  

Try by running Visual Studio as Administrator. With admin previleges the application may be able to access the Security logs as it may have sufficient permissions (thus preventing the error).

尝试以管理员身份运行Visual Studio。使用admin previleges,应用程序可能能够访问安全日志,因为它可能具有足够的权限(从而防止出现错误)。

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). Make sure that your event source "MyApp" is actually registered, i.e. that it appears in the registry under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\eventlog\Application.

这个问题不仅可能由于权限而发生,而且由于事件源密钥丢失,因为它未成功注册(您需要管理员权限才能执行此操作 - 如果您只是像往常一样打开Visual Studio并正常运行程序它会赢得'够了)。确保您的事件源“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():