Solved

asp.net 2.0 web.config configSections question, How can I create with correct type?

Posted on 2009-04-09
2
495 Views
Last Modified: 2012-06-21
Hello there,
I am working on our website, and I am integrating a newCart app into the main app.
main/
main/newCart
the newCart is located in a virtual directory and it is a shopping system we purchased.
I have create the reference that I need to pass the user information into the newCart. But I come to a problem.
IN my web.config I think I need to create a custom tag in the configSections like
 <configSections>
   <section name = "newCart" type="xxx" />
</configSections>
then
<newCart>
  <add key="connString" value=" data source=..... " />
</newCart>
From what I searched, the type xxx should be a class implement the ConfigurationSection.
I searched the newCart codes and did not have anything implement this ConfigurationSection, how can I deal with this? My goal is to let the referenced class connect with the correction string to DB.
Appreciate any help.
0
Comment
Question by:tomcattyy
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 8

Accepted Solution

by:
bedanand earned 500 total points
ID: 24113307
Find the connection string name used on the new cart app. And on the connection settings section add another connecting string with  the name of the connection string used on the cart app.


Thanks
Bedanand
http://www.dot4pro.com



0
 
LVL 1

Author Comment

by:tomcattyy
ID: 24113588
Hello Bedanand,

no, still with the same error message. Seems I create the connecting string but did not tell the name space to use it. Below is the message. Thanks

Exception Details: System.ArgumentNullException: Value cannot be null.
Parameter name: providerInvariantName

Source Error:


Line 125:        {
Line 126:            if (_dbFactory == null)
Line 127:                _dbFactory = DbProviderFactories.GetFactory( DataAccessHelper.DbProviderName );
Line 128:
Line 129:            return _dbFactory;
 

Source File: C:\vevocart\VevoCart_Pro_Advanced_301\CommonLib\DataAccessLib\DataAccessHelper.cs    Line: 127

Stack Trace:


[ArgumentNullException: Value cannot be null.
Parameter name: providerInvariantName]
   System.Data.Common.ADP.CheckArgumentLength(String value, String parameterName) +67
   System.Data.Common.DbProviderFactories.GetFactory(String providerInvariantName) +18
   Vevo.DataAccessLib.DataAccessHelper.GetProviderFactory() in C:\vevocart\VevoCart_Pro_Advanced_301\CommonLib\DataAccessLib\DataAccessHelper.cs:127
   Vevo.DataAccessLib.DataAccess..cctor() in C:\vevocart\VevoCart_Pro_Advanced_301\CommonLib\DataAccessLib\DataAccess.cs:399


 

0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question