Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

connection string in module
hyeongseong
#1 Posted : Monday, September 12, 2011 1:22:02 AM(UTC)
Rank: Member
Groups: Registered

Joined: 8/10/2011(UTC)
Posts: 12
Hi

I am working on kooboo module. and I am just wondering.. I created Linq to Sql classes(dbml) in model in order
to fetch data from data base and display them in a view file.

After building a project, the module gernerates a connection string in web.config in my module project.
and then I installed my module in my kooboo website, but it couldn't find a connection string for my module.

so I just tried to copy the connection string to web.config in kooboo website. It finally worked.

My question is that.. is there a way for the module to use its connection string in its web.config
instead of getting connection string from kooboo web project web.config file.

I want to make them seperate so as to avoid adding any codes on kooboo web project.

Thx in advance.

jifeng
#2 Posted : Tuesday, September 13, 2011 3:18:12 AM(UTC)
Rank: Administration
Groups: Administrators, Registered

Joined: 9/3/2009(UTC)
Posts: 1,552
Location: Xiamen China
On site can not use multiple web.config files. So it is impossible to use the module web.config in the kooboo cms site.

You can place the connection string in the site custom settings.
Regards,

Jifeng Huang

Kooboo Team

Microsoft ASP.NET MVP
hyeongseong
#3 Posted : Tuesday, September 13, 2011 5:23:51 AM(UTC)
Rank: Member
Groups: Registered

Joined: 8/10/2011(UTC)
Posts: 12
Thanks for the reply, Jifeng.

Do you mean that I need to add a connection string web.config in kooboo cms
through the site custom settings for my module to be able to connect to database?
jifeng
#4 Posted : Thursday, September 15, 2011 7:00:28 AM(UTC)
Rank: Administration
Groups: Administrators, Registered

Joined: 9/3/2009(UTC)
Posts: 1,552
Location: Xiamen China
Two options:

1. Store the connection string in the kooboo cms web.config.

2. Store the connection string in the site custom fields.
Regards,

Jifeng Huang

Kooboo Team

Microsoft ASP.NET MVP
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF 1.9.5.5 | YAF © 2003-2011, Yet Another Forum.NET
This page was generated in 0.251 seconds.