locked
problem RRS feed

  • Question

  • User755358442 posted

    Hallo, all.  

    Please help. After installing the Web site on a server IIS7, it does not work. The review shows that page. What should I do?
    SQL 2008 express

    The server error in the appendix ' / '.

     was not possible to generate the user copy SQL Server because of an error at start of process for a copy of the user. Connection will be closed. The description: the Raw exception at performance of current web inquiry. Study trace of a stack for reception of additional data on the given error and about the fragment which has caused it of a code. Data on an exception: System. Data. SqlClient. SqlException: it was not possible to generate the user copy SQL Server because of an error at start of process for a copy of the user. Connection will be closed. A source error:

    Строка 5:  void Application_Start(object sender, EventArgs e) {
    Строка 6:  SiteMap.SiteMapResolve += new SiteMapResolveEventHandler(AppendQueryString);
    Строка 7:  if (!Roles.RoleExists("Administrators")) Roles.CreateRole("Administrators");
    Строка 8:  if (!Roles.RoleExists("Friends")) Roles.CreateRole("Friends");
    Строка 9:  }

    Source file: c:\inetpub\wwwroot\Global.asax    Строка: 7

    Stack tracing:

    [SqlException (0x80131904): Не удалось сформировать пользовательский экземпляр SQL Server из-за ошибки при запуске процесса для экземпляра пользователя. Соединение будет закрыто.]
       System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +4844759
       System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +194
       System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +2392
       System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK) +35
       System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 timerExpire, SqlConnection owningObject) +144
       System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String host, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, Int64 timerStart) +342
       System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) +221
       System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +189
       System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) +4859187
       System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) +31
       System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject) +433
       System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject) +66
       System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +499
       System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +65
       System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +117
       System.Data.SqlClient.SqlConnection.Open() +122
       System.Web.DataAccess.SqlConnectionHolder.Open(HttpContext context, Boolean revertImpersonate) +87
       System.Web.DataAccess.SqlConnectionHelper.GetConnection(String connectionString, Boolean revertImpersonation) +221
       System.Web.Security.SqlRoleProvider.RoleExists(String roleName) +478
       System.Web.Security.Roles.RoleExists(String roleName) +73
       ASP.global_asax.Application_Start(Object sender, EventArgs e) in c:\inetpub\wwwroot\Global.asax:7

    [HttpException (0x80004005): Не удалось сформировать пользовательский экземпляр SQL Server из-за ошибки при запуске процесса для экземпляра пользователя. Соединение будет закрыто.]
       System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode(HttpContext context, HttpApplication app) +2721662
       System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +128
       System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +188
       System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +295
       System.Web.HttpApplicationFactory.GetPipelineApplicationInstance(IntPtr appContext, HttpContext context) +56
       System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +231

    [HttpException (0x80004005): Не удалось сформировать пользовательский экземпляр SQL Server из-за ошибки при запуске процесса для экземпляра пользователя. Соединение будет закрыто.]
       System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +8886319
       System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +85
       System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +333

     

    Saturday, January 31, 2009 3:45 PM

All replies

  • User1759999623 posted

    Are you using a database in your App_Data subfolder?  Have you confirm your connection string, making sure that it works as expected once you configured your application for IIS 7?

    Saturday, January 31, 2009 4:35 PM
  • User755358442 posted

    Yes, I use a database in IIS7 in subfolder App_Data. The server sees even the user  Which is registered me still in Visual Web Dev 2008 with a role of the manager. And the supplier for server AspNetRoleProvider.

    Sunday, February 1, 2009 4:29 AM
  • User1759999623 posted

    I believe that the problem is that you're using the Roles class in your Application_Start method.  This is before the authentication process begins, thus the functionality of your provider is not available at this time.  Hence, it does not exist within this method.

    You need to move this to some other point in the application lifecycle.  Still, if you want specific roles available within your application, you should create them beforehand and not rely on your application in ensuring that they exist.

    Sunday, February 1, 2009 5:44 PM
  • User755358442 posted

    Thanks for participation. I have made. All works.

    Monday, February 2, 2009 11:10 AM