I have a SQL server database in my App_Data folder and I can connect it via my site on localhost, but when I upload my site to host, it does not respond to request.
Actually, I created an ajax page and a HttpHandler to manage ajax requests. It works fine on my computer but does not word on host.
What's the problem?
* host supports my asp.net and sql server version.


Praveen kumar Ravindran4 reputationPosted Jul 22, 2011, 11:16 PM EDT
First of all u verify the connection string is correct or not and then
u go to web config file and check the connections
Majid KamaliRank #6,453 · 266 reputationPosted Jul 22, 2011, 11:30 PM EDT
I used |DataDirectory| instead of App_Data in connection string, but did not work again.
Should I change Data Source or Connection string?
I think connection string is right (at least AttachedDbFileName section) because, I created that database via visual studio and copy that connection string into my program.
Jiteendra SampathiraoRank #585 · 4.1K reputationPosted Jul 23, 2011, 12:58 AM EDT
Jiteendra SampathiraoRank #585 · 4.1K reputationPosted Jul 23, 2011, 1:04 AM EDT
store the connection string in app settings as
use it in ur page like
SqlConnection ssqlconn = new SqlConnection(configurationmanaget.appsettings['sqlserver"].Tostring());
hope it help you........
Majid KamaliRank #6,453 · 266 reputationPosted Jul 23, 2011, 1:08 AM EDT
//***************************************************
if(obj.selectedIndex == 1)
xmlhttp.open("GET", "kadr.gmdfdb", true);
else if(obj.selectedIndex == 2)
xmlhttp.open("GET", "cls1.gmdfdb", true);
else if(obj.selectedIndex == 3)
xmlhttp.open("GET", "cls2.gmdfdb", true);
else if(obj.selectedIndex == 4)
xmlhttp.open("GET", "cls3.gmdfdb", true);
else if(obj.selectedIndex == 5)
xmlhttp.open("GET", "cls4.gmdfdb", true);
xmlhttp.send();
//***************************************************
* obj is a HTML select element.
As you can see files have strange format. I created a HttpHandler to create proper response correspond to each file name with this file format. Web.Config for HttpHandler:
//***************************************************
//***************************************************