How can my hosted asp.net website access my local machine database
-
Hello experts, I have a asp.net website with c# as behind file code and also a win form app. I would like to ask, how can my asp.net website get the database records of my win form app in my local machine? I'm able to receive the database records coming from my website to my win form app here at my local machine using web service but sending my database records to my website is confusing me. Any help is kindly appreciated. Thanks, DAN
-
Hello experts, I have a asp.net website with c# as behind file code and also a win form app. I would like to ask, how can my asp.net website get the database records of my win form app in my local machine? I'm able to receive the database records coming from my website to my win form app here at my local machine using web service but sending my database records to my website is confusing me. Any help is kindly appreciated. Thanks, DAN
one normally stores the database and the web site on the same machine (or machine cluster). That is why the typical web host will offer PHP+MySQL facilities, or ASP.NET+SQLServer, or whatever combination makes sense to the market. :)
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.
-
one normally stores the database and the web site on the same machine (or machine cluster). That is why the typical web host will offer PHP+MySQL facilities, or ASP.NET+SQLServer, or whatever combination makes sense to the market. :)
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.
Hello, Thanks for the reply. Seems my last resort is to really host my own website to my local machine.
-
Hello, Thanks for the reply. Seems my last resort is to really host my own website to my local machine.
I trust there are ways to keep site and database apart, however I see lots of disadvantages. Why can't you have a database where your site is? If that really is the case, I would consider switching web hosts. Having your own host is a pain, you need to provide hardware and software, have a fixed IP address and sufficient bandwidth, probably organize redundancy for reliability, organize backups, maybe a help desk, etc. There are thousands of web hosts all around the world, and a lot of them are free. Use Google to find out, this[^] is just one I stumbled upon. BTW: you probably are best served by a host you pay for the service. My site is hosted here[^], for some 80 euro a year. :)
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.
-
Hello experts, I have a asp.net website with c# as behind file code and also a win form app. I would like to ask, how can my asp.net website get the database records of my win form app in my local machine? I'm able to receive the database records coming from my website to my win form app here at my local machine using web service but sending my database records to my website is confusing me. Any help is kindly appreciated. Thanks, DAN
It is actually entirely possible to do what you are trying to do. Most large companies do not host the database and the web server on the same physical server. It is best practice to have them at the same location so they can be on the fastest possible network however. First make sure you have a static IP Address where you wish to host your SQL server (you can also look at a dynamic IP solution more complex though) Open the port for your chosen SQL software Have you web service connect to the SQL server using the static IP Address from above. I have done this before, several times, and results vary. You almost always want a very fast connection to your database, usually on the same LAN, sometimes it doesn't matter. You'll find out pretty quick.
The best way to accelerate a Macintosh is at 9.8m/sec² - Marcus Dolengo
-
I trust there are ways to keep site and database apart, however I see lots of disadvantages. Why can't you have a database where your site is? If that really is the case, I would consider switching web hosts. Having your own host is a pain, you need to provide hardware and software, have a fixed IP address and sufficient bandwidth, probably organize redundancy for reliability, organize backups, maybe a help desk, etc. There are thousands of web hosts all around the world, and a lot of them are free. Use Google to find out, this[^] is just one I stumbled upon. BTW: you probably are best served by a host you pay for the service. My site is hosted here[^], for some 80 euro a year. :)
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.
Hello, My reason to connect my website to my local database is to sync the two database from my local machine database and the database I upload also from the site. I can get some database records coming from my website and use the records to update my back end program using web service of asp but a big problem came that my back end program could not sent its database records to my website :( By the way my website was a simple online registration for school and the back end program is the offline part its a school project of mine and kinda cramming because few months left before the deadline. Thanks also for the link on the free hosting site I might give it a try. Thanks, DAN
-
It is actually entirely possible to do what you are trying to do. Most large companies do not host the database and the web server on the same physical server. It is best practice to have them at the same location so they can be on the fastest possible network however. First make sure you have a static IP Address where you wish to host your SQL server (you can also look at a dynamic IP solution more complex though) Open the port for your chosen SQL software Have you web service connect to the SQL server using the static IP Address from above. I have done this before, several times, and results vary. You almost always want a very fast connection to your database, usually on the same LAN, sometimes it doesn't matter. You'll find out pretty quick.
The best way to accelerate a Macintosh is at 9.8m/sec² - Marcus Dolengo
Hello, Thanks for the great info. Would you mine if you could give me some a little help or info on how can my asp.net web service connect to the static IP where my SQL server is located. Kinda Google it almost everyday but still don't find some way on how to do it. Thanks, DAN
-
Hello, My reason to connect my website to my local database is to sync the two database from my local machine database and the database I upload also from the site. I can get some database records coming from my website and use the records to update my back end program using web service of asp but a big problem came that my back end program could not sent its database records to my website :( By the way my website was a simple online registration for school and the back end program is the offline part its a school project of mine and kinda cramming because few months left before the deadline. Thanks also for the link on the free hosting site I might give it a try. Thanks, DAN
OK, you want a remote backup. This is what I do manually: - I have a local database on my dev machine, and a similar one at ny web host; - I transfer tables (never the entire DB), from one to the other using PHPMyAdmin; "export" creates a text file, filled with SQL commands that could delete and recreate an entire table; "import" would execute such file, hence dropping the existing and creating the replacement table. Of course there could be very good reasons to automate this. Haven't done that yet. :)
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.
-
OK, you want a remote backup. This is what I do manually: - I have a local database on my dev machine, and a similar one at ny web host; - I transfer tables (never the entire DB), from one to the other using PHPMyAdmin; "export" creates a text file, filled with SQL commands that could delete and recreate an entire table; "import" would execute such file, hence dropping the existing and creating the replacement table. Of course there could be very good reasons to automate this. Haven't done that yet. :)
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.
Hello, Thanks again for that great help, would you mine if you could show how will I do that using asp Thanks again, DAN
-
Hello, Thanks again for that great help, would you mine if you could show how will I do that using asp Thanks again, DAN
Sorry, I don't know for ASP and SQLServer, I do it with PHPMyAdmin which is for PHP+MySQL. :)
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.
-
Sorry, I don't know for ASP and SQLServer, I do it with PHPMyAdmin which is for PHP+MySQL. :)
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.
Hello, Thanks still for the great idea. I will try and hope I can do it with asp using the idea you give me. :) Thanks, DAN