ASP.NET 2.0 - a newbie question
ASP.NET 2.0 - a newbie question
am 27.12.2007 21:19:22 von grubas8
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
RE: ASP.NET 2.0 - a newbie question
am 28.12.2007 00:50:01 von pbromberg
Not to sound like a broken MP3 again, but have you tried the ASP.NET
QUICKSTARTS? It details all these basic operations. It installs with the .NET
Framework SDK, or you can visit the online version at the asp.net web site.
-- Peter
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
MetaFinder: http://www.blogmetafinder.com
"grubas8@gazeta.pl" 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
>
>
>
>
>
Re: ASP.NET 2.0 - a newbie question
am 28.12.2007 01:01:03 von Phil H
On 27 Dec, 20:19, grub...@gazeta.pl wrote:
> Hi everybody!
>
> Is there some experienced ASP.NET 2.0 developer, who could answer some
> newbie questions?
>
> I am a complete newbie to =A0ASP.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]
> =A0 =A0System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot,
> SocketAddress socketAddress) +200
> =A0 =A0System.Net.Sockets.Socket.InternalConnect(EndPoint remoteEP) +60
> =A0 =A0System.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 =A0Microsoft 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
=3D 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.
Re: ASP.NET 2.0 - a newbie question
am 28.12.2007 14:14:18 von grubas8
On Dec 28, 1:01=A0am, Phil H wrote:
> On 27 Dec, 20:19, grub...@gazeta.pl wrote:
>
>
>
>
>
> > Hi everybody!
>
> > Is there some experienced ASP.NET 2.0 developer, who could answer some
> > newbie questions?
>
> > I am a complete newbie to =A0ASP.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]
> > =A0 =A0System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot,
> > SocketAddress socketAddress) +200
> > =A0 =A0System.Net.Sockets.Socket.InternalConnect(EndPoint remoteEP) +60
> > =A0 =A0System.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 =A0Microsoft 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
> =3D 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
Hi again!
I have tried to run the same app on my work computer, on a slightly
different configuration (there I have a Visual Studio 2005).
Proffessionally, I do not work with Web design, so there is nobody
around me to ask.
The results are almost the same, however on this computer I get the
following debug screen:
________________________
"Server Error in '/LoginCS' Application.
No connection could be made because the target machine actively
refused it
Description: An unhandled exception occurred during the execution of
the current web request. Please review the stack trace for more
information about the error and where it originated in the code.
Exception Details: System.Net.Sockets.SocketException: No connection
could be made because the target machine actively refused it
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 (0x274d): No connection could be made because the
target machine actively refused it]
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"
____________________________________________________________
I have checked and it seems that I DO have the MS SQL server installed
on this machine. I have tried to download it and instal it, and the
installation program found that the MS SQL Server is already present
on this machine.
When I look under "Start"/"Programs", i find en entry named "Microsoft
SQL Server 2005". When I click on it, another entry shows, called
"Configuration Tools". When I click on this one, it shows following
entries:
- SQL Server Configuration Manager
- SQL Server Error and Usage Reporting
- SQL Server Surface Area Configuration
I don't have any problem creating and running simple ASP.NET apps,
either at home or (after hours) at work (as long asI don't try to use
the Login control). Thus, I obviously can reach and use the ASP.NET
dev server.
Do I need to configure the SQL server in some special way? Is there
any info I could provide in otder to pinpoint the problem (such as,
for instance, the (extremely small) source code I've copied from the
"for dummies" book and am trying to run?
Sincerely grateful for any advice,
Grubas,
an old programmer but completely green about Windows/Web Apps/ASP.NET.