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

HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Codesmith removing aspnet local user rights to database.mdf fileCodesmith removing aspnet local user rights to database.mdf file
Previous
 
Next
New Post
10/1/2008 8:19 AM
 

I have setup dnn 4.9 locally on my pc running win xp pro sp3. It works fine and I am using the dnn 4.9 starter kit which installs the local app_data\database.mdf file. This setup is what I am using to develop dnn modules.

 

When I use codesmith to generate my dataprovider, sqldataprovider, controller, and info classes, it removes the aspnet local account completely from having access to the database.mdf file. It instead adds the sqlexpress local user account in its place.

 

I understand that this is necessary so codesmith can attach the database.mdf file and get at the tables, however, this then makes my dnn local portal not work since the aspnet local user account must have full privileges on the database.mdf file and it has been removed.

 

So, I run my codesmith templates, then manually go back and add the aspnet local user account to the database.mdf file and grant it full rights to the file so my dnn local portal will work.

 

This is cumbersome since I must repeat this process every time I need to generate codesmith classes or stored procedures. Does anyone know how to have this process of using codesmith and a local dnn 4.9 install work together so that the codesmith, or actually the sql server 2005 express local user, not remove the aspnet local account from the database file? In other words, is there a way to let them both have access to the database.mdf file without removing the aspnet local account?

 

 
New Post
10/2/2008 8:16 AM
 

In the Server tab in the Solution Explorer in Visual Studio, you can right-click on the database and select close connection.



Michael Washington
http://ADefWebserver.com
www.ADefHelpDesk.com
A Free Open Source DotNetNuke Help Desk Module
 
New Post
10/3/2008 2:02 PM
 
When I close the database connection with vs 2005, and then open up sql studio manager express, it removes the aspnet local account from the database.mdf file so closing the connection from within vs 2005 doesn't seem to keep the aspnet local acount from being removed from the database.mdf file that sql studio manager express is removing. I still have to manually re-add the aspnet local account back on the database.mdf file every time I quit codesmith or sql server studio manager express. Any other ideas? Thanks!
 
New Post
10/3/2008 6:12 PM
 

Don't use sql studio manager express. You should be able to do everything you need to do through the Database manager in the Visual Studio Solution Explorer.



Michael Washington
http://ADefWebserver.com
www.ADefHelpDesk.com
A Free Open Source DotNetNuke Help Desk Module
 
New Post
10/6/2008 9:02 AM
 
Thanks for the follow up post. The real problem is using codesmith which is outside of the vs 2005 IDE. I am using codesmith dnn templates to generate my data access layer and my info/controller classes. Since I am using a local mdf database file, the only way I can get codesmith to log into the database is to attach it in my connection string. Once it is attached, I then can use the dnn codesmith templates. However, as previously mentioned, when attaching the database.mdf file in the codesmith connection string, it literally removes the aspnet local account from the file. By attaching the database.mdf file in teh codesmith connection string, codesmith completely strips the local aspnet account off the file and never puts it back once I exit codesmith. I then must manually go to the database.mdf file and re-apply the local aspnet account to it so my dnn local portal will run. Do you or anyone else happen to use codesmith on a local install of a dnn portal and using the database.mdf file? If yes, how are you able to get the local aspnet account to not be removed from the database.mdf file when you use codesmith outside of the vs 2005 IDE? btw I am using codesmith 2.6 to execute the dnn templates - I found the dnn templates referenced in the book professional DotNetNuke 4.
 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Codesmith removing aspnet local user rights to database.mdf fileCodesmith removing aspnet local user rights to database.mdf file


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