i am really frustrated from this problem, i am trying to install DNN 7 in windows server 2008, i follwoed the steps in DNN site for installation, but when i run installer wizard i am getting connection error, i give the user permission on Folder level, as owner to the database, and still nothing, do i need to modify the connection in web.config file? is this correct
note:
database name: dnndev.me
user name: Administrator
Password: password
<add name="SiteSqlServer" connectionString="Data Source=.\SQLExpress;Integrated
Security=True;User Instance=True;AttachDBFilename=|DataDirectory|dnndev.me.mdf;"
providerName="System.Data.SqlClient" />
please help
this is my second post and i am not getting answer
How's your SqlServer set up? If the server is setup to use integrated security, you really don't need a username/password as Chris pointed out. In that case, the connection string in your web.config <ConnectionString> and <AppSettings> sections should look like
Data Source=.\SQLExpress;Integrated Security=True;User Instance=False;Database=dnndev.me;
Check out this blog for more details.
If you are using SQLExpress, and you have SQLExpress installed locally using the default instance, you don't need to worry about usernames/passwords for the database. DNN will attach the MDF file in the app_Data folder automatically.
If you are using another INSTANCE of SQL, than you will want to create the Database, and then associate a username/password that is DB_OWNER for that database, and provide that during the installation process. If that is the case, DO NOT choose the SQL Express option, use the SQL 2008 option.
Related
Ok, So I just installed visual studio code with 150GB of libraries and tools, and the episerver plugin. When you fire up a new episerver project, it magically creates a database.
I need to wipe this database some how, or create a new one and point episerver to this.
The question is, how?
If this was mysql, I would fire up heidisql, or mysql workbench, put in localhost:3306 and the admin username and password.
I tried installing SSMS, but when I run this, it does not see any databases - it doesn't seem to be able to "see" sql server express databases.
Trying to reverse engineer this, episerver is using the following connection string:
<connectionStrings>
<add name="EPiServerDB" connectionString="Data Source=(LocalDb)\MSSQLLocalDB;AttachDbFilename=|DataDirectory|EPiServerDB_faa2d554.mdf;Initial Catalog=EPiServerDB_faa2d554;Connection Timeout=60;Integrated Security=True;MultipleActiveResultSets=True" providerName="System.Data.SqlClient" />
</connectionStrings>
Googling revealed one lead: sqlcmd.
But I have no idea what parameters I need to connect? I dont know what the server, port, username, password or database name is.
Any suggestions?
It's been a while since I did this, but I think you'd have your connect window like this:
And then when conencted you'd right click the databases node and choose Attach... (and pick the EPiServerDB_faa2d554.mdf
You might be able to specify the filename in the Additional Connection Parameters in the advanced
Try:
SQLCMD /S (LocalDb) /d EPiServerDB_faa2d554
This should connect you to the database.
Otherwise, if you want to connect through SSMS, you can try:
Server Name: (LocalDb)\MSSQLLocalDB
or just
Server Name: (LocalDb)
I have an ASP.net MVC app connecting to (localdb)\v11.0 SQL Server database with a connection string using "Integrated Security" - works fine.
Now I want to connect to the same db with a User ID & PW.
I created the login & user: user100, gave it db_owner permission.
I can open the db with that ID/PW using SSMS.
But when I change my connection string to "User ID=user100 & Password=xxxx", I get the error:
CREATE DATABASE permission denied in database 'master'.\r\nCannot
attach the file
'C:\Projects\ExcellerWeb\ExcellerWeb\App_Data\ExcellerWebCopy.mdf'
as database 'ExcellerWebCopy'.
Why does it try to create a database that already exists?
And the following code returns TRUE:
System.Data.Entity.Database.Exists("UserConnection");
At first I thought it was EF Migrations, but it seems to happen on a simple test project without Migrations.
Here's my connection string:
<add name="UserConnection"
connectionString="Data Source=(LocalDb)\v11.0;AttachDbFilename=|DataDirectory|\ExcellerWeb.mdf;Initial Catalog=ExcellerWeb;Integrated Security=False;User ID=user200; Password=****"
providerName="System.Data.SqlClient" />
Remove the Option AttachDbFilename from your connectionstring.
<add name="UserConnection"
connectionString="Data Source=(LocalDb)\v11.0;Initial Catalog=ExcellerWeb;Integrated Security=False;User ID=user200; Password=****"
providerName="System.Data.SqlClient" />
This option is there to attach the file when you open the connection.
For more details have a look at this or this MSDN-article
This isn't an answer to the original question, but we got the same error message when we moved a web app and database to new hardware, and a Google search led me here, so hopefully this might help someone...
In our case, the connection string that the web app used was fine, and the database already existed, so the error message was a bit of a surprise.
The problem turned out to be that the service account running the app pool in IIS didn't have the correct permissions on the database - when the account was added to the appropriate group, everything worked fine.
I'm trying to configure a DotNetNuke 7 (DNN 7) but the following error occur
ERROR:Index #: 0
Source: .Net SqlClient Data Provider
Class: 20
Number: 2
Message:
the database is SQL server 2008 R2, both database and web server on localhost. I checked the username and all instruction in the following like carefully but nothing changed
the installation guide link
http://www.dnnsoftware.com/community/learn/video-library/view-video/video/515/view/details/dnn-7-0-installation-part-1-file-system-configuration
Check to verify that you SQL Server instance name is the Default instance, if it isn't, you'll need to change the name when connecting to it.
Something like "localhost" would work for the default instance, but if you named it something else, you would use "localhost/somethingelse"
You also should attempt to connect to your DB server using SQL Server Management Studio, with the exact same information you are trying to use in DNN.
This is an elder question, but hopefully somebody benefits from this answer.
My connection string in DNN's web.config looks like this:
<add name="SiteSqlServer" connectionString="Data Source=.\SQLExpress;AttachDbFilename=|DataDirectory|Database.mdf;Integrated Security=True;User Instance=True" providerName="System.Data.SqlClient" />
This is an SQL Server 2016 Express instance. The MDF file will be in the App_Data folder of the DNN installation.
I am trying to create a database for an MVC 4 application. I used Entity Framework Code first approach. After digging into the problem I realized that it was not a connection string issue. I downloaded Sql Server Data tools and tried to create it from there but I get the same exact error which is related to Windows Authentication. I am not sure what is causing this problem, I even tried running as admin.
Any ideas??
I have tried mostly all forms of connections strings available online, the last two that I tried were
<add name="Request" connectionString="Data Source=(LocalDb)\v11.0;Initial Catalog=Requests;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|\Requests.mdf" providerName="System.Data.SqlClient" />
<!--<add name="RequestsContext" providerName="System.Data.SqlServerCe.4.0" connectionString="Data Source=|DataDirectory|\Requests.mdf" /> -->
I am trying to create a local database, I have asked a question about entity frame work right here thinking that the problem was from there but now I know it has nothing to do with it. Here you can see all of the details about the models I created and I am trying to generate the database from.
Using Entity framework with SQL Server 2012 (local *.mdf database)
You don't have SQL Server installed on your PC. Install Express Edition and you should be fine.
EDIT: Use connection string for local server:
<add name="Request" providerName="System.Data.SqlClient" connectionString="Server=.\SQLEXPRESS;Database=Request;Integrated Security=True;" />
If its local, probably SQL Server service is not running. Start>cmd and services.msc will open services page. Right click on sql server and start
Is there anyway to change the ASPNETDB and also using SQLExpress (2005) user instance ?
I have changed my web.config's connectin string to
<remove name="LocalSqlServer"/>
<add name="LocalSqlServer"
connectionString="Data Source=.\SQLEXPRESS;
AttachDbFilename=|DataDirectory|\Kooft.mdf;
User Instance=true;
Integrated Security=True;
Initial Catalog=Kooft;"
providerName="System.Data.SqlClient" />
but every time I using ASP.Net Configuration Tool, it will create another ASPNETDB.mdf file in my App_Data folder.
Run aspnet_regsql.exe from your Framework 2.0 folder, mine is:
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727
Go through the wizard and choose the database that you wish to add the AspNetDB tables too.
Set the connectionstring to connect to your database e.g. (Anything in square brackets may possibly need changing and the brackets removed.
Update your membership provider section of the web.config and set the following setting to be the connectionstringname from above:
connectionStringName="INSERTCONNNSTRINGNAME"
Then you should be ready to roll. Remember to change the same setting on any role or personalization providers you may have already in the web.config.
First, create a new, empty database in your SQL Express instance.
Then run the aspnet_regsql.exe tool that can be found here:
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_regsql.exe
This will open a GUI wizard allowing you to select a database server and database to be set up with the default schema for the aspnet providers (membership, profile, roles).
Configure the security on the database appropriately - for best results, you probably want to enable Integrated Security, so ensure that the account the web site is runing under has access to the database, there are a number of Database Roles that are created for you - add your account to the appropriate ones.
Then, in your webconfig, you'd have something like:
<connectionStrings>
<remove name="LocalSqlServer"/>
<add name="LocalSqlServer"
connectionString="Data Source=[ComputerName]\SQLEXPRESS;Initial Catalog=[DatabaseName];Integrated Security=True"
providerName="System.Data.SqlClient"/>
</connectionStrings>
The key parts to update there are:
[ComputerName] - this should be the
instance name of your SQL Express
installation.
[DatabaseName] - this
should be the name of the database
you used in the first two steps.
That's certainly how I got mine up and running.