asp:Login question

C

ChiWhiteSox

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??
 
L

Leon Mayne

ChiWhiteSox said:
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??

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.
 
M

Marcin Wiszowaty

I had to:
give the asp.net user read access to the database
when i had the problem on an Intranet site.




Leon Mayne said:
ChiWhiteSox said:
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??

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.
 
C

ChiWhiteSox

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

Marcin Wiszowaty said:
I had to:
give the asp.net user read access to the database
when i had the problem on an Intranet site.




Leon Mayne said:
ChiWhiteSox said:
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??

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.
 
L

Leon Mayne

ChiWhiteSox said:
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
?

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top