Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 4 > BOOK: Beginning ASP.NET 4 : in C# and VB
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old January 27th, 2012, 12:39 PM
Registered User
Points: 39, Level: 1
Points: 39, Level: 1 Points: 39, Level: 1 Points: 39, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Sep 2011
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default System.ArgumentException: Keyword not supported: 'provider'.

Hi,

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 12:48 PM.
Reply With Quote
  #2 (permalink)  
Old January 28th, 2012, 02:38 PM
Imar's Avatar
Wrox Author
Points: 71,768, Level: 100
Points: 71,768, Level: 100 Points: 71,768, Level: 100 Points: 71,768, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,033
Thanks: 80
Thanked 1,582 Times in 1,559 Posts
Default

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.

Cheers,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
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!
Reply With Quote
  #3 (permalink)  
Old January 28th, 2012, 08:34 PM
Registered User
Points: 39, Level: 1
Points: 39, Level: 1 Points: 39, Level: 1 Points: 39, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Sep 2011
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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.
Regards.
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

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



All times are GMT -4. The time now is 07:46 AM.


Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.