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.

Majid KamaliPosted Jul 23, 2011, 5:08 AM
//***************************************************
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:
//***************************************************
//***************************************************
Jiteendra SampathiraoPosted Jul 23, 2011, 5:04 AM
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........
Jiteendra SampathiraoPosted Jul 23, 2011, 4:58 AM
Majid KamaliPosted Jul 23, 2011, 3:30 AM
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.
Praveen kumar RavindranPosted Jul 23, 2011, 3:16 AM
First of all u verify the connection string is correct or not and then
u go to web config file and check the connections