DSN less connection using Web.config file

Hi

I have added name value pair for connection string in the Web.config file as shown below.
<appSettings>
<add key="EventCM_Database" value="Provier=Microsoft.Jet.OLEDB.4.0; Ole DB Services=-4; Data Source=E:\web\keydynamics\htdocs\_database\db.mdb" />
</appSettings>
On my local environment if works file when the file is located within c:\Inetpub\wwwroot\Applicationname\ directory

I attempt to access the database in the following manner and it works on my local environment.
Dim dbConnection As System.Data.IDbConnection = New System.Data.OleDb.OleDbConnection(ConfigurationSettings.AppSettings("EventCM_Database"))
however I get an error when I use the same files at my ISP. This is the error message
An OLE DB Provider was not specified in the ConnectionString. An example would be, 'Provider=SQLOLEDB;'.
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: An OLE DB Provider was not specified in the ConnectionString. An example would be, 'Provider=SQLOLEDB;'.
I am not understanding to why the application complaints about OLEDB provider when I am already including it.
Thank you,
0
nkrishna
6/29/2004 4:19:22 PM
asp.net.access-datasource 4679 articles. 0 followers. Follow

1 Replies
726 Views

Similar Articles

[PageSpeed] 15

Actually I found an answer to my question. It was a SIMPLE typo on my part where I had spelled PROVIDER incorrectly as Provier. This was in WEB.CONFIG file. I fixed this typo and my application works like a charm. 

I am certanily interested in knowing if I can use Server.MapPath in Web.config file. For now, I hacked to find the physical path name, but I am worried about long term if my ISP change/move my site to a different physical path.
Please share your comments
Thank you
0
nkrishna
6/29/2004 6:50:05 PM
Reply:

Similar Artilces:

Why we use Web.Config File for connection string wether we can use class Library for get connection for whole web Application
 Why we use Web.Config File for connection string wether we can use class Library for get connection for whole web Application  please help me? Friend, Web.config has its own advantages. 1) Web.Config is used to store the important information like connections strings etc...so that it can be modified even after the code has been    deployed to the server without compiling the entire application again. 2) Since it is a XML file, there is no need of building the project of you are going to change the connection strings.   If you go for the class files,...

How to use DSN in connection string in web config file?
Hi I need to use a DSN in web config file but I dont know how to use it. My Web Hosting company limite the database file( access) must be placed in a specified folder (DATA). and use DSN to establish the connection. The DSN files is: africaDSB.dsn [ODBC] DriverId=25 ReadOnly=0 FIL=MS Access DBQ=\data\africa Thanks Hi hotjava, Try this for file DSN: FILEDSN=c:\myData.dsn;Uid=myUsername;Pwd=;NOTE:If you find my response contains a reference to a third party World Wide Web site, I am providing this information as a convenience to you.Microsoft does not control these sites and...

Web App connecting to database using web.config file
I am using the web.config file to store my database connection string. Everything was working fine when I was running to applicaiton on my local machine. However, when I deployed to the web I keep on getting this error: System.Data.SqlClient.SqlException: Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'. at System.Data.SqlClient.ConnectionPool.GetConnection(Boolean& isInTransaction) at System.Data.SqlClient.SqlConnectionPoolManager.GetPooledConnection(SqlConnectionString options, Boolean& isInTransaction) at System.Data.SqlClient.SqlConnection.Open() at Dev_verI.Basi...

Connection string with web.config file (MS Access database file)
Hi,I have a ms access file int he App_Data ditrectory of my solution explorer the file is of course in the inetpub/wwwroot/form directory (a solution i created to test this...Anyways I need help creating an access connection string.  I have one currently working for sqlserver 2005 in that file...So I want to add a new one and have lots of strings in one file to chose from...I can't find any good examples online and need a little help constructing the connection string.Thanks,Frank  Seek no more.  Bookmark this page: www.connectionstrings.com Regards Mike [MVP - ASP/ASP....

Use a Name/value in Machine.config file in the web.config file
Hello. I want/need to access a variable in the machine.config file and use it in the web.config file. My scenario is: Each machine has a machine name, so (I assume this is the best place to put it) I want to create a variable in <appsettings> in the machine.config file called "MachineName".  In my web.config file, I want to use the MachineName variable in the machine.config in the appsettings.   Example: (web.config file)  ... <appSettings> <add key="ServerFileNames" value=\\ISCO1FEGRD\Dotnet_files\OrclIntlList.xml /> Replace the ...

datasource as MS ACCESS and Web.config connection
According to this: I am wondering whether you can Datasource as MS ACCESS and connection string in the web.config since I plan to use the feature datamemberkey of  datasource . See SQL example for below link. http://weblogs.asp.net/owscott/archive/2005/08/26/using-connection-strings-from-web.config-in-asp.net-v2.0.aspx   Thx.    You can use the connection string for Access. Here is a site that helps me out when looking for connection strings.http://www.connectionstrings.com/ Just keep in mind for Access you have to use the OleDb provider. _____________________...

I want to access web.config file using DLL
Hi all, I want to access web.config file using DLL, Means I create class file in other project and in that class file I want to access the web.config which is part of web application Thanks, VikramThanks,Vikramsinh Patil. See if the WebConfigurationManager.OpenWebConfiguration method will do it for you.C# <---> VB.Net Translator ConfigurationManager.AppSettings will refer to your web.config file automatically when you add the class library to your web application."Object reference not set to an instance of an object"   no errorbin folder n evden eve...

Accessing web.config connection setting in VS.NET
Hi, I've been running several of the ASP.NET database access walkthroughs in VS.NET. In these walkthroughs the SqlConnection object's ConnectionString property is set manually in the Properties window of VS.NET. After successfully completing one application I decided to move my sql connection string into the web.config file. I then updated the code to use this new setting: this.sqlConnection1.ConnectionString = ConfigurationSettings.AppSettings["connString"]; I made this edit in the "Web Form Designer generated code" portion of the code behind file. The res...

how to store the connection string in the web.config file and use it from frontend?
I have a requirement like i have to store the connection string in the webconfig file instead of using again on each aspx page.How can i do it? hi    Check this  Web.config <?xml version="1.0" encoding="utf-8" ?> <!-- Web.Config Configuration File --> <configuration>   <appSettings>     <add key="ConnectionString"       value="server=localhost;database=Northwind;uid=sa;password=secret;" />   </appSettings> &nbs...

Using web.config Connection strings in Code Behind Files
in asp usually i have code behind files those .aspx.vb file.can i make use of connection strings in there? i am not really familiar with connection strings. actually shouldn't code behind files "simulate" code being in the .aspx file themselves? i seem to not able to share variables between them?  They can be accessed via System.ConfigurationManager.ConnectionStrings["YourConnectionStringName"].ConnectionString. If I remember right, you should surround the access to these with an "if (!DesignMode)", because for some reason they won't be loaded by...

save ms access connection string to web.config file
is it possible? if not what are my options in creating a sort of global declaration for my access connection string so i could use anytime... thanks Yes, this can be done but you have to specify the path for the ms access either in the web.config or using the server.mappath in your code. RegardsASP.NET Hosting (HostingFest)...

Relative path in Web config file for connecting Access.MDB
 <add key ="ConnectionString" value ="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\\Projects\\HomePage\\App_Data\\Home.mdb;Persist Security Info=True"/> -->This above code worksBut when i change it to <add key ="ConnectionString" value ="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=.\ .\ .\FabHome.mdb;Persist Security Info=True"/> --> It gives lot of connection errors like, cann't find in " Ms visual studio\common\fabHome.mdb "vin.joe to use path like this, you have to enable Parent Path for the domain.You...

Connect Remote server MS Access DB with .Net using DSN
 Hi,Connect Remote server MS Access DB with .Net using DSN .My code is: String ss = "Provider=MS Remote;Remote Server=http://serverName:1433; Remote Provider=Microsoft.Jet.OLEDB.4.0;DSN=Test;";                   OdbcConnection con = new OdbcConnection(ss);        con.Open();        Response.Write("Connected");when i try to access, i am getting the following error ERROR [IM002] [Microsoft][ODBC Driver Mana...

After migration from .Net 1.1 to .Net 3.5 do I have to incorporate new web.config settings in old *.config file
Hi,I have successfully migrated web application from .Net 1.1 to .Net 3.5. Could you let me know whether I have to incorporate setting in new web.config (this new web.config file was generated automatically due to migration) into old *.config file?FYI: Old *.config file contains all application level settings required. So I will continue to use old.config file by removing new web.config file. Settings which are in new web.config file are:<configSections><sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup,...

Web resources about - DSN less connection using Web.config file - asp.net.access-datasource

Connection - Wikipedia, the free encyclopedia
Text is available under the Creative Commons Attribution-ShareAlike License ;additional terms may apply. By using this site, you agree to the ...

iMedia Connection: Interactive Marketing News, Features, Podcasts and Video - iMediaConnection.com
If you send more email, you might make more money. Then again, you might destroy your reputation and revenue stream. Here's how to know what ...

HTTP persistent connection - Wikipedia, the free encyclopedia
... tacked on to an existing protocol. If the browser supports keep-alive, it adds an additional header to the request: Following this, the connection ...

MOTHER’S DAY: Facebook Examines Connections Between Moms, Kids
With Mother’s Day on the calendar this coming Sunday, Facebook examined the relationships between mothers and their children on the social network, ...

Kings Cross identities arrested in connection with murder
Two Kings Cross identities&nbsp;have been arrested in connection with the murder of a man at Sydney hotel.

Governor declares state of emergency in connection with California methane leak
... of Emergency Services) On Wednesday evening, California Governor Jerry Brown declared a state of emergency in Los Angeles County in connection ...

Miss Golden Globe role 
requires showbiz connections
One constant about the Golden Globes (tonight at 8 on WHDH, Ch.

Tons Of Methane Are Spewing Out Of California, And There’s A Connection To The Governor
The out of control leak has forced thousands of residents to flee their homes. Gov. Brown's sister is a paid board member at the company that ...

Toyota and Kymeta rely on satellites to power this Mirai's data connection
They're hoping to achieve gigabit wireless speeds within the next few years.

Test Claims To Show T-Mobile’s YouTube “Optimization” Is Just Connection Throttling
... on the same network, and at the same time of day. They tested video streaming against three other kinds of downloads and measured the connection ...

Resources last updated: 1/13/2016 9:19:07 PM