Solved

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

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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
jquery datatables, asp.net MVC 9 51
Getting error in connectionstring with Excel. 30 45
Convert Select to DropDownListFor MVC 5 2 30
exporting html table data 4 28
Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

828 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