Problem with Installing Database on Localhost Server

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
14 years ago
Problem with Installing Database on a Localhost Server, I am trying to install the database in the App_Data Directory I have created a new New database called -
NopCommerceStore.mdf and I am trying to Create the Tables and Stored Procedures, by
executing the three files in the Install/1.20/ folder. But I am geting errors in my attempt to do so.

My connection String is set to:

Data Source=.\SQLEXPRESS;AttachDbFilename="C:\Documents and Settings\Dennis West\My Documents\NopCommerceStore.mdf";Integrated Security=True;Connect Timeout=30;User Instance=True
14 years ago
What error are you getting?
14 years ago
I believe its a permission issue. Don't put any database in a appldata in a website ever. I know VB does this but dont. Move it elsewhere like the default path of sql server manager places it. Never ever in a web root. Your just asking for trouble. NOP by default does this for you so you do nothing.

steps to ensure you can connect to your NOP database.

Make sure you have (user name ) admin rights . Use "slq auth" whenever possible never windows permission.

To make a sql user with rights...
open sql management studio

login in with "Windows Auth" since I know you can't login with SQL Server Auth ..at least yet.

go to "SECURITY DIRECTORY"

GO TO "LOGINS"

Right Click and ADD NEW USER called "MynameI will not forget"

MAKE SURE YOU "USE SQL SERVER AUTH"

default database = MASTER

left side = server roles

check all that apply to the admin. beware IF you get hacked with your user name the hacker will have fullrights to play games. public ,sys admin is min req...same as sa user.

You now created a MASTER ADMIN that can create a new database.


also make sure in window services (round wheel icon) you enable sql browser!!!! you cannot not do crap without this enabled.

open windows firewall to "allow exception only of SQL ". if you have hardline cisco router you must open ports as well.

sql browser PORT RANGE FORWARD = 1434 TO 1434 OPENED UDP ONLY
MAKE SURE THE IP IS YOUR SERVER it forwards to. (shared hosting will need to contact their provider to open sql ports)


Try to install it again. This time when you install NOP make sure you use your SQL AUTH use name and the "servername/sqlexpress" exactly just replace your name of webserver


you should have permissions to write unless you didnt add network services to your shop. dont worry the error message will show you. just right click on store directory and add user with read and write perm.

good to go

Mike
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.