Good Morning; My question regarding my database concerns VS 2010 & ASP.Net. Recently I have been uploading my web site by using both webmatrix &/or VS 2010. If I upload my website via webmatrix, the site works completely. There is however a problem with uploading my site this way. When I do this, my entire site is automatically put in a myapp folder and so the site can only be viewed by typing www......com/myapp/.... Unlike webmatrix, VS2010 publishing option fixes this issue and allows the requesting user to type www.......com and the site comes up just fine. However, there is a problem being that the database cannot be found. After doing some research on your site, I found a correction code at http://support.Winhost.com/KB/a833/how-to-connect-to-mysql-with-aspnet.aspx. It is this code that I have questions about. Understanding that it gives no instructions on where to place this code amd considering that I am a novice when it comes to programming lingo. I am unsure what to do with it. At first assumption, I attempted to place this code in the designated master page with the imports statement residing under the page definition and the script tag under the html tag but it threw a ton of errors; mainly on all the mysqlconnections. I also try to move this to the designated page or pages rather and received the same errors. I realize that I need to input my Winhost database data. I also realize that until this is done, these errors might not go away but what I am asking is specifically where I place this code on my page/pages?
You can deploy the app to the root of your site using webmatrix by specifying the path to '/' that way it's accessible directly with www...com And the location for the code in the article is in every page that makes a call to the MySQL page within <body> tag