Wednesday, July 6, 2011

Failed to access IIS metabase


Failed to access IIS metabase

Problem:
Running an IIS web application, and you get the Failed to access IIS metabase error.

Solution:
First thing to try:
Bring up a command prompt to your .net framework directory under C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727

Run: aspnet_regiis –i

If that doesn’t work, run:  aspnet_regiis -ga aspnet

That should solve it.  If it doesn’t, here’s some reading:  The MetaAcl tool for modifying metabase permissions on the IIS Admin Objects is available

The entry 'AspNetSqlMembershipProvider' has already been added


Problem:

Server Error in '/MyApp' Application.


Configuration Error

Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

Parser Error Message: The entry 'AspNetSqlMembershipProvider' has already been added.

Source Error:

Line 42: 
Line 43:   
Line 44:     
Line 45:       enablePasswordRetrieval="false">

Source File: C:\Program Files\MyApp\web.config    Line: 44


Version Information: Microsoft .NET Framework Version:2.0.50727.3620; ASP.NET Version:2.0.50727.3618



Solution:
In the web.config file, you need to add a "remove provider" tag before the add provider tag:



Thursday, June 30, 2011

Login failed for user xxxx. The user is not associated with a trusted SQL Server connection.


Problem:
Connecting to SQL Server with a query in SQL Server Management Studio, you get “Login failed for user xxxx.  The user is not associated with a trusted SQL Server connection.”












Solution:
Open Microsoft SQL Server Management Studio.
Connect to your sql instance.  Right click the instance name in the Object Explorer window and select properties.





Select SQL Server and Windows Authentication mode and click OK.

!Very Important!  Restart SQL Server for this setting to take effect.