Solved

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

Posted on 2009-04-09
2
475 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
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Both in life and business – not all partnerships are created equal. As the demand for cloud services increases, so do the number of self-proclaimed cloud partners. Asking the right questions up front in the partnership, will enable both parties …

911 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now