Small width layout Medium width layout Maximum width layout Small text Medium text Large text
     Search
Downloads Downloads Directory Directory Forums Forums Forge Forge Blogs Blogs        Marketplace Marketplace Careers Program Careers
Community › Forums Register  |  

PortalWebHosting
  Need Help?  
Professional technical support for DotNetNuke is available from DotNetNuke Corporation.
 


  Ads  
The best choice for your web site host, email hosting, and domain registration.
 


  Sponsors  

Meet Our Sponsors

The Official Microsoft ASP.NET Website
Portal Webhosting - Hosting For Developers
Red-Gate Software
MaximumASP
SourceGear - Tools for Developers
.: CounterSoft :.
 


DotNetNuke Forums
 
  Forum  DotNetNuke® Pro...  Authentication ...   messing up my DB connection
Previous Previous
 
Next Next
New Post 5/9/2008 8:04 AM
Resolved
User is offline NH
13 posts
10th Ranked


messing up my DB connection 

Hi!

Iam using DNN 4.08.02 with the AD integration installed.
For the AD integration to function I have to add the row:
"<identity impersonate="true" userName="domain\usr" password="pw" />" in web.config.

Sometimes I then get a errormessage accessing my site. When I remove the "identity impersonate" line in web.config the error goes
away (But the AD integration dont work).

The error is:

Cannot open user default database. Login failed.
Login failed for user 'domain\usr'.

[SqlException (0x80131904): Cannot open user default database. Login failed.
Login failed for user 'ds_nt\nh'.]
   System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +435
   System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +82
   System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +105
   System.Data.SqlClient.SqlConnection.Open() +111
   Microsoft.ApplicationBlocks.Data.SqlHelperParameterCache.DiscoverSpParameterSet(SqlConnection connection, String spName, Boolean includeReturnValueParameter, Object[] parameterValues) +204
   Microsoft.ApplicationBlocks.Data.SqlHelperParameterCache.GetSpParameterSetInternal(SqlConnection connection, String spName, Boolean includeReturnValueParameter) +303
   Microsoft.ApplicationBlocks.Data.SqlHelperParameterCache.GetSpParameterSet(String connectionString, String spName, Boolean includeReturnValueParameter) +154
   Microsoft.ApplicationBlocks.Data.SqlHelperParameterCache.GetSpParameterSet(String connectionString, String spName) +36
   Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteReader(String connectionString, String spName, Object[] parameterValues) +200
   DotNetNuke.Services.Log.EventLog.DBLoggingProvider.Data.SqlDataProvider.GetLogTypeConfigInfo() +68
   DotNetNuke.Services.Log.EventLog.DBLoggingProvider.DBLoggingProvider.GetLogTypeConfigInfo() +108
   DotNetNuke.Services.Log.EventLog.DBLoggingProvider.DBLoggingProvider.GetLogTypeConfigInfoByKey(String LogTypeKey, String LogTypePortalID) +62
   DotNetNuke.Services.Log.EventLog.DBLoggingProvider.DBLoggingProvider.AddLog(LogInfo objLogInfo) +72
   DotNetNuke.Services.Log.EventLog.LogController.AddLog(LogInfo objLogInfo) +188

I dont realy know exactly what "identity impersonate="true"" does.
1) Do I have to activate this to use the AD integration?
2) Wy is it sometimes messing up my database connection?

Thanks!

 

 

 

 
New Post 5/9/2008 3:05 PM
User is offline Rhys
51 posts
10th Ranked


Re: messing up my DB connection 

In rough terms (because I only understand this stuff roughly) "identity impersonate="true"" changes the security context under which a process executes.

In your database connection string I'm guessing you've got "Integrated Security=True" and not "User "ID=[user name];Password=[password]"? If you can use the latter option you will connect to the database with a SQL Server login rather than an AD account and you shouldn't have any problems with impersonation.

The right answer to your problem depends on what you are trying to achieve. Getting DNN with the database to operate in a user's context isn't something I'ld try to do without a lot of planning, and more technical knowledge than I've got.

Rhys

 


www.rmjcs.com - Mostly SQL Server Stuff
 
New Post 5/11/2008 11:07 PM
User is offline NH
13 posts
10th Ranked


Re: messing up my DB connection 

Hi!

Thanks for your reply! 
Its correct that Iam using "Integrated Security=True" on my development enviroment where Iam using SQL Server Express. 
I will try using the "User-approach". Is that possible with the SQL Server Express? Yes? :P

Niclas

 
New Post 5/12/2008 4:18 AM
User is offline Rhys
51 posts
10th Ranked


Re: messing up my DB connection 

SQL Server Express should work fine with SQL Logins. You'll need to create a login in the database first, for example DNNUser, then give this login dbo access to the relevant DNN database. You can do this in SQL Server Management Studio if you have it, or SQL similar to this will do the trick (change the red bits);

USE [master]
GO
CREATE LOGIN [DNNUser] WITH PASSWORD=N'SomeSafePassword', DEFAULT_DATABASE=[master], CHECK_EXPIRATION=OFF, CHECK_POLICY=OFF
GO
USE [MyDNNDatabase]
GO
CREATE USER [DNNUser] FOR LOGIN [DNNUser]
GO
USE [MyDNNDatabase]
GO
EXEC sp_addrolemember N'db_owner', N'DNNUser'
GO

Regards, Rhys.


www.rmjcs.com - Mostly SQL Server Stuff
 
New Post 5/12/2008 7:48 AM
User is offline NH
13 posts
10th Ranked


Re: messing up my DB connection 

Hi! Thanks again Rhys!
It all worked fine. Iam now using a SQL instance instead of user instance (If have understod everything correctly) . I haven´t seen the error anymore today, so I belive its all good!

 
Previous Previous
 
Next Next
  Forum  DotNetNuke® Pro...  Authentication ...   messing up my DB connection
 


Forum Policy

These Discussion Forums are dedicated to the discussion of the DotNetNuke Web Application Framework.

For the benefit of the community and to protect the integrity of the project, 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 DotNetNuke.
2. Discussion or promotion of DotNetNuke product releases under a different brand name are strictly prohibited.
3. No Flaming or Trolling.
4. No Profanity, Racism, or Prejudice.
5. Site Moderators have the final word on approving/removing a thread or post or comment.
6. English language posting only, please.

 


Smart-Thinker
DNN Modules for Social Networks for as low as $69 for 6 modules! We also maintain the DotNetNuke Directory - http://DNNDir.com
www.smart-thinker.com
DNN Photo Gallery
Complete Photo Gallery Management!
www.dnnPhotoGallery.com
R2i - Delivering Serious DNN Services & Solutions
Award Winning Design, Skin construction, Custom Modules and Consulting Services for the Enterprise organization. R2i is the DNN:Map module Project Lead and one of the largest DNN service providers with offices in New York City, Virginia and Baltimore.
www.bi4ce.com

DotNetNuke Corporation   Terms Of Use  Privacy Statement
DotNetNuke®, DNN®, and the DotNetNuke logo are trademarks of DotNetNuke Corporation
Hosted by MaximumASP