Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 4 > BOOK: Beginning ASP.NET 4 : in C# and VB
BOOK: Beginning ASP.NET 4 : in C# and VB
This is the forum to discuss the Wrox book Beginning ASP.NET 4: in C# and VB by Imar Spaanjaars; ISBN: 9780470502211
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 4 : in C# and VB section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old January 27th, 2012, 01:39 PM
Registered User
Join Date: Sep 2011
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default System.ArgumentException: Keyword not supported: 'provider'.


I'm new to ASP.NET but I am an intermediate Java Web-developer.

Currently, I am trying to use Oracle database for a Web application inside .NET framework. Between this book and its cousin Professional one, I hope to find some quick help as what I need to add to my Web.config or how to configure my laptop so that .NET will see tables/views/etc. from a remote Oracle DB. I would appreciate any pointer to my issue.

Thank you in advance for your help.

In my Web.config, I have this line in the connectionStrings collection element:
<add name="IMCX" connectionString="Provider=MSDAORA;Data Source=imacs_imcx;Persist Security Info=True;Password=<I-put-my-password-here>;User ID=<I-put-my-Oracle-logon-ID-here>" providerName="System.Data.OleDb" />

In my C# code:
SqlConnection DBCon;
DBCon.ConnectionString = ConfigurationManager.ConnectionStrings["IMCX"].ConnectionString;

Here is the stacktrace
Keyword not supported: 'provider'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.ArgumentException: Keyword not supported: 'provider'.

Source Error:

Line 29: System.Threading.WaitHandle[] WHandles = new System.Threading.WaitHandle[2];
Line 30: DBCon = new SqlConnection();
Line 31: DBCon.ConnectionString = ConfigurationManager.ConnectionStrings["IMCX"].ConnectionString;
Line 32: UsersCommand.CommandText = "SELECT VUSER FROM WDS49.KWRD_TABLE WHERE GROUP_PASS like '"
Line 33: + profile.ToUpper()

Source File: c:\Users\...\Documents\Visual Studio 2010\WebSites\Gina2\kwrd.aspx.cs Line: 31

Stack Trace:

[ArgumentException: Keyword not supported: 'provider'.]
System.Data.Common.DbConnectionOptions.ParseIntern al(Hashtable parsetable, String connectionString, Boolean buildChain, Hashtable synonyms, Boolean firstKey) +5096356
System.Data.Common.DbConnectionOptions..ctor(Strin g connectionString, Hashtable synonyms, Boolean useOdbcRules) +98
System.Data.SqlClient.SqlConnectionString..ctor(St ring connectionString) +64
System.Data.SqlClient.SqlConnectionFactory.CreateC onnectionOptions(String connectionString, DbConnectionOptions previous) +24
System.Data.ProviderBase.DbConnectionFactory.GetCo nnectionPoolGroup(String connectionString, DbConnectionPoolGroupOptions poolOptions, DbConnectionOptions& userConnectionOptions) +150
System.Data.SqlClient.SqlConnection.ConnectionStri ng_Set(String value) +59
System.Data.SqlClient.SqlConnection.set_Connection String(String value) +4
kwrd.GetKeywordProfile(String profile) in c:\Users\...\Documents\Visual Studio 2010\WebSites\Gina2\kwrd.aspx.cs:31
kwrd.Page_Load(Object sender, EventArgs e) in c:\Users\...\Documents\Visual Studio 2010\WebSites\Gina2\kwrd.aspx.cs:18
System.Web.Util.CalliHelper.EventArgFunctionCaller (IntPtr fp, Object o, Object t, EventArgs e) +14
System.Web.Util.CalliEventHandlerDelegateProxy.Cal lback(Object sender, EventArgs e) +35
System.Web.UI.Control.OnLoad(EventArgs e) +91
System.Web.UI.Control.LoadRecursive() +74
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2207

Last edited by Flyby09; January 27th, 2012 at 01:48 PM..
Old January 28th, 2012, 03:38 PM
Imar's Avatar
Wrox Author
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts

Hi there,

Since this is not related to my book, please post this in a more general ASP.NET category from this list: http://p2p.wrox.com/asp-net-4-539/

That said, a SqlConnection is usd to connect to SQL Server, not Oracle. .NET used to ship with a provoider for Oracle but it's now obsolete. I think Oracle has their own provider now. Maybe this helps: http://www.oracle.com/technetwork/to...ex-085163.html but I am not sure what to recommend. It's been a while since I worked with Oracle.


Imar Spaanjaars
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
Old January 28th, 2012, 09:34 PM
Registered User
Join Date: Sep 2011
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts

Thank you, Irma, for responding to my question.
In the Professional ASP.NET 4 in C# and VB, there is a Highlighted area pointing to the Oracle Universal provider in Chapter 8, which I downloaded and installed. It is pity that the code sample reverses back to using SQLServer instead of continuing a bit more to a complete example of how accessing Oracle DB is possible. Nonetheless, thank you for giving me additional pointers.

Similar Threads
Thread Thread Starter Forum Replies Last Post
ProfileCommon not Supported Chris_Alis BOOK: Professional ASP.NET 4 : in C# and VB 2 September 26th, 2011 02:15 PM
Supported Display Modes flashmanTom ASP.NET 2.0 Professional 1 July 20th, 2011 10:00 PM
Is this book still supported? JasonRawlins BOOK: ASP.NET AJAX Programmer's Reference : with ASP.NET 2.0 or ASP.NET 3.5 ISBN: 978-0-470-10998-4 1 April 1st, 2009 08:56 PM
System.ArgumentException: Invalid Xml salloo XSLT 2 July 25th, 2007 04:43 AM
Keyword not supported: 'provider'. bam1934 ASP.NET 1.0 and 1.1 Basics 1 May 27th, 2005 12:01 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.