简体   繁体   中英

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

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

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

Thanks for your help!

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

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, ie that it appears in the registry under HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\services\\eventlog\\Application.

To create an event source in Windows, you must have administrative privileges.

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:

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():

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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