Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesStuck at step 1Stuck at step 1
Previous
 
Next
New Post
2/25/2010 2:38 PM
 

I am trying to learn how to create modules.  I bought the book "Professional DotNeNuke Module Programming" and am working my way through the first chapter. The first step of a long journey I know, but I've got to start somewhere.  I've emailed the author of the book, but also wanted to post here to see if any of you could offer insight.  

I have downloaded Visual Studio Express, SQL Server Management Studio Express, created my database, installed DNN locally in Inetpub\wwwroot and am working my way through the Install Wizard.  This is where I'm encountering the issue.  It seems that I can't connect to the database, but I'm not sure why.  I've tried every path to the database that makes sense to me, but I keep getting the error: 

Connection Error(s):
Index #: 0
Source: .Net SqlClient Data Provider
Class: 14
Number: 18456
Message: Login failed for user 'pattersonc'.

Do you know if this is a common problem and what advice could you offer me for troubleshooting this issue.  

 

Thanks in advance for any help... 

Module Rookie!

 
New Post
2/25/2010 5:38 PM
 

Are you able to successfully login (SQL Server Authentication selected, not Windows Authentication) to the database with the userid of 'pattersonc' using SQL Server Management Studio Express?

If so, the problem is most likely to be in your connection strings in web.config. Please post to this forum thread the entire <connectionStrings> section and the first few lines of the <appSettings> section up to the line beginning <add key="InstallTemplate" . . . When posting to the forum, be sure to change the database username and password to xxxxxxx.

If you are not able to login to the database using SQL Server Management Studio Express, the problem is most likely in your installation/configuration of SQL Server Express.


Bill, WESNet Designs
Team Lead - DotNetNuke Gallery Module Project (Not Actively Being Developed)
Extensions Forge Projects . . .
Current: UserExport, ContentDeJour, ePrayer, DNN NewsTicker, By Invitation
Coming Soon: FRBO-For Rent By Owner
 
New Post
2/26/2010 9:14 AM
 

Bill,

Thanks so much for responding to my post.  It's very frustrating for me to not even be able to get past chapter 1 and the first 25 pages of this book!  Configuring the environment is not an easy task for rookies.  Anyway I appreciate it.

So updates...responses to your post

  • I can not connect to the server when I try to login via SQL Server Authentication.  I can login via Windows Authentication though.  You said that if I can't login via SQL Server Authentication then something may be wrong with my configuration.  If that's the case, how would I go about changing the configuration.  Whenever I try to login via SQL Server Authentication it gives me the error "Login failed for user 'pattersonc'.  The user is not associated with a trusted SQL Server connection (Microsoft SQL Server, Error: 18452)"
     
  • Also, I emailed the author (Mitchel Sellers) and he responded saying that trying to connect via web.config may be a good way and if I wasn't successful via web.config then it would give me a better error
     
  • The code from web.config as it currently is (the default installation) -

    • <connectionStrings>
          <!-- Connection String for SQL Server 2005/2008 Express -->
          <add name="SiteSqlServer" connectionString="Data Source=.\SQLExpress;Integrated Security=True;User Instance=True;AttachDBFilename=|DataDirectory|Database.mdf;" providerName="System.Data.SqlClient" />
          <!-- Connection String for SQL Server 2005/2008
          <add name="SiteSqlServer" connectionString="Server=(local);Database=DotNetNuke;uid=;pwd=;" providerName="System.Data.SqlClient" />
          -->
        </connectionStrings>
        <appSettings>
          <!-- Connection String for SQL Server 2005/2008 Express - kept for backwards compatability - legacy modules   -->
          <add key="SiteSqlServer" value="Data Source=.\SQLExpress;Integrated Security=True;User Instance=True;AttachDBFilename=|DataDirectory|Database.mdf;" />
          <!-- Connection String for SQL Server 2005/2008 - kept for backwards compatability - legacy modules
          <add key="SiteSqlServer" value="Server=(local);Database=DotNetNuke;uid=;pwd=;"/>
          -->

Again thanks for your help and patience with me.

Regards,

Clint
 

 
New Post
2/26/2010 2:11 PM
 

As you mentioned that you had already "created your database", I'm assuming that you will want to use that database rather than the Database.mdf file that is included in the DotNetNuke install App_Data folder. Other than for quick installs of DotNetNuke for testing purposes I do recommend that you create and use a database as you have done. And, since you  created a login for database user "pattersonc", I'm assuming that you want DotNetNuke to connect to the database using Sql Server Authentication rather than Windows Authentication. Again, that is also my suggested approach.

However, since your are not able to connect to the database using SQL Server Authentication using that username and its associated password, there could be one of two problems:

1. Your install of SQL Server Express is not setup for SQL Server Authentication. To correct that . . .
a. Open SQL Server Management Studio Express and connect to the SQL server instance using Windows Authentication.
b. hover the mouse pointer over the top node (which gives the SQL server instance name) shown in the Object Explorer and right click
c. Select Properties from the context menu
d. Select the Security page from the list of property pages.
e. In the section titled "Server Authentication", select "SQL Server and Windows Authentication Mode" then click OK.
f.  Close SQL Server Management Studio Express and restart MS SQL Server Express.
g. Open SQL Server Management Studio Express and try connecting to the database using SQL Server Authentication and the "pattersonc" username and password.'

2. The SQL Server login for user "pattersonc" has not been properly defined.
a. Open SQL Server Management Studio Express and connect to the SQL server instance using Windows Authentication.
b. Open the Security-->Logins Node under the top node then select the user "pattersonc".
c. Verify that the login name and password are correct AND that SQL Server Authentication is selected for that user. If not, make the necessary changes.
d. Select the database that you have created and open its Security-->Users node.
e. If you have not already added the "pattersonc" user, add it to the users for that database. Also check db_Owner in both the Owned Schemas and Database Role Membership boxes.

Again, try logging into the database in SQL Server Management Studio using SQL Server Authentication and the "pattersonc" user.

Once you are able to successfully complete the above, you should be able to successfully set up your database connecting and test it in the DotNetNuke install wizard. If you are still having problems, let us know what SQL Server information you are entering in the wizard and either correct them or advise how to manually modify the connectionStrings in web.config.


Bill, WESNet Designs
Team Lead - DotNetNuke Gallery Module Project (Not Actively Being Developed)
Extensions Forge Projects . . .
Current: UserExport, ContentDeJour, ePrayer, DNN NewsTicker, By Invitation
Coming Soon: FRBO-For Rent By Owner
 
New Post
2/27/2010 9:52 AM
 

 Bill,

Thanks so much for your help!  I finally am able to connect locally and have proceeded through the installation wizard.  Now I've got the generic site up and running locally on my machine.  While I know I'm still a million miles out, it feels good to finally get past that point.  Again, thanks so much!  Hopefully I'll be able to actually make it through a full chapter before getting stumped again.

Regards,

Clint

 
Previous
 
Next
HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesStuck at step 1Stuck at step 1


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out