Hello. I've recently inherited a database driven e-commerce site written in C# ASP.Net, with an MS SQL database. I have had little or no experience with this exact type of application up to this point, although I am comfortable exploring code, and am familiar with SQL query structure and C# (and web mark-up languages too). So far I've been able to make all the adjustments I've wanted to to the application, have debugged some stuff, removed some compiler errors, added a few new simple functions, and am enjoying myself rather.
I am experiencing some problems with displaying the information from the database within Visual Web Developer 2008 Express Edition. Having faced initial setup problems with the web.config file I'm a little wary about the next steps to take!
I currently have a local copy of web.config, which connects to a local copy of the database during development. When I compile and upload any new versions of the application, I exclude the local version of web.config, so that the remote version uses it's own web.config file to connect to the remote database.
In order to see any of the database information on the web pages during development , I have to run the website in the browser. Should I be able to see this info in Design View in VS by creating a connection to the database in the database explorer? Will this affect the application when it is running remotely on the webserver? (as the connection would have been made to the local database and not the remote one, and hence the connection string would be different) All of the DataGrids are blank in VS design view. If I choose a Data Source for them using the Smart Tags in design view, will they use the right Data Source when running remotely? Should I drop the local copy of the database altogether? Connecting to the remote database during development seems rather dangerous to me!
I hope this is clear, any and all help/links/pointers welcome!
-
http://stackoverflow.com/questions/305447/using-different-web-config-in-development-and-production-environment to learn how you can use different configs
Also check Scott's tip, http://weblogs.asp.net/scottgu/archive/2007/09/21/tip-trick-automating-dev-qa-staging-and-production-web-config-settings-with-vs-2005.aspx (Not sure if it applies to Visual Web Developer)
0 comments:
Post a Comment