Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2009-04-09
2
Medium Priority
?
520 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 1000 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

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

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

Today is the age of broadband.  More and more people are going this route determined to experience the web and it’s multitude of services as quickly and painlessly as possible. Coupled with the move to broadband, people are experiencing the web via …
We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…

715 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