By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
458,221 Members | 1,054 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 458,221 IT Pros & Developers. It's quick & easy.

trouble connecting to remote SQL server for authentication

P: n/a
I've got an app which provides data based on the user who is logged in.
So, I need the user data to be on the same db server as the other
data. I'm trying to do this using the membership API. I've set up the
tables and sprocs and so forth using the aspnet_regsql.exe (though, for
some reason, I had to do it using windows authentication rather than
using a SQL server account). I've modified the web.config file as
follows

<?xml version="1.0" encoding="utf-8"?>

<configuration
xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">

<connectionStrings>

<add name="SLAR-con" connectionString="Data
Source=mySQLserver;Initial Catalog=SLAR;User
Id=mydomain\myuserid;Password=mypassword" />

</connectionStrings>

<system.web>

<roleManager enabled="true" />

<authentication mode="Forms" />

<membership>

<providers>

<add connectionStringName="SLAR-con"
applicationName="SLAR" minRequiredPasswordLength="5"

minRequiredNonalphanumericCharacters="0"
name="CustomizedProvider"

type="System.Web.Security.SqlMembershipProvider" />

</providers>

</membership>

</system.web>

</configuration>

and I've tested the login and it seems to be working. However, when I
go into the database on the SQL server to look at the user I created,
the user authentication tables are all empty. The data isn't being
stored on the SQL server where I want it to be (I'm assuming it is
being stored in a SQL Server express database on the local machine).
How do I get the data to be stored in the remote SQL server?
--------------------------------------------------------------------------------

Oct 26 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Check both databases and make sure it is not pointiong locally. As long as
machine name is correct, you should be on the other server.

NOTE: SQL Server 2005 requires SQL Browser on to connect remotely. You also
have to have proper transports set up, as some versions install without
TCP/IP or named pipes on.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
http://gregorybeamer.spaces.live.com

*************************************************
Think outside of the box!
*************************************************
<br**********@wpafb.af.milwrote in message
news:11*********************@i3g2000cwc.googlegrou ps.com...
I've got an app which provides data based on the user who is logged in.
So, I need the user data to be on the same db server as the other
data. I'm trying to do this using the membership API. I've set up the
tables and sprocs and so forth using the aspnet_regsql.exe (though, for
some reason, I had to do it using windows authentication rather than
using a SQL server account). I've modified the web.config file as
follows

<?xml version="1.0" encoding="utf-8"?>

<configuration
xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">

<connectionStrings>

<add name="SLAR-con" connectionString="Data
Source=mySQLserver;Initial Catalog=SLAR;User
Id=mydomain\myuserid;Password=mypassword" />

</connectionStrings>

<system.web>

<roleManager enabled="true" />

<authentication mode="Forms" />

<membership>

<providers>

<add connectionStringName="SLAR-con"
applicationName="SLAR" minRequiredPasswordLength="5"

minRequiredNonalphanumericCharacters="0"
name="CustomizedProvider"

type="System.Web.Security.SqlMembershipProvider" />

</providers>

</membership>

</system.web>

</configuration>

and I've tested the login and it seems to be working. However, when I
go into the database on the SQL server to look at the user I created,
the user authentication tables are all empty. The data isn't being
stored on the SQL server where I want it to be (I'm assuming it is
being stored in a SQL Server express database on the local machine).
How do I get the data to be stored in the remote SQL server?
--------------------------------------------------------------------------------

Oct 26 '06 #2

P: n/a

Cowboy (Gregory A. Beamer) wrote:
Check both databases and make sure it is not pointiong locally. As long as
machine name is correct, you should be on the other server.

NOTE: SQL Server 2005 requires SQL Browser on to connect remotely. You also
have to have proper transports set up, as some versions install without
TCP/IP or named pipes on.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
http://gregorybeamer.spaces.live.com

*************************************************
Think outside of the box!
*************************************************
<br**********@wpafb.af.milwrote in message
news:11*********************@i3g2000cwc.googlegrou ps.com...
I've got an app which provides data based on the user who is logged in.
So, I need the user data to be on the same db server as the other
data. I'm trying to do this using the membership API. I've set up the
tables and sprocs and so forth using the aspnet_regsql.exe (though, for
some reason, I had to do it using windows authentication rather than
using a SQL server account). I've modified the web.config file as
follows

<?xml version="1.0" encoding="utf-8"?>

<configuration
xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">

<connectionStrings>

<add name="SLAR-con" connectionString="Data
Source=mySQLserver;Initial Catalog=SLAR;User
Id=mydomain\myuserid;Password=mypassword" />

</connectionStrings>

<system.web>

<roleManager enabled="true" />

<authentication mode="Forms" />

<membership>

<providers>

<add connectionStringName="SLAR-con"
applicationName="SLAR" minRequiredPasswordLength="5"

minRequiredNonalphanumericCharacters="0"
name="CustomizedProvider"

type="System.Web.Security.SqlMembershipProvider" />

</providers>

</membership>

</system.web>

</configuration>

and I've tested the login and it seems to be working. However, when I
go into the database on the SQL server to look at the user I created,
the user authentication tables are all empty. The data isn't being
stored on the SQL server where I want it to be (I'm assuming it is
being stored in a SQL Server express database on the local machine).
How do I get the data to be stored in the remote SQL server?
--------------------------------------------------------------------------------
It is being stored locally (local to the machine on which I'm doing the
development), but I'm unclear on how to point it to the SQL server db.
I thought the edits shown in the top post I made to the web.config file
would handle that, but they don't. The SQL server db is SQL Server
2000.
By the way, thanks for the assist. I posted on Microsoft asp.net forum
and got 20 views, but no assist and got nothing from 4guysfromrolla.

Oct 26 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.