View Full Version : WSAT tables for login, creating accounts
jat465
07-15-2008, 07:52 AM
I developed website in Visual Web Developer 2008 Express Edition. I used the built-in security functions in Web Site Application Tool which adds several data tables for users, membership, etc.. I placed my application data tables in the same database with these security related tables, so I would have only one database. I deployed the website to discountasp.net. The application functionality thatuses only the applicationdata tables, and not WSAT security datatables,works fine. However, when I try to login to my website as a user or create an account I get the error message below.
Error Message:
Exception Details: System.Data.SqlClient.SqlE<WBR>xception: An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Shared Memory Provider, error: 40 - Could not open a connection to SQL Server)
Thanks,
Joe
wisemx
07-15-2008, 08:41 AM
Hi Joe,
Do you have a SQL Server addon for your DASP account?
If so, did you create the membership ASP.NET security features on that DB?
Or are you possibly working with the Express DB?
In any event, I'll help you you get through this.http://community.discountasp.net/emoticons/wink.gif
Salute,
Mark
jat465
07-15-2008, 09:15 AM
I do have the SQL Server addon
I created the membership ASP.NET security features with the associated data tables in an .mdf databasein VWD Express Edition. I then used the Attach Data File tool in the SQL Tools Suiteto attach the .mdf database to my SQL 2005 database.
Joe
wisemx
07-15-2008, 10:49 AM
OK...Post the connections section of your root web.config, comment out the password.
This is usually the final step in resolving these errors.
Salute,
Mark
PS - If you're sure you have the connection strings correct you can compare the schemas with this new tool:
SQLToolbox is a Schema Comparator for SQLServer 2005.
Supported features:
* Compares schema's of 2 databases on a SQL2005 server
* SQL 2000 is supposed to work too (untested).
* Shows the different and equal objects in both databases, and scripts to create them (in windiff style).
Pre-requirements
You'll need the .NET framework 3.5 to run this application.
MSSQL Server 2005 all editions (including express)
http://www.codeplex.com/SQLToolbox/Release/ProjectReleases.aspx?ReleaseId=12137
Post Edited (wisemx) : 7/15/2008 11:32:56 PM GMT
jat465
07-16-2008, 01:33 AM
Here is the connections portion of the web.config file. I use the LocalConnectionString to develop the site on my machine, then use the SQL tool in my control panel to attach it to the DASP SQL2005 database.
<connectionStrings>
<add name="SQL2005_503839_gamevidenceConnectionString2" connectionString="Data Source=tcp:sql2k511.discountasp.net;Initial Catalog=SQL2005_503839_gamevidence;User ID=SQL2005_503839_gamevidence_user;Password=xxxxxx xxxxx"
providerName="System.Data.SqlClient" />
<add name="LocalConnectionString" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirector y|\ASPNETDB.MDF;Integrated Security=True;User Instance=True"
providerName="System.Data.SqlClient" />
</connectionStrings>
Thank you,
Joe
jat465
07-16-2008, 04:53 AM
Thank you. Your solution resolved the issue.
Joe
wisemx
07-16-2008, 12:15 PM
Try your remote connection string exactly like this:
[quote]
<connectionStrings>
<clear/>
<remove name="LocalSqlServer"/>
<add name="LocalSqlServer" connectionString="Data Source=tcp:sql2k511.discountasp.net;Initial Catalog=SQL2005_503839_gamevidence;User ID=SQL2005_503839_gamevidence_user;Password=****** *;" providerName="System.Data.SqlClient"/>
<remove name="SQL2005_503839_gamevidenceConnectionString2"/>
<add name="SQL2005_503839_gamevidenceConnectionString2" connectionString="Data Source=tcp:sql2k511.discountasp.net;Initial Catalog=SQL2005_503839_gamevidence;User ID=SQL2005_503839_gamevidence_user;Password=****** *;" providerName="System.Data.SqlClient"/>
</connectionStrings></CODE>
Replace your password of course but everything else exactly like that.
Salute,
Mark
wisemx
07-17-2008, 02:19 AM
Good job Joe. http://community.discountasp.net/emoticons/wink.gif
vBulletin® ©Jelsoft Enterprises Ltd.