Solved

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

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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

747 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

12 Experts available now in Live!

Get 1:1 Help Now