This is a discussion on "Database connectivity from ASP.NET pages hosted on a free web server?" within the ASP.NET Forum section. This forum, and the thread "Database connectivity from ASP.NET pages hosted on a free web server? are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
Database connectivity from ASP.NET pages hosted on a free web server?
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|||
|
Database connectivity from ASP.NET pages hosted on a free web server?
Hi I am new to these forums and was hoping that somebody could help me out with a problem I have come across.
I have built an ASP.NET website with C# coding which queeries an Access database. I have tested it thoroughly on the web matrix test server and the functionality is all working. I now want to upload the pages to an online webserver so that they can be accessed from any computer. I am trying to find out whether the only changes I need to make are in the connection string in the web.config file; or if I need to do something else. Here is my web.config file: <?xml version="1.0" encoding="utf-8" ?> <configuration> <appSettings> <add key="ConnectionString" value="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\\Assignment\\magazine.mdb" /> </appSettings> </configuration> If it is just a case of changing the ConnectionString then please could someone advise me on the changes I have to make. Any suggestions are welcome. I have looked at a lot of Googled ASP.NET help sites and have found myself going round in circles for hours and not getting a solution. Many thanks Jon |
|
|
|
|||
|
Re: Database connectivity from ASP.NET pages hosted on a free web server?
i dont really understand the question - but from what i gather, your your moving your pages and database to a server somwhere, not your local machine?
in that case would you need to change the connection string to server.mappath .... for example, :
Last edited by benbramz; Nov 28th, 2005 at 20:39. |
|
|||
|
Re: Database connectivity from ASP.NET pages hosted on a free web server?
You need to know the full path to your database when it is on your live website, the easiest way to do this is to create a simple .asp page, insert the following code, and upload it:
e:\sites\domain.com\web\ This is the path you'll need to use in your Web.Config file, for example: <add key="ConnectionString" value="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=e:\sites\domain.com\web\magazine.mdb" /> |
|
|||
|
Re: Database connectivity from ASP.NET pages hosted on a free web server?
Thanks BenBramz and Smokie for the replies.
I have sorted the problem now. Many thanks to Smokie who I wrongly read his advice and made a simple .aspx page instead of a simple .asp page. It is sorted now: many thanks. Jon Last edited by JKidd32; Dec 5th, 2005 at 12:17. |
![]() |
| Tags |
| database, connectivity, aspnet, pages, hosted, free, web, server |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| 24/7 connectivity? | goldy | Webforumz Cafe | 18 | Sep 9th, 2007 17:59 |
| XML Code for transfering data from one SQL Server Database to another database | plolla | Other Programming Languages | 1 | Aug 3rd, 2006 18:37 |
| Excel to SQL Server database | madhuri.t | Classic ASP | 7 | Jun 15th, 2006 20:45 |
| Uploading Access Database and ASP Pages | dinahdoey | Classic ASP | 4 | Sep 6th, 2004 20:45 |