App_data - ASPNETDB.MDF

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Mr. X.

    App_data - ASPNETDB.MDF

    I have visual studio 2008.
    My site has a plesk on it.

    I want to deploy my project, and save it on the host machine.

    Looking for solution for folowings, please :

    1st solution
    =======
    Should ASPNETDB.MDF is necessary,
    and can I ignore it (How can I do that) ?

    Since the host side trying to make this file automatically.

    2nd solution
    ========

    I tried to make the ASPNET.MDF on my machine,
    but I got a message :
    Cannot make SSPI context.

    I persume this is via security, and I should run SSMS.exe
    (I have SQL-Server 2005 on my machine).
    But where is it ?

    3rd solution
    ========
    Can't just finding somewhere a good ASPNETDB.MDF, and is it the only file.
    After downloading from
    4shared is a perfect place to store your pictures, documents, videos and files, so you can share them with friends, family, and the world. Claim your free 15GB now!

    (Which is 10M !!! - A problem too).
    I got the message :

    Failed to generate a user instance of SQL Server due tofailure in retrieving
    the user's local application data path. Pleasemake sure the user has a local
    user profile on the computer. Theconnection will be closed.
    Description: Anunhandled exception occurred during the execution of the
    current webrequest. Please review the stack trace for more information about
    theerror and where it originated in the code.

    Exception Details: System.Data.Sql Client.SqlExcep tion:Failed to generate a
    user instance of SQL Server due to failure inretrieving the user's local
    application data path. Please make sure theuser has a local user profile on
    the computer. The connection will beclosed.

    Source Error:

    An unhandled exception was generated during the execution of
    thecurrent web request. Information regarding the origin and location ofthe
    exception can be identified using the exception stack trace below.




    Thanks :)


  • Mr. X.

    #2
    Re: App_data - ASPNETDB.MDF

    4th solution
    ========
    Just finding a good ASPNETDB file somewhere on the internet,
    and put it on my site (The site on 3th solution is not thinking to be good).

    Thanks :)


    Comment

    • sloan

      #3
      Re: App_data - ASPNETDB.MDF

      I would review this:



      If your hosting provider doesn't support Sql Express version, then you'll
      need to create a non express database somewhere.

      The MembershipProvi der is an ABSTRACT implementation, thus there are several
      backend database choices.
      Express aspnetdb.mdf is the DEFAULT "auto get created" version.

      If you already have membership data in place, you can consider this blog
      entry for transferring data.
      http://sholliday.space s.live.com/Blog/cns!A68482B9628 A842A!160.entry






      "Mr. X." <no_spam_please @nospam_please. comwrote in message
      news:O2sO2VkMJH A.1160@TK2MSFTN GP05.phx.gbl...
      >I have visual studio 2008.
      My site has a plesk on it.
      >
      I want to deploy my project, and save it on the host machine.
      >
      Looking for solution for folowings, please :
      >
      1st solution
      =======
      Should ASPNETDB.MDF is necessary,
      and can I ignore it (How can I do that) ?
      >
      Since the host side trying to make this file automatically.
      >
      2nd solution
      ========
      >
      I tried to make the ASPNET.MDF on my machine,
      but I got a message :
      Cannot make SSPI context.
      >
      I persume this is via security, and I should run SSMS.exe
      (I have SQL-Server 2005 on my machine).
      But where is it ?
      >
      3rd solution
      ========
      Can't just finding somewhere a good ASPNETDB.MDF, and is it the only file.
      After downloading from
      4shared is a perfect place to store your pictures, documents, videos and files, so you can share them with friends, family, and the world. Claim your free 15GB now!

      (Which is 10M !!! - A problem too).
      I got the message :
      >
      Failed to generate a user instance of SQL Server due tofailure in
      retrieving the user's local application data path. Pleasemake sure the
      user has a local user profile on the computer. Theconnection will be
      closed.
      Description: Anunhandled exception occurred during the execution of the
      current webrequest. Please review the stack trace for more information
      about theerror and where it originated in the code.
      >
      Exception Details: System.Data.Sql Client.SqlExcep tion:Failed to generate a
      user instance of SQL Server due to failure inretrieving the user's local
      application data path. Please make sure theuser has a local user profile
      on the computer. The connection will beclosed.
      >
      Source Error:
      >
      An unhandled exception was generated during the execution of
      thecurrent web request. Information regarding the origin and location
      ofthe exception can be identified using the exception stack trace below.
      >
      >
      >
      >
      Thanks :)
      >
      >

      Comment

      • Mr. X.

        #4
        Re: App_data - ASPNETDB.MDF

        The hosting provider supports Sql Express version,
        But I don't have any reference to sql (yet),
        so I don't understand why when deploying a dot-net application
        (from VS 2008 - VB), I should have ASPNETDB.MDF on the hosting site,
        whether I want it or not (as I sent a post on 3rd solution - it's 10M,
        and I don't know if this is the only file).

        (I see that the site is trying using this file, and create it
        automatically).

        Thanks :)


        Comment

        • sloan

          #5
          Re: App_data - ASPNETDB.MDF

          Google this:
          <remove name="LocalSqlS erver"/>

          That might remove the "auto create" mechanism, I'm not sure.

          Basically, when you make a new website, the "auto create" stuff is built in.
          You have to take steps to remove it if you don't want to use the
          MembershipProvi der stuff.

          ..........

          Can you clarify what you want as the end result?

          A.. I don't want a aspnetdb.mdf (at all) on the host server.
          B. I want my own version of aspnetdb.mdf on the host server.
          (B2) I want the host server to use Express version as well.


          I'm not sure if you want or don't want to use the MembershipProvi der in your
          (final) solution or not.




          "Mr. X." <no_spam_please @nospam_please. comwrote in message
          news:O5nrWCpMJH A.1304@TK2MSFTN GP02.phx.gbl...
          The hosting provider supports Sql Express version,
          But I don't have any reference to sql (yet),
          so I don't understand why when deploying a dot-net application
          (from VS 2008 - VB), I should have ASPNETDB.MDF on the hosting site,
          whether I want it or not (as I sent a post on 3rd solution - it's 10M,
          and I don't know if this is the only file).
          >
          (I see that the site is trying using this file, and create it
          automatically).
          >
          Thanks :)
          >

          Comment

          • Gregory A. Beamer \(Cowboy\) - MVP

            #6
            Re: App_data - ASPNETDB.MDF

            The SSPI failure has to do with the ASPNET user account not having rights to
            the database. This is common on ISP servers. If you want to get around this
            on the ISP, change your connection string or have the ISP allow ASPNET user
            (which could be a security issue) or use another account and impersonate
            (you will need the ISP's help on this, as well).

            Are you doing Membership?
            If so, use the admin tool and create the database locally.

            To deploy, consider this:
            http://gregorybeamer.s paces.live.com/blog/cns!B036196EAF9 B34A8!630.entry

            --
            Gregory A. Beamer
            MVP, MCP: +I, SE, SD, DBA

            Subscribe to my blog


            or just read it:


            *************** *************** **************
            | Think outside the box! |
            *************** *************** **************
            "Mr. X." <no_spam_please @nospam_please. comwrote in message
            news:O2sO2VkMJH A.1160@TK2MSFTN GP05.phx.gbl...
            >I have visual studio 2008.
            My site has a plesk on it.
            >
            I want to deploy my project, and save it on the host machine.
            >
            Looking for solution for folowings, please :
            >
            1st solution
            =======
            Should ASPNETDB.MDF is necessary,
            and can I ignore it (How can I do that) ?
            >
            Since the host side trying to make this file automatically.
            >
            2nd solution
            ========
            >
            I tried to make the ASPNET.MDF on my machine,
            but I got a message :
            Cannot make SSPI context.
            >
            I persume this is via security, and I should run SSMS.exe
            (I have SQL-Server 2005 on my machine).
            But where is it ?
            >
            3rd solution
            ========
            Can't just finding somewhere a good ASPNETDB.MDF, and is it the only file.
            After downloading from
            4shared is a perfect place to store your pictures, documents, videos and files, so you can share them with friends, family, and the world. Claim your free 15GB now!

            (Which is 10M !!! - A problem too).
            I got the message :
            >
            Failed to generate a user instance of SQL Server due tofailure in
            retrieving the user's local application data path. Pleasemake sure the
            user has a local user profile on the computer. Theconnection will be
            closed.
            Description: Anunhandled exception occurred during the execution of the
            current webrequest. Please review the stack trace for more information
            about theerror and where it originated in the code.
            >
            Exception Details: System.Data.Sql Client.SqlExcep tion:Failed to generate a
            user instance of SQL Server due to failure inretrieving the user's local
            application data path. Please make sure theuser has a local user profile
            on the computer. The connection will beclosed.
            >
            Source Error:
            >
            An unhandled exception was generated during the execution of
            thecurrent web request. Information regarding the origin and location
            ofthe exception can be identified using the exception stack trace below.
            >
            >
            >
            >
            Thanks :)
            >
            >

            Comment

            • Mr. X.

              #7
              Re: App_data - ASPNETDB.MDF

              The reason I want to use MemberShipProvi der,
              is only because I want my site work, without exception.

              If MemberShipProvi der is neccessary to have things work,
              so I will try to learn using it on the hard way.

              I need to put a control system manager,
              that someone should (with user+password) change some text on the site.

              I can have a simple aspx (without using Visual Studio 2008) - I mean by
              notepad,
              and do the all thing by hand (but I insist using the Visual Studio 2008, for
              it's abilties).

              I have found in
              4shared is a perfect place to store your pictures, documents, videos and files, so you can share them with friends, family, and the world. Claim your free 15GB now!


              (The simpliest approach is just obtain an empty database, and putting it on
              the hosting site - but where ?)

              the ASPNETDB.MDF and ASPNETDB_LOG.LD F,
              but I don't know : whether version are right,
              whether I should change the name.

              Where can I obtain good files ?

              When I put ASPNETDB.MDF I get another exception
              (so the file is indeed referenced by the hosting site, based on PLESK !!!).

              Before putting the file (ASPNETDB.MDF ):
              =============== ===============
              Server Error in '/' Application.
              --------------------------------------------------------------------------------

              Failed to generate a user instance of SQL Server due to failure in
              retrieving the user's local application data path. Please make sure the user
              has a local user profile on the computer. The connection will be closed.
              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.

              SQLExpress database file auto-creation error:


              The connection string specifies a local Sql Server Express instance using a
              database location within the applications App_Data directory. The provider
              attempted to automatically create the application services database because
              the provider determined that the database does not exist. The following
              configuration requirements are necessary to successfully check for existence
              of the application services database and automatically create the
              application services database:


              a.. If the applications App_Data directory does not already exist, the web
              server account must have read and write access to the applications
              directory. This is necessary because the web server account will
              automatically create the App_Data directory if it does not already exist.
              b.. If the applications App_Data directory already exists, the web server
              account only requires read and write access to the applications App_Data
              directory. This is necessary because the web server account will attempt to
              verify that the Sql Server Express database already exists within the
              applications App_Data directory. Revoking read access on the App_Data
              directory from the web server account will prevent the provider from
              correctly determining if the Sql Server Express database already exists.
              This will cause an error when the provider attempts to create a duplicate of
              an already existing database. Write access is required because the web
              server accounts credentials are used when creating the new database.
              c.. Sql Server Express must be installed on the machine.
              d.. The process identity for the web server account must have a local user
              profile. See the readme document for details on how to create a local user
              profile for both machine and domain accounts.


              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): Failed to generate a user instance of SQL Server
              due to failure in retrieving the user's local application data path. Please
              make sure the user has a local user profile on the computer. The connection
              will be closed.]
              System.Data.Sql Client.SqlInter nalConnection.O nError(SqlExcep tion
              exception, Boolean breakConnection ) +800131
              System.Data.Sql Client.TdsParse r.ThrowExceptio nAndWarning(Tds ParserStateObje ct
              stateObj) +186
              System.Data.Sql Client.TdsParse r.Run(RunBehavi or runBehavior, SqlCommand
              cmdHandler, SqlDataReader dataStream, BulkCopySimpleR esultSet
              bulkCopyHandler , TdsParserStateO bject stateObj) +1932
              System.Data.Sql Client.SqlInter nalConnectionTd s.CompleteLogin (Boolean
              enlistOK) +33
              System.Data.Sql Client.SqlInter nalConnectionTd s.AttemptOneLog in(ServerInfo
              serverInfo, String newPassword, Boolean ignoreSniOpenTi meout, Int64
              timerExpire, SqlConnection owningObject) +172
              System.Data.Sql Client.SqlInter nalConnectionTd s.LoginNoFailov er(String
              host, String newPassword, Boolean redirectedUserI nstance, SqlConnection
              owningObject, SqlConnectionSt ring connectionOptio ns, Int64 timerStart) +381
              System.Data.Sql Client.SqlInter nalConnectionTd s.OpenLoginEnli st(SqlConnectio n
              owningObject, SqlConnectionSt ring connectionOptio ns, String newPassword,
              Boolean redirectedUserI nstance) +181
              System.Data.Sql Client.SqlInter nalConnectionTd s..ctor(DbConne ctionPoolIdenti ty
              identity, SqlConnectionSt ring connectionOptio ns, Object providerInfo, String
              newPassword, SqlConnection owningObject, Boolean redirectedUserI nstance)
              +173
              System.Data.Sql Client.SqlConne ctionFactory.Cr eateConnection( DbConnectionOpt ions
              options, Object poolGroupProvid erInfo, DbConnectionPoo l pool, DbConnection
              owningConnectio n) +133
              System.Data.Pro viderBase.DbCon nectionFactory. CreateNonPooled Connection(DbCo nnection
              owningConnectio n, DbConnectionPoo lGroup poolGroup) +27
              System.Data.Pro viderBase.DbCon nectionFactory. GetConnection(D bConnection
              owningConnectio n) +47
              System.Data.Pro viderBase.DbCon nectionClosed.O penConnection(D bConnection
              outerConnection , DbConnectionFac tory connectionFacto ry) +105
              System.Data.Sql Client.SqlConne ction.Open() +111
              System.Web.Mana gement.SqlServi ces.GetSqlConne ction(String server, String
              user, String password, Boolean trusted, String connectionStrin g) +68

              [HttpException (0x80004005): Unable to connect to SQL Server database.]
              System.Web.Mana gement.SqlServi ces.GetSqlConne ction(String server, String
              user, String password, Boolean trusted, String connectionStrin g) +124
              System.Web.Mana gement.SqlServi ces.SetupApplic ationServices(S tring server,
              String user, String password, Boolean trusted, String connectionStrin g,
              String database, String dbFileName, SqlFeatures features, Boolean install)
              +86
              System.Web.Mana gement.SqlServi ces.Install(Str ing database, String
              dbFileName, String connectionStrin g) +25
              System.Web.Data Access.SqlConne ctionHelper.Cre ateMdfFile(Stri ng
              fullFileName, String dataDir, String connectionStrin g) +397



              --------------------------------------------------------------------------------
              Version Information: Microsoft .NET Framework Version:2.0.507 27.1433;
              ASP.NET Version:2.0.507 27.1433

              After putting the file (ASPNETDB.MDF) :
              =============== ==============
              Failed to generate a user instance of SQL Server due to failure in
              retrieving the user's local application data path. Please make sure the user
              has a local user profile on the computer. The connection will be closed.
              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.Sql Client.SqlExcep tion: Failed to generate a
              user instance of SQL Server due to failure in retrieving the user's local
              application data path. Please make sure the user has a local user profile on
              the computer. The connection will be closed.

              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): Failed to generate a user instance of SQL Server
              due to failure in retrieving the user's local application data path. Please
              make sure the user has a local user profile on the computer. The connection
              will be closed.]
              System.Data.Sql Client.SqlInter nalConnection.O nError(SqlExcep tion
              exception, Boolean breakConnection ) +800131
              System.Data.Sql Client.TdsParse r.ThrowExceptio nAndWarning(Tds ParserStateObje ct
              stateObj) +186
              System.Data.Sql Client.TdsParse r.Run(RunBehavi or runBehavior, SqlCommand
              cmdHandler, SqlDataReader dataStream, BulkCopySimpleR esultSet
              bulkCopyHandler , TdsParserStateO bject stateObj) +1932
              System.Data.Sql Client.SqlInter nalConnectionTd s.CompleteLogin (Boolean
              enlistOK) +33
              System.Data.Sql Client.SqlInter nalConnectionTd s.AttemptOneLog in(ServerInfo
              serverInfo, String newPassword, Boolean ignoreSniOpenTi meout, Int64
              timerExpire, SqlConnection owningObject) +172
              System.Data.Sql Client.SqlInter nalConnectionTd s.LoginNoFailov er(String
              host, String newPassword, Boolean redirectedUserI nstance, SqlConnection
              owningObject, SqlConnectionSt ring connectionOptio ns, Int64 timerStart) +381
              System.Data.Sql Client.SqlInter nalConnectionTd s.OpenLoginEnli st(SqlConnectio n
              owningObject, SqlConnectionSt ring connectionOptio ns, String newPassword,
              Boolean redirectedUserI nstance) +181
              System.Data.Sql Client.SqlInter nalConnectionTd s..ctor(DbConne ctionPoolIdenti ty
              identity, SqlConnectionSt ring connectionOptio ns, Object providerInfo, String
              newPassword, SqlConnection owningObject, Boolean redirectedUserI nstance)
              +173
              System.Data.Sql Client.SqlConne ctionFactory.Cr eateConnection( DbConnectionOpt ions
              options, Object poolGroupProvid erInfo, DbConnectionPoo l pool, DbConnection
              owningConnectio n) +133
              System.Data.Pro viderBase.DbCon nectionFactory. CreatePooledCon nection(DbConne ction
              owningConnectio n, DbConnectionPoo l pool, DbConnectionOpt ions options) +30
              System.Data.Pro viderBase.DbCon nectionPool.Cre ateObject(DbCon nection
              owningObject) +424
              System.Data.Pro viderBase.DbCon nectionPool.Use rCreateRequest( DbConnection
              owningObject) +66
              System.Data.Pro viderBase.DbCon nectionPool.Get Connection(DbCo nnection
              owningObject) +494
              System.Data.Pro viderBase.DbCon nectionFactory. GetConnection(D bConnection
              owningConnectio n) +82
              System.Data.Pro viderBase.DbCon nectionClosed.O penConnection(D bConnection
              outerConnection , DbConnectionFac tory connectionFacto ry) +105
              System.Data.Sql Client.SqlConne ction.Open() +111
              System.Web.Data Access.SqlConne ctionHolder.Ope n(HttpContext context,
              Boolean revertImpersona te) +84
              System.Web.Data Access.SqlConne ctionHelper.Get Connection(Stri ng
              connectionStrin g, Boolean revertImpersona tion) +197
              System.Web.Secu rity.SqlMembers hipProvider.Get PasswordWithFor mat(String
              username, Boolean updateLastLogin ActivityDate, Int32& status, String&
              password, Int32& passwordFormat, String& passwordSalt, Int32&
              failedPasswordA ttemptCount, Int32& failedPasswordA nswerAttemptCou nt,
              Boolean& isApproved, DateTime& lastLoginDate, DateTime& lastActivityDat e)
              +1121
              System.Web.Secu rity.SqlMembers hipProvider.Che ckPassword(Stri ng username,
              String password, Boolean updateLastLogin ActivityDate, Boolean
              failIfNotApprov ed, String& salt, Int32& passwordFormat) +105
              System.Web.Secu rity.SqlMembers hipProvider.Che ckPassword(Stri ng username,
              String password, Boolean updateLastLogin ActivityDate, Boolean
              failIfNotApprov ed) +42
              System.Web.Secu rity.SqlMembers hipProvider.Val idateUser(Strin g username,
              String password) +83
              System.Web.UI.W ebControls.Logi n.OnAuthenticat e(AuthenticateE ventArgs e)
              +160
              System.Web.UI.W ebControls.Logi n.AttemptLogin( ) +105
              System.Web.UI.W ebControls.Logi n.OnBubbleEvent (Object source, EventArgs e)
              +99
              System.Web.UI.C ontrol.RaiseBub bleEvent(Object source, EventArgs args) +35
              System.Web.UI.W ebControls.Butt on.OnCommand(Co mmandEventArgs e) +115
              System.Web.UI.W ebControls.Butt on.RaisePostBac kEvent(String eventArgument)
              +163
              System.Web.UI.W ebControls.Butt on.System.Web.U I.IPostBackEven tHandler.RaiseP ostBackEvent(St ring
              eventArgument) +7
              System.Web.UI.P age.RaisePostBa ckEvent(IPostBa ckEventHandler
              sourceControl, String eventArgument) +11
              System.Web.UI.P age.RaisePostBa ckEvent(NameVal ueCollection postData) +33
              System.Web.UI.P age.ProcessRequ estMain(Boolean
              includeStagesBe foreAsyncPoint, Boolean includeStagesAf terAsyncPoint) +1746





              --------------------------------------------------------------------------------

              Version Information: Microsoft .NET Framework Version:2.0.507 27.1433;
              ASP.NET Version:2.0.507 27.1433

              =============== =============== =============== ====

              ASPNETDB_LOG.LD F make no difference about the exceptions.

              Thanks :)


              Comment

              Working...