473,395 Members | 2,253 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Visual Studio 2005 Login Components and ASPNETDB Options

Hello all,

Just wanted to get some clarification on something. I was setting
out
to create a login page for people to login and then be able to access
certain aspects of the website. Instead of doing what I usually do
which is store the username password in a db table then compare what
the user enters from the text boxes to what's in the db, I thought I
would try the login components from the toolbox.

In looking at how to wire those up it seems I have come across two
similiar ways, but they are a different and I am not sure if one is
better than the other etc.

In on item I found it was suggested to use the aspnet_regsql to
create
the aspnetdb and the associated tables in my sql instance, add users,
which I did with a sql query I found, then wire it to the login
component.

The other item I found was within Visual Studio, click the ASP.NET
Configuration icon from within my project, which in turn creates an
aspnetdb.,df in my App_Data directory and go from there.

Not sure if the latter option is used when you don't have SQL server
available to you, but it seemed much easier to get wired up and
worked
right away, versus the former option which I had trouble getting
wired
up.

Thoughts?
Greg
Jun 27 '08 #1
6 1611
The two ways you described, well, if you study a bit more on SQL membership
provider used for ASP.NET project/website, are the same way: you need to
have an instance of SQL Server (Express) available.

<gr*******@alpinebiomed.comwrote in message
news:b1**********************************@r37g2000 prm.googlegroups.com...
Hello all,

Just wanted to get some clarification on something. I was setting
out
to create a login page for people to login and then be able to access
certain aspects of the website. Instead of doing what I usually do
which is store the username password in a db table then compare what
the user enters from the text boxes to what's in the db, I thought I
would try the login components from the toolbox.

In looking at how to wire those up it seems I have come across two
similiar ways, but they are a different and I am not sure if one is
better than the other etc.

In on item I found it was suggested to use the aspnet_regsql to
create
the aspnetdb and the associated tables in my sql instance, add users,
which I did with a sql query I found, then wire it to the login
component.

The other item I found was within Visual Studio, click the ASP.NET
Configuration icon from within my project, which in turn creates an
aspnetdb.,df in my App_Data directory and go from there.

Not sure if the latter option is used when you don't have SQL server
available to you, but it seemed much easier to get wired up and
worked
right away, versus the former option which I had trouble getting
wired
up.

Thoughts?
Greg
Jun 27 '08 #2
The first technique you mentioned (regsql) is more professional and should
be used for complex sites that need to be highly scalable.

The second technique you mentioned uses SQL Express by default. This is
fine for smaller, relatively informal web sites.

--
I hope this helps,
Steve C. Orr,
MCSD, MVP, CSM, ASPInsider
http://SteveOrr.net
http://iPhonePlaza.net
<gr*******@alpinebiomed.comwrote in message
news:b1**********************************@r37g2000 prm.googlegroups.com...
Hello all,

Just wanted to get some clarification on something. I was setting
out
to create a login page for people to login and then be able to access
certain aspects of the website. Instead of doing what I usually do
which is store the username password in a db table then compare what
the user enters from the text boxes to what's in the db, I thought I
would try the login components from the toolbox.

In looking at how to wire those up it seems I have come across two
similiar ways, but they are a different and I am not sure if one is
better than the other etc.

In on item I found it was suggested to use the aspnet_regsql to
create
the aspnetdb and the associated tables in my sql instance, add users,
which I did with a sql query I found, then wire it to the login
component.

The other item I found was within Visual Studio, click the ASP.NET
Configuration icon from within my project, which in turn creates an
aspnetdb.,df in my App_Data directory and go from there.

Not sure if the latter option is used when you don't have SQL server
available to you, but it seemed much easier to get wired up and
worked
right away, versus the former option which I had trouble getting
wired
up.

Thoughts?
Greg
Jun 27 '08 #3
Be advised some (perhaps many) hosting services are refusing to support SQL
Express databases.
<gr*******@alpinebiomed.comwrote in message
news:b1**********************************@r37g2000 prm.googlegroups.com...
Hello all,

Just wanted to get some clarification on something. I was setting
out
to create a login page for people to login and then be able to access
certain aspects of the website. Instead of doing what I usually do
which is store the username password in a db table then compare what
the user enters from the text boxes to what's in the db, I thought I
would try the login components from the toolbox.

In looking at how to wire those up it seems I have come across two
similiar ways, but they are a different and I am not sure if one is
better than the other etc.

In on item I found it was suggested to use the aspnet_regsql to
create
the aspnetdb and the associated tables in my sql instance, add users,
which I did with a sql query I found, then wire it to the login
component.

The other item I found was within Visual Studio, click the ASP.NET
Configuration icon from within my project, which in turn creates an
aspnetdb.,df in my App_Data directory and go from there.

Not sure if the latter option is used when you don't have SQL server
available to you, but it seemed much easier to get wired up and
worked
right away, versus the former option which I had trouble getting
wired
up.

Thoughts?
Greg
Jun 27 '08 #4
On Jun 21, 11:06*am, "clintonG" <nob...@nowhere.comwrote:
Be advised some (perhaps many) hosting services are refusing to support SQL
Express databases.

<greg.h...@alpinebiomed.comwrote in message

news:b1**********************************@r37g2000 prm.googlegroups.com...
Hello all,
Just wanted to get some clarification on something. *I was setting
out
to create aloginpage for people tologinand then be able to access
certain aspects of the website. *Instead of doing what I usually do
which is store the username password in a db table then compare what
the user enters from the text boxes to what's in the db, I thought I
would try thelogincomponentsfrom the toolbox.
In looking at how to wire those up it seems I have come across two
similiar ways, but they are a different and I am not sure if one is
better than the other etc.
In on item I found it was suggested to use the aspnet_regsql to
create
the aspnetdb and the associated tables in my sql instance, add users,
which I did with a sql query I found, then wire it to thelogin
component.
The other item I found was withinVisualStudio, click the ASP.NET
Configuration icon from within my project, which in turn creates an
aspnetdb.,df in my App_Data directory and go from there.
Not sure if the latter option is used when you don't have SQL server
available to you, but it seemed much easier to get wired up and
worked
right away, versus the former option which I had trouble getting
wired
up.
Thoughts?
Greg- Hide quoted text -

- Show quoted text -
Ok. I'm back. I started down the path of just using SQL express in
my local dev environment, just to see how this all works. Everything
seems to work great so now I am looking to move it to my prod box
which is a full blown SQL 2005 instance. Of course I was hoping I
would just be able to copy my APP_DATA directory over and everythign
would still work without issue. Doesn't seem to be the case. I have
seen a number of postings and it appears people are doing different
things to get it working. I have tried to attach the DB in my SQL
instance but my local version doesn't seem to use anything special in
the web.config to know it is there so I am not sure how to make it
aware of the DB.

I keep getting:

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)

Thanks,
Greg
Jun 27 '08 #5
re:
!I was hoping I would just be able to copy my APP_DATA
!directory over and everything would still work

You can't simply attach a SQL Server Express database file to SQL Server 2005.

What I would do is export your SQL Server Express database
to a .sql file, create a new database with the same name in
the SQL Server 2005 server, and import your .sql file into it.

You must make sure that you include both the schema
and the data in your exported .sql file.

re:
!my local version doesn't seem to use anything special in the web.config to know it is there

There should be a connection string there, somewhere.

re:
!so I am not sure how to make it aware of the DB.

Look at the differences in connection string syntax
for SQL Server 2005 and SQL Server Express, here :

http://www.connectionstrings.com/?carrier=sqlserver2005

Make sure you modify your current connection string so it conforms to SQL Server 2005 syntax.
You can't just copy the connection string from Express to full SQL and expect it to work.

re:
!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)

That sounds like the instance name was not changed in the connection string,
but may have one of a number of causes. Here are some :

1) Make sure your server name is correct, e.g., no typo on the name.

2) Make sure your instance name is correct and that the instance actually exists on your target machine.

3) Make sure the server machine is reachable,
i.e., that the DNS can be resolved correctly, and that you are able to ping the server.

4) Make sure that the SQL Browser service is running on the server.

5) If a firewall is enabled on the server, you need to put
sqlbrowser.exe and/or UDP port 1434 into a firewall exception.

Also, you might have to communicate via IP, instead of the SQL Server name,
if the SQL Server is not within the same local network as the web server.


Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
======================================
<gr*******@alpinebiomed.comwrote in message news:75**********************************@f63g2000 hsf.googlegroups.com...
On Jun 21, 11:06 am, "clintonG" <nob...@nowhere.comwrote:
Be advised some (perhaps many) hosting services are refusing to support SQL
Express databases.

<greg.h...@alpinebiomed.comwrote in message

news:b1**********************************@r37g2000 prm.googlegroups.com...
Hello all,
Just wanted to get some clarification on something. I was setting
out
to create aloginpage for people tologinand then be able to access
certain aspects of the website. Instead of doing what I usually do
which is store the username password in a db table then compare what
the user enters from the text boxes to what's in the db, I thought I
would try thelogincomponentsfrom the toolbox.
In looking at how to wire those up it seems I have come across two
similiar ways, but they are a different and I am not sure if one is
better than the other etc.
In on item I found it was suggested to use the aspnet_regsql to
create
the aspnetdb and the associated tables in my sql instance, add users,
which I did with a sql query I found, then wire it to thelogin
component.
The other item I found was withinVisualStudio, click the ASP.NET
Configuration icon from within my project, which in turn creates an
aspnetdb.,df in my App_Data directory and go from there.
Not sure if the latter option is used when you don't have SQL server
available to you, but it seemed much easier to get wired up and
worked
right away, versus the former option which I had trouble getting
wired
up.
Thoughts?
Greg- Hide quoted text -

- Show quoted text -
Ok. I'm back. I started down the path of just using SQL express in
my local dev environment, just to see how this all works. Everything
seems to work great so now I am looking to move it to my prod box
which is a full blown SQL 2005 instance. Of course I was hoping I
would just be able to copy my APP_DATA directory over and everythign
would still work without issue. Doesn't seem to be the case. I have
seen a number of postings and it appears people are doing different
things to get it working. I have tried to attach the DB in my SQL
instance but my local version doesn't seem to use anything special in
the web.config to know it is there so I am not sure how to make it
aware of the DB.

I keep getting:

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)

Thanks,
Greg
Jun 27 '08 #6
On Jun 23, 7:55*am, "Juan T. Llibre" <nomailrepl...@nowhere.com>
wrote:
re:
!I was hoping I would just be able to copy my APP_DATA
!directory over and everything would still work

You can't simply attach aSQLServerExpress database file toSQLServer2005.

What I would do is export yourSQLServerExpress database
to a .sqlfile, create a new database with the same name in
theSQLServer2005server, and import your .sqlfile into it.

You must make sure that you include both the schema
and the data in your exported .sqlfile.

re:
!my local version doesn't seem to use anything special in the web.config to know it is there

There should be a connection string there, somewhere.

re:
!so I am not sure how to make it aware of the DB.

Look at the differences in connection string syntax
forSQLServer2005 andSQLServerExpress, here :

http://www.connectionstrings.com/?carrier=sqlserver2005

Make sure you modify your current connection string so it conforms toSQLServer2005 syntax.
You can't just copy the connection string from Express to fullSQLand expect it to work.

re:
!An error has occurred while establishing a connection to theserver.
!When connecting toSQLServer2005, this failure may be caused by the
!fact that under the default settingsSQLServerdoes not allow remote
!connections. (provider:SQLNetwork Interfaces, error: 26 - Error
!LocatingServer/Instance Specified)

That sounds like the instance name was not changed in the connection string,
but may have one of a number of causes. Here are some :

1) Make sure yourservername is correct, e.g., no typo on the name.

2) Make sure your instance name is correct and that the instance actuallyexists on your target machine.

3) Make sure theservermachine is reachable,
i.e., that the DNS can be resolved correctly, and that you are able to ping theserver.

4) Make sure that theSQLBrowser service is running on theserver.

5) If a firewall is enabled on theserver, you need to put
sqlbrowser.exe and/or UDP port 1434 into a firewall exception.

Also, you might have to communicate via IP, instead of theSQLServername,
if theSQLServeris not within the same local network as the webserver.

Juan T. Llibre, asp.net MVP
asp.net faq :http://asp.net.do/faq/
foros de asp.net, en español :http://asp.net.do/foros/
======================================<greg.h...@a lpinebiomed.comwrote in messagenews:75**********************************@f 63g2000hsf.googlegroups.com...

On Jun 21, 11:06 am, "clintonG" <nob...@nowhere.comwrote:


Be advised some (perhaps many) hosting services are refusing to supportSQL
Expressdatabases.
<greg.h...@alpinebiomed.comwrote in message
news:b1**********************************@r37g2000 prm.googlegroups.com....
Hello all,
Just wanted to get some clarification on something. I was setting
out
to create aloginpage for people tologinand then be able to access
certain aspects of the website. Instead of doing what I usually do
which is store the username password in a db table thencomparewhat
the user enters from the text boxes to what's in the db, I thought I
would try thelogincomponentsfrom the toolbox.
In looking at how to wire those up it seems I have come across two
similiar ways, but they are a different and I am not sure if one is
better than the other etc.
In on item I found it was suggested to use the aspnet_regsql to
create
the aspnetdb and the associated tables in mysqlinstance, add users,
which I did with asqlquery I found, then wire it to thelogin
component.
The other item I found was withinVisualStudio, click the ASP.NET
Configuration icon from within my project, which in turn creates an
aspnetdb.,df in my App_Data directory and go from there.
Not sure if the latter option is used when you don't haveSQLserver
available to you, but it seemed much easier to get wired up and
worked
right away, versus the former option which I had trouble getting
wired
up.
Thoughts?
Greg- Hide quoted text -
- Show quoted text -

Ok. *I'm back. *I started down the path of just usingSQLexpress in
my local dev environment, just to see how this all works. *Everything
seems to work great so now I am looking to move it to my prod box
which is a full blownSQL2005 instance. *Of course I was hoping I
would just be able to copy my APP_DATA directory over and everythign
would still work without issue. *Doesn't seem to be the case. *I have
seen a number of postings and it appears people are doing different
things to get it working. *I have tried to attach the DB in mySQL
instance but my local version doesn't seem to use anything special in
the web.config to know it is there so I am not sure how to make it
aware of the DB.

I keep getting:

An error has occurred while establishing a connection to theserver.
When connecting toSQLServer2005, this failure may be caused by the
fact that under the default settingsSQLServerdoes not allow remote
connections. (provider:SQLNetwork Interfaces, error: 26 - Error
LocatingServer/Instance Specified)

Thanks,
Greg- Hide quoted text -

- Show quoted text -
Hi Greg,

in case you have trouble moving the SQL Server Express db to the
target server using export / import one other approach is to use xSQL
Software's (http://www.xsqlsoftware.com) schema and data compare tools
that are free for SQL Server Express and also free for other editions
of SQL Server if the number of objects in the database does not exceed
certain limits. The above description refers to the "after the two
week trial" since during the trial you get them with no restrictions
at all so you can get the job done.

Here are the steps:
1. create a blank database in the target server
2. user xSQL Object to compare and synchronize the schemas of the two
databases (your source and destination) - in essence you are
transfering the schema this way (it should take no more than a couple
of minutes to complete the job)
3. if you want to transfer the data as well use xSQL Data Compare to
compare and synchronize the data in your target database with the
source database - you can include only tables and rows you want (if
you did not want to transfer everything).

Hope this is helpful for you.

JC
Jun 27 '08 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: fiona | last post by:
Innovasys Ltd., a leader in help authoring and documentation tools, today announced the inclusion of a tailored version of the Innovasys HelpStudio help authoring product, HelpStudio Lite, in the...
4
by: Greg P | last post by:
I know this is a long post, please bear with me. I have been working on this all weekend to no avail although I have done a good amount of research (see most pertinent links that I've looked at...
7
by: Greg P | last post by:
I know this is a long post, please bear with me. I have been working on this all weekend to no avail although I have done a good amount of research (see most pertinent links that I've looked at...
3
by: Krazy Katt | last post by:
-- I am trying to install the MSDN version of Visual Studio Professional 2005 and the goddamn install won't let me change the installation drive -- it shows that everything will be installed to...
0
by: innovasys | last post by:
TORQUAY, DEVON, UK - Innovasys announced the release of Document! X 5, the fifth version of the documentation solution of choice for developers using Microsoft Visual Studio or the .NET Framework....
1
by: Milton Snider | last post by:
I installed visual studio 2005 and created a website. I turned on the forms authentication and allowed the system to create the aspnetdb.mdf file for me under the App_Data directory. Everything...
18
by: surfrat_ | last post by:
Hi, I am having the following problems in getting Microsoft Visual Studio 2005 Professional to link to an Access .mdb database. Please help me to sort this out. Problem 1: The Microsoft...
5
by: Claudio M. E. Bastos Iorio | last post by:
Hi, anyone using VS2008 (final) on windows Vista? I have a problem. The ASP.NET web site administration tool on any site created by VS2008, running on Vista, is not working as it should. I can...
2
by: greg.hart | last post by:
Hello all, Just wanted to get some clarification on something. I was setting out to create a login page for people to login and then be able to access certain aspects of the website. Instead...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.