Re: working since morning, simple error but unable to resolve, ERROR :



Are you sure you posted this to the right newsgroup ?

If it is a SharePoint question at all (which doesn't seem 100% clear from
the text) then wouldn't the place for it be the
microsoft.public.sharepoint.development_and_programming newsgroup.

Mike Walsh
WSS FAQ www.wssv3faq.com / wss.collutions.com
No private questions please (additions to FAQ welcome)

"Gurjit Singh" <GurjitSingh@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:45F5B527-863B-473B-9626-13339FDB4F9A@xxxxxxxxxxxxxxxx
dear friends,

i started using Asp.net for developing webparts, web parts automatically
connect to a database to be created and saved in the database.

i had already Sql Server 2005 Express Edition installed so my webpart page
ran and automatically created the database "AspNetDb" in the "App_Data"
folder.

but when i uninstalled Sql Server 2005 Express Edition and then installed
the Sql Server 2005 Enterprise Edition, it gave me the following Error 26
as
below :

--------------------------------------------------------- Beginning of
Error
Message --------------------------------------------------

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: SQL Network Interfaces, error: 26 - Error Locating
Server/Instance
Specified)

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:


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.
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.
Sql Server Express must be installed on the machine.
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.
--------------------------------------------------------- End of Error
Message --------------------------------------------------

then when i checked the Machine.config file, i found this....

<connectionStrings>
<add name="LocalSqlServer" connectionString="data
source=.\SQLEXPRESS;Integrated
Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User
Instance=true" providerName="System.Data.SqlClient" />
</connectionStrings>

then i thought it's becoz, of the datasource thing that the Machine.Config
file supports by default the default free edition of Sql Server 2005 which
is
the Sql Server 2005 Express Edition.

but friend in my company we use Sql Server 2005 Enterprise Edition, so can
anybody pls guide me and get me out of this soup on helping me to use Sql
Server 2005 Enterprise Edition by modifying either 1) Machine.Config File
and/or 2) Web.Config file and/or 3) any other way, but please help i want
to
do this, please......

regards and thanks

Gurjit Singh



.



Relevant Pages

  • RE: Problems with WebParts
    ... to a database called aspnetdb. ... > The connection string specifies a local SQL Server Express instance using a ... > server account must have read and write access to the applications directory. ... > This is necessary because the web server account will automatically create ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Keep getting this error when trying to use Web Parts in VS2005 Beta 2. Why?
    ... You can also use SqlServer by running the aspnet_regsql.exe utility to setup another database. ... The connection string specifies a local SQL Server Express instance using a database location within the applications App_Data directory. ... If the applications App_Data directory does not already exist, the web server account must have read and write access to the applications directory. ... the process account needs the dbcreator privilege in the appropriate SQL Server Express instance. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: MS Access DAO -> ADO.NET Migration
    ... William Vaughn ... Microsoft MVP ... Hitchhiker's Guide to Visual Studio and SQL Server ... My migration app works building a SSCE database file with imported data ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Cluster will not fail over.
    ... > As far as the TCP/IP issue goes, you had to rebuild the cluster and were ... > able to restore the master database. ... > a cluster installation you'll have to revisit. ... >> This worked bringing up the sql server in minimal mode. ...
    (microsoft.public.sqlserver.clustering)
  • Re: MS Access DAO -> ADO.NET Migration
    ... For that it is much harder to handle the incremental identifier, ... database but although they have the data, they are not connected at the same ... The book was a pleasure to read after the gibberish that Microsoft 'puts ... SQL Server Management Studio is nowhere to be found on my ...
    (microsoft.public.dotnet.framework.adonet)