c# connection string
Hi guys im new to c#.net and developed a website using vs2010, i used the built in feature logincontrol and my website worked perfectly connecting to the database and the logincontrol worked. But as soon as i uploaded it it will not connect to the database!!! i have wasted weeks and need some help please. my site is itcav.com
stephen cavanaghPosted Jul 30, 2013, 3:32 PM
locally the first connection string worked perfect, I now tested both connection strings on the somee server and it will not connect, do you know if the connection string would connect to the database with this code or do I need to change something before its been uploaded?
i like the loginview and AnonymousTemplates and these worked perfect for my application but when uploaded it does not work at all?
is there anyway you can make logincontrol work linking to anydatabase on a server using a connectionstring and if so can you explain how and include the code please?
Steve
Iftikar HussainPosted Jul 30, 2013, 12:49 AM
Regards,
Iftikar
stephen cavanaghPosted Jul 29, 2013, 4:36 PM
the error i get is this ...
Server Error in '/' Application.
Runtime Error
Description: An exception occurred while processing your request. Additionally, another exception occurred while executing the custom error page for the first exception. The request has been terminated.i had to create a database on itcav.somee.com so i named it "Needtoattach" then i attached my database .mdb sucessfully
somee gave me a connection string below but i have taken out the username and password on here for security!...
workstationid=Needtoattach.mssql.somee.com;packetsize=4096;userid=**********;pwd=**********;datasource=Needtoattach.mssql.somee.com;persistsecurity info=False;initialcatalog=Needtoattach
so my web config file used to be .....
AND NOW IT IS
Both do not work and I have no idea what to do now :(
Iftikar HussainPosted Jul 28, 2013, 11:46 PM
Regards,
Iftikar
stephen cavanaghPosted Jul 28, 2013, 5:45 PM
I was getting an unhandled exception with lots of writing and i am assuming that its a. the connection string, b. the server or c. the database.
I uploaded the site from visual studio 2010 to somee.com
The site connected to the database fine before uploading
Then when i uploaded the .mdb I created an App_Data folder on the server and placed the .mdb in there assuming the connection string would work, then after testing i recieved the unhandled exception error.
I then found out that i needed to link my .mdb to the server database as a child? or create a sql database already on the server (i dont know how) and configure a new connection string.
Hope your not as confused as I am and that this is easy to fix !!!
Thanks for replying so soon also.
Iftikar HussainPosted Jul 28, 2013, 2:02 AM
what error message you are getting after uploading the site to the server? Can you provide more details?
Regards,
Iftikar