本地IIS浏览出错,请高手帮忙,谢谢你帮助!!!
Server Error in '/' Application.
--------------------------------------------------------------------------------An error has occurred while establishing a connection to the server.  When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) 
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Data.SqlClient.SqlException: An error has occurred while establishing a connection to the server.  When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.  Stack Trace: 
[SqlException (0x80131904): An error has occurred while establishing a connection to the server.  When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)]
   System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +735091
   System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +188
   System.Data.SqlClient.TdsParser.Connect(Boolean& useFailoverPartner, Boolean& failoverDemandDone, String host, String failoverPartner, String protocol, SqlInternalConnectionTds connHandler, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, SqlConnection owningObject, Boolean aliasLookup) +820
   System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) +628
   System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +170
   System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) +359
   System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) +28
   System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject) +424
   System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject) +66
   System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +496
   System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +82
   System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +105
   System.Data.SqlClient.SqlConnection.Open() +111
   Microsoft.Practices.EnterpriseLibrary.Data.Database.GetNewOpenConnection() +123
   Microsoft.Practices.EnterpriseLibrary.Data.Database.ExecuteReader(DbCommand command) +68
   Hishop.SystemServices.Data.SqlCoreDataProvider.LoadSiteSettings() +69
   Hishop.SystemServices.SiteSettingsManager.GetSiteSettings(Boolean flush) +72
   Hishop.SystemServices.HiContext.get_SiteSettings() +22
   Hishop.SystemServices.SiteUrls.Instance() +190
   Hishop.SystemServices.Globals.GetSiteUrls() +5
   Hishop.SystemServices.HiUrlReWriter..cctor() +18[TypeInitializationException: The type initializer for 'Hishop.SystemServices.HiUrlReWriter' threw an exception.][TargetInvocationException: Exception has been thrown by the target of an invocation.]
   System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandle& ctor, Boolean& bNeedSecurityCheck) +0
   System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean fillCache) +103
   System.RuntimeType.CreateInstanceImpl(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean fillCache) +261
   System.Activator.CreateInstance(Type type, Boolean nonPublic) +66
   System.Activator.CreateInstance(Type type) +6
   Hishop.SystemServices.UrlReWriteProvider..cctor() +16[TypeInitializationException: The type initializer for 'Hishop.SystemServices.UrlReWriteProvider' threw an exception.]
   Hishop.SystemServices.UrlReWriteProvider.Instance() +0
   Hishop.SystemServices.HiHttpModule.ReWriteUrl(HttpContext context) +23
   Hishop.SystemServices.HiContext.Create(HttpContext context, UrlReWriterDelegate rewriter) +52
   Hishop.SystemServices.HiHttpModule.Application_BeginRequest(Object source, EventArgs e) +513
   System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +157
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +65 
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.42 

解决方案 »

  1.   

    a connection to the server
    字符串没有配置正确.
      

  2.   

    Exception Details: System.Data.SqlClient.SqlException: An error has occurred while establishing a connection to the server. 不能建立数据库连接,在“Hishop.SystemServices.HiUrlReWriter”初始化的时候,你跟踪后看看
      

  3.   

    may be caused by the fact that under the default settings SQL Server does not allow remote connections
    这个配置了没呢??