Showing posts with label address. Show all posts
Showing posts with label address. Show all posts

Saturday, March 24, 2012

Trouble testing with ACT and ASP.NET

(sorry, I am just having trouble getting my Universal MSDN subscription news
group email address hooked up so MSFT responds so I am reposting hoping it i
s now setup right)
Here is our scenario:
.asmx web service on server 1 (Windows 2003)
on server 2 (Windows 2000), we run ACT with 100 concurrent users calling an
ASP that uses a COM+ VB6 DLL SOAPing to .asmx file. We read 100 concurrent r
equests in ASP.NET Requests Current on server 1.
on server 2, we run a .NET Console app that SOAPs to the .asmx file. We have
it looping continuously making the same call. We open about twelve instance
s of the console. We read a varying number of concurrent requests but we see
values in the 20's.
on server 2, we run a .aspx web form that SOAPs to the .asmx file. We run AC
T with 100 concurrent users. We consistently see only 4-5 concurrent request
s on server 1.
Is there some configuration of web or machine.config we are missing?
Thanks!This may help
http://msdn.microsoft.com/library/d...ice07222003.asp
Michael
This posting is provided "AS IS" with no warranties, and confers no rights.
<fm@.newsgroups.nospam> wrote in message
news:C670EE88-C76B-4661-B8B5-5C6C8A2AF2FE@.microsoft.com...
> (sorry, I am just having trouble getting my Universal MSDN subscription
> newsgroup email address hooked up so MSFT responds so I am reposting
> hoping it is now setup right)
> Here is our scenario:
> .asmx web service on server 1 (Windows 2003)
> on server 2 (Windows 2000), we run ACT with 100 concurrent users calling
> an ASP that uses a COM+ VB6 DLL SOAPing to .asmx file. We read 100
> concurrent requests in ASP.NET Requests Current on server 1.
> on server 2, we run a .NET Console app that SOAPs to the .asmx file. We
> have it looping continuously making the same call. We open about twelve
> instances of the console. We read a varying number of concurrent requests
> but we see values in the 20's.
> on server 2, we run a .aspx web form that SOAPs to the .asmx file. We run
> ACT with 100 concurrent users. We consistently see only 4-5 concurrent
> requests on server 1.
> Is there some configuration of web or machine.config we are missing?
> Thanks!
>
see answer to your previous post
<fm@.newsgroups.nospam> wrote in message
news:C670EE88-C76B-4661-B8B5-5C6C8A2AF2FE@.microsoft.com...
> (sorry, I am just having trouble getting my Universal MSDN subscription
newsgroup email address hooked up so MSFT responds so I am reposting hoping
it is now setup right)
> Here is our scenario:
> .asmx web service on server 1 (Windows 2003)
> on server 2 (Windows 2000), we run ACT with 100 concurrent users calling
an ASP that uses a COM+ VB6 DLL SOAPing to .asmx file. We read 100
concurrent requests in ASP.NET Requests Current on server 1.
> on server 2, we run a .NET Console app that SOAPs to the .asmx file. We
have it looping continuously making the same call. We open about twelve
instances of the console. We read a varying number of concurrent requests
but we see values in the 20's.
> on server 2, we run a .aspx web form that SOAPs to the .asmx file. We run
ACT with 100 concurrent users. We consistently see only 4-5 concurrent
requests on server 1.
> Is there some configuration of web or machine.config we are missing?
> Thanks!
>
This article did help. I put the following into Web.Config of the client ASP
X
that calls the Web Service:
<system.net>
<connectionManagement>
<add address="*" maxconnection="40" />
</connectionManagement>
</system.net>
<system.web>
We modified this number and did a few tests. We tried 60, 40 and 20. All
were better then the default of 2. 40-20 seemed the best range. We checked
time to first byte, current ASP.NET requests and server CPU usage.
We went looking for why this 2 connection limit and we found this blog:
http://odetocode.com/Blogs/scott/ar...06/08/272.aspx. So I think we
feel very comfortable in changing this value.
We may also look at calling the web service asynchronously as the article
you provided suggests.
Thanks for the help.
"Michael O'Donovan [MSFT]" wrote:

> This may help
> http://msdn.microsoft.com/library/d...ice07222003.asp
> Michael
> --
> This posting is provided "AS IS" with no warranties, and confers no rights
.
> <fm@.newsgroups.nospam> wrote in message
> news:C670EE88-C76B-4661-B8B5-5C6C8A2AF2FE@.microsoft.com...
>
>

Trouble with databinding

Hi,

I'm trying to add databinding to the wizard control. Basically a user is
entering their email address and I want to validate this to a sql database
when the hit next but I cannot get this to work.

Any idea how I would go about doing this?

Thanks in advance

--

- Hayden KirkWhat you need to do is handle the NextButtonClick and
PreviousButtonClick events. In those events you can check the value
for the ActiveStepIndex which will coorespond with each of your steps.
If the right step is the current one you can run your check against the
database. If you want to cancel the step you can set the Cancel
property on the event to true.

Here is a code snippet.

protected void Wizard1_NextButtonClick(object sender,
System.Web.UI.WebControls.WizardNavigationEventArg s e)
{
bool isEmailValid = FindEmail(txtEmail.Text);
e.Cancel = ! isEmailValid();
}

You may also want to attach a custom validator to the email textbox and
then you can simply ask the validator if it is valid. It will then
automatically display the error indicator, like a red star next to the
textbox.

Brennan Stehling
http://brennan.offwhite.net/blog/
Hayden Kirk wrote:

Quote:

Originally Posted by

Hi,
>
I'm trying to add databinding to the wizard control. Basically a user is
entering their email address and I want to validate this to a sql database
when the hit next but I cannot get this to work.
>
Any idea how I would go about doing this?
>
Thanks in advance
>
--
>
- Hayden Kirk


Thanks for responding Brennan.

This is working perfectly. I was wondering though, what is the best way to
go about getting the data from the mssql database. I only need to check to
see if their email address already exists or not, possibly delete it if they
wish to unsubscribe. Can I use the sqldatasource control for this? Or is is
better to code this by hand?

I was wondering if someone could give me a quick example of doing it by
hand.

Thanks,

"Brennan Stehling" <offwhite@.gmail.comwrote in message
news:1157942127.738960.146550@.e3g2000cwe.googlegro ups.com...

Quote:

Originally Posted by

What you need to do is handle the NextButtonClick and
PreviousButtonClick events. In those events you can check the value
for the ActiveStepIndex which will coorespond with each of your steps.
If the right step is the current one you can run your check against the
database. If you want to cancel the step you can set the Cancel
property on the event to true.
>
Here is a code snippet.
>
protected void Wizard1_NextButtonClick(object sender,
System.Web.UI.WebControls.WizardNavigationEventArg s e)
{
bool isEmailValid = FindEmail(txtEmail.Text);
e.Cancel = ! isEmailValid();
}
>
You may also want to attach a custom validator to the email textbox and
then you can simply ask the validator if it is valid. It will then
automatically display the error indicator, like a red star next to the
textbox.
>
Brennan Stehling
http://brennan.offwhite.net/blog/
>
Hayden Kirk wrote:

Quote:

Originally Posted by

>Hi,
>>
>I'm trying to add databinding to the wizard control. Basically a user is
>entering their email address and I want to validate this to a sql
>database
>when the hit next but I cannot get this to work.
>>
>Any idea how I would go about doing this?
>>
>Thanks in advance
>>
>--
>>
>- Hayden Kirk


>


Here is a snippet for a basic query with ADO.NET.

using System;
using System.Data;
using System.Data.SqlClient;

class Sample
{
public static void Main()
{
SqlConnection nwindConn = new SqlConnection("Data
Source=localhost;Integrated Security=SSPI;Initial Catalog=northwind");

SqlCommand catCMD = nwindConn.CreateCommand();
catCMD.CommandText = "SELECT CategoryID, CategoryName FROM
Categories";

nwindConn.Open();

SqlDataReader myReader = catCMD.ExecuteReader();

while (myReader.Read())
{
Console.WriteLine("\t{0}\t{1}", myReader.GetInt32(0),
myReader.GetString(1));
}

myReader.Close();
nwindConn.Close();
}
}

Hayden Kirk wrote:

Quote:

Originally Posted by

Thanks for responding Brennan.
>
This is working perfectly. I was wondering though, what is the best way to
go about getting the data from the mssql database. I only need to check to
see if their email address already exists or not, possibly delete it if they
wish to unsubscribe. Can I use the sqldatasource control for this? Or is is
better to code this by hand?
>
I was wondering if someone could give me a quick example of doing it by
hand.
>
Thanks,
>
"Brennan Stehling" <offwhite@.gmail.comwrote in message
news:1157942127.738960.146550@.e3g2000cwe.googlegro ups.com...

Quote:

Originally Posted by

What you need to do is handle the NextButtonClick and
PreviousButtonClick events. In those events you can check the value
for the ActiveStepIndex which will coorespond with each of your steps.
If the right step is the current one you can run your check against the
database. If you want to cancel the step you can set the Cancel
property on the event to true.

Here is a code snippet.

protected void Wizard1_NextButtonClick(object sender,
System.Web.UI.WebControls.WizardNavigationEventArg s e)
{
bool isEmailValid = FindEmail(txtEmail.Text);
e.Cancel = ! isEmailValid();
}

You may also want to attach a custom validator to the email textbox and
then you can simply ask the validator if it is valid. It will then
automatically display the error indicator, like a red star next to the
textbox.

Brennan Stehling
http://brennan.offwhite.net/blog/
Hayden Kirk wrote:

Quote:

Originally Posted by

Hi,
>
I'm trying to add databinding to the wizard control. Basically a user is
entering their email address and I want to validate this to a sql
database
when the hit next but I cannot get this to work.
>
Any idea how I would go about doing this?
>
Thanks in advance
>
--
>
- Hayden Kirk