Re: ASP.NET 2.0 - a newbie question
- From: Phil H <google@xxxxxxxxxxxxxxx>
- Date: Thu, 27 Dec 2007 16:01:03 -0800 (PST)
On 27 Dec, 20:19, grub...@xxxxxxxxx wrote:
Hi everybody!
Is there some experienced ASP.NET 2.0 developer, who could answer some
newbie questions?
I am a complete newbie to ASP.NET 2.0 and Web programming, trying to
take my first steps. For this, I have bought a couple of books
("ASP.NET 2.0 for Dummies", "ASP.NET 2.0 Everyday Appsf for Dummies"
and downloaded some developer software:
- Microsoft Visual Web Developer 2005 Express Edition
- Microsoft Visual C# 2005 Express Edition
I have build and run some "Hello World"-type applications from the
first book, they seem to work OK. So far, I am doing it all on my PC,
not uploading anything to a remote website and using the build-in Web
server that comes bundled Microsoft VWDE.
Now for the problem.
I try to build the first app described in "ASP.NET 2.0 Everyday Apps
for Dummies" - a simple app for creating and managing user accounts.
It consists of a login page that contains a login control, a "Create
User" wizard and a few mor things. Successfull creation of a user
should lead to a different page. Mostly, it is an app for
demonstrating stuff like the Login control, the CreateUserWizard
control etc.
However, if I try to create a new user, nothing happens for perhaps a
minute and then I get a debug screen. It begins like this:
_____________________________
"Source Error:
An unhandled exception was generated during the execution of the
current web request. Information regarding the origin and location of
the exception can be identified using the exception stack trace below.
Stack Trace:
[SocketException (0x274c): A connection attempt failed because the
connected party did not properly respond after a period of time, or
established connection failed because connected host has failed to
respond]
System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot,
SocketAddress socketAddress) +200
System.Net.Sockets.Socket.InternalConnect(EndPoint remoteEP) +60
System.Net.ServicePoint.ConnectSocketInternal(Boolean
connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress&
address, ConnectSocketState state, IAsyncResult asyncResult, Int32
timeout, Exception& exception) +579
[WebException: Unable to connect to the remote server]
____________________
As I understand, the user accounts in ASP.NET 2.0 are handled by an
SQL database. Am I right about that? Do I need to download the
Microsoft SQL Server? I don't think it comes bundled with either the
Microsoft Visual Web Developer or Microsoft Visual C#. Am I right
about that? Do I guess right about the reason for failure? And the SQL
server - do I need to download it? Is there a way to check if I
already have it installed?
Thanks in advance for all advice.
Grubas
Hi
The answer to both questions is yes. You can download SQL2005 Express,
no license is required to use it, and it will handle Membership and
Roles using the default ASP.NET provider. You should find the database
file in the App_Data directory of the web site probably named
ASPNETDB.MDF A word of warning though. It uses a peculier mode of
operation known as "user instances". Normally database files are
permantly "attached" to a database defined in SQL server but in this
mode an instance of the database is created on the fly using the given
file. In my experience it's flaky and I never use it. This is only the
default configuration it can be overriden by settings in the
WEB.CONFIG file.
To find out how it is currently configured look in the WEB.CONFIG file
for the section "Connection strings" You'll probably see one named
"LocalSqlServer" The actual value will contain the word "Userinstance
= true" and it will assume the source is on the App_Data directory
(using some peculiar but recognisable alias for the path).
Without knowing what set-up instructions are in the book it's
difficult to diagnose the problem fully but it sounds as though SQL
server is missing.
.
- Follow-Ups:
- Re: ASP.NET 2.0 - a newbie question
- From: grubas8
- Re: ASP.NET 2.0 - a newbie question
- References:
- ASP.NET 2.0 - a newbie question
- From: grubas8
- ASP.NET 2.0 - a newbie question
- Prev by Date: Server side variables (e.g. $_SERVER['REMOTE_ADDR']) - dotNet equivalent?
- Next by Date: 301 redirect HTML to ASPX. options?
- Previous by thread: RE: ASP.NET 2.0 - a newbie question
- Next by thread: Re: ASP.NET 2.0 - a newbie question
- Index(es):
Relevant Pages
|