Re: ASP.NET 2.0 - a newbie question



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



Relevant Pages

  • Re: Socket Exception
    ... In this case the server most likely rejected your ... connection. ... Each command is a new socket connection that is opened and closed ... /// Required designer variable. ...
    (microsoft.public.win32.programmer.networks)
  • error when move web service from dev machine to test server
    ... I have a simple web service that I developed on my laptop that resides ... test server, & when I try to run it, I get the error "No connection could be ... No connection could be made because the target machine actively refused it ... Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState ...
    (microsoft.public.dotnet.framework.webservices)
  • Re: Messaging alert
    ... I was hopping that I could use sockets to create a connection back and forth in order to send the message. ... I want to be able to send a file name and other information thru the client socket to then process in the servers. ... fileevent $sock w ... At the server side I am listening at the port and execute Accept2 when the socket is created. ...
    (comp.lang.tcl)
  • ASP.NET 2.0 - a newbie question
    ... Is there some experienced ASP.NET 2.0 developer, ... the exception can be identified using the exception stack trace below. ... A connection attempt failed because the ... connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Strange server socket behaviour
    ... asynchronous server socket: ... I already have a perfectly working server that uses asynchronous sockets ... Why should the remote client close the connection? ... when a .NET client connects. ...
    (microsoft.public.dotnet.framework)