SQL Express

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
15 years ago
Hello,
I'm usign SQLExpress and i've same problem.
Can I use it? Why I've message:

1)
Unable to use SQL Server because ASP.NET version 2.0 Session State is not installed on the SQL server. Please install ASP.NET Session State SQL Server version 2.0 or above.

2) login failed
Impossibile aprire il database "G:\SITI\NOPCOMMERCE\NOPCOMMERCEWEB\APP_DATA\NOPCOMMERCE.MDF" richiesto dall'account di accesso. Accesso non riuscito.
Accesso non riuscito per l'utente 'Blucons-Glauco\Admin'
15 years ago
Yes. You can use MS SQL Express.

1) By default nopCommerce uses in-process session state. But if you want to use an out-of-process SQL Server database to store state information, you should install it first. You should execute "aspnet_regsql -S serverName -U userName -P password -ssAdd".

You can read about session state configuration here

2) Can you write it in english?
15 years ago
P.S. nopCommerce is ASP.NET 3.5 based (not ASP.NET 2.0).
15 years ago
ok, my computer use 'Blucons-Glauco\Admin' user from visual studio 2005 web servr debug,
and 'NT AUTHORITY\SERVIZIO DI RETE' / 'NT AUTHORITY\NETWORK SERVICE' form IIS.

Both users can't acces to Database. I think that the users can't execute the storedProcedure. Is possible?
How can I resolve it?

thanks.
15 years ago
You can't use Visual Studio 2005. nopCommerce is ASP.NET 3.5 based (not ASP.NET 2.0). You should use Visual Studio 2008.

Also I recommend you to download this manual "Installation and setup" (https://www.nopcommerce.com/downloads/InstallationAndSetup.pdf)
15 years ago
I've just installed NopCommerce, and when I run it form '//localhost:123/',
I recivie the error message 'Cannot open user default database. Login failed.
Login failed for user 'NT AUTHORITY\NETWORK SERVICE'.'
15 years ago

        public static LanguageCollection GetAllLanguages(bool showHidden)
        {
            LanguageCollection languageCollection = new LanguageCollection();
            Database db = NopDataHelper.CreateConnection();
            DbCommand dbCommand = db.GetStoredProcCommand("Nop_LanguageLoadAll");
            db.AddInParameter(dbCommand, "ShowHidden", DbType.Boolean, showHidden);
            using (IDataReader dataReader = db.ExecuteReader(dbCommand))


The line db.ExecuteReader(dbCommand)) is the point where the error is rised
15 years ago
Give 'NT AUTHORITY\NETWORK SERVICE' required permissions (sql server settings).
15 years ago
Normally, with asp.net application, I don't have to modify the permission for DB.
I've 3 application with sqlExpress DB and no more setup are necessary.

however, the user NT AUTHORITY\NETWORK SERVICE is db_datareader and db_datawriter, but this user can't execute the storedProcedure
15 years ago
I've tested the same database in the same directory, with custom testApplication using System.Data.SlqClient connection and command, and not have error.


        System.Data.SqlClient.SqlConnection appcomm = new System.Data.SqlClient.SqlConnection();
        appcomm.ConnectionString = ConfigurationManager.ConnectionStrings["NopSqlExpressssss"].ConnectionString;
        appcomm.Open();
        SqlCommand cmd = appcomm.CreateCommand();
        cmd.CommandText = "Nop_LanguageLoadAll";
        cmd.CommandType = CommandType.StoredProcedure;
        cmd.Parameters.Add("ShowHidden",SqlDbType.Bit);
        cmd.Parameters[0].Value = false;
        cmd.ExecuteNonQuery();
        appcomm.Close();
        appcomm.Dispose();


How is possible? Moreover, when other application is started and conneciont opened, NopCommerce can connect with database without problem
The same code in the NopCommerce module, releas the same connection error!!!!!!!!!!!!!!!!!!!

Can you help me?
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.