Groups | Blog | Home
all groups > dotnet general > january 2008 >

dotnet general : asp:Login question


ChiWhiteSox
1/28/2008 4:31:01 PM
Hi

created a web app using the asp:Login component in machine A. SQL and VS2005
is also in machine A. I copied the entire project source to machine B and
modified
the machine B's web.config into

<connectionStrings>
<remove name="LocalSqlServer"/>
<add name="SQLConn" connectionString="data source=machineA;Initial
Catalog=automobile;User ID=sa;Password=secret"
providerName="System.Data.SqlClient"/>
</connectionStrings>

after runnning the project at machine B and logging in, i get this sql error:


[SqlException (0x80131904): 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: SQL Network Interfaces, error: 26 -
Error Locating Server/Instance Specified)]

any ideas??
Leon Mayne
1/29/2008 9:40:43 AM
[quoted text, click to view]

Make sure you have allowed remote connections in the SQL Server Surface Area
Configuration Manager on Machine A (Start / (All) Programs / Microsoft SQL
Server 2005 / Configuration Tools / SQL Server Surface Area Confuguration),
and also that the SQL Server port (1433?) is open in Machine A's firewall.
Marcin Wiszowaty
1/29/2008 3:47:26 PM
I had to:
give the asp.net user read access to the database
when i had the problem on an Intranet site.




[quoted text, click to view]

ChiWhiteSox
1/29/2008 7:48:02 PM
so is the user at machine B using the windows authen at sql machine A ?

am i suppose to create that login at mahine A? do i need ADS at machine A ?

thanks

[quoted text, click to view]
Leon Mayne
1/30/2008 8:30:11 AM
[quoted text, click to view]

No, because you arn't using Windows authentication, you are using SQL
authentication. From your connection string:
User ID=sa;Password=secret

If you instead used:
Integrated Security=SSPI
then you would have create an application pool on machine B for the asp.net
application, and switch its identity to a domain account and then grant this
domain account access in machine A's SQL Server instance.
AddThis Social Bookmark Button