Thursday, March 29, 2012
Performance prolem when deploying
We have a quite simple asp.net application that works fne on my XP
development box. When we deploy it to a Windows 2003 Server performance is
really poor when rendering pages. When I turn tracing on it shows that it
takes more than 15 seconds between "Begin Render" and "End Render". All
application logic is in OnLoad which takes less than 0,1 seconds to complete
on both machines. The weird thing is that if we request this page locally
(from the server box) it takes 0,1 seconds. Authentication is Anonymous and
we don't find any errors anywhere. The statusline text in IE is flickering
while the request is being processed.
So, the question is: How come the times varies depending on where the
request comes from? It must be security related somehow but I can't figure
it out.
Thanks !
Mansyou probably have a large payload whose impact only shows up with a network
request. check how big your viewstate is. if you use netscape, check page
info, if ie, save the page to disk, and check the file size.
-- bruce (sqlwork.com)
"Mans" <mans@.nomail.com> wrote in message
news:uQLgeta5DHA.2496@.TK2MSFTNGP09.phx.gbl...
> Hi,
> We have a quite simple asp.net application that works fne on my XP
> development box. When we deploy it to a Windows 2003 Server performance is
> really poor when rendering pages. When I turn tracing on it shows that it
> takes more than 15 seconds between "Begin Render" and "End Render". All
> application logic is in OnLoad which takes less than 0,1 seconds to
complete
> on both machines. The weird thing is that if we request this page locally
> (from the server box) it takes 0,1 seconds. Authentication is Anonymous
and
> we don't find any errors anywhere. The statusline text in IE is flickering
> while the request is being processed.
> So, the question is: How come the times varies depending on where the
> request comes from? It must be security related somehow but I can't figure
> it out.
> Thanks !
> Mans
There are also some useful tools that let you see what is going on between
your browser and the server. The best is http://www.httpwatch.com/ . There's
also http://www.blunck.info/iehttpheaders.html
If it is the size of the output that is the problem then look at optimising
it - removing viewstate if you aren't using it etc... You can also reduce
the size with Http Compression - http://www.intesoft.net/aspaccelerator/
- Simon Green
InteSoft IT Ltd
"bruce barker" <nospam_brubar@.safeco.com> wrote in message
news:eQZuARd5DHA.632@.TK2MSFTNGP12.phx.gbl...
> you probably have a large payload whose impact only shows up with a
network
> request. check how big your viewstate is. if you use netscape, check page
> info, if ie, save the page to disk, and check the file size.
> -- bruce (sqlwork.com)
>
> "Mans" <mans@.nomail.com> wrote in message
> news:uQLgeta5DHA.2496@.TK2MSFTNGP09.phx.gbl...
> > Hi,
> > We have a quite simple asp.net application that works fne on my XP
> > development box. When we deploy it to a Windows 2003 Server performance
is
> > really poor when rendering pages. When I turn tracing on it shows that
it
> > takes more than 15 seconds between "Begin Render" and "End Render". All
> > application logic is in OnLoad which takes less than 0,1 seconds to
> complete
> > on both machines. The weird thing is that if we request this page
locally
> > (from the server box) it takes 0,1 seconds. Authentication is Anonymous
> and
> > we don't find any errors anywhere. The statusline text in IE is
flickering
> > while the request is being processed.
> > So, the question is: How come the times varies depending on where the
> > request comes from? It must be security related somehow but I can't
figure
> > it out.
> > Thanks !
> > Mans
Hi...
Do you have used any client side implementation in the code behind pages..
As you have written there is flickering in the status bar, there is is some
kind to and from from server to browser before rendering the html..
Can you spcify some portion of the first aspx page....
"Mans" <mans@.nomail.com> wrote in message
news:uQLgeta5DHA.2496@.TK2MSFTNGP09.phx.gbl...
> Hi,
> We have a quite simple asp.net application that works fne on my XP
> development box. When we deploy it to a Windows 2003 Server performance is
> really poor when rendering pages. When I turn tracing on it shows that it
> takes more than 15 seconds between "Begin Render" and "End Render". All
> application logic is in OnLoad which takes less than 0,1 seconds to
complete
> on both machines. The weird thing is that if we request this page locally
> (from the server box) it takes 0,1 seconds. Authentication is Anonymous
and
> we don't find any errors anywhere. The statusline text in IE is flickering
> while the request is being processed.
> So, the question is: How come the times varies depending on where the
> request comes from? It must be security related somehow but I can't figure
> it out.
> Thanks !
> Mans
Performance Q..
the search text. Is it required to use the text box here, I can use html
input text box and can pass this value for search at the server side when
user clicks the search button.
IS it a good design approach to avoid server side text boxes when compared
to HTML input boxes?
NelsonIt's all a matter of functionality. If all you need is an HTML input form
object, and you don't need it to retain its value across PostBacks,
certainly, a Server Control is not necessary.
HTH,
Kevin Spencer
.Net Developer
Microsoft MVP
Neither a follower
nor a lender be.
"Nelson" <NelsonSmith1997@.hotmail.com> wrote in message
news:ezSB$aOyEHA.260@.TK2MSFTNGP11.phx.gbl...
> In one of the search window (zip code search) I am using ASP Text box to
get
> the search text. Is it required to use the text box here, I can use html
> input text box and can pass this value for search at the server side when
> user clicks the search button.
> IS it a good design approach to avoid server side text boxes when compared
> to HTML input boxes?
> Nelson
>
Hi Nelson,
I guess you should use the TextBox control. Because, as I know, the normal
requirement for a Search window is to persist the search query after the
page post backs and gets the results. So, if you use html INPUT, you would
have to use another hidden variable to achieve this, with asp.net TextBox
control you would have the ViewState, which does this automatically if you
keep it enabled. If you do not bother about preserviing the search criteria,
go with html INPUT control with runat server
"Nelson" <NelsonSmith1997@.hotmail.com> wrote in message
news:ezSB$aOyEHA.260@.TK2MSFTNGP11.phx.gbl...
> In one of the search window (zip code search) I am using ASP Text box to
get
> the search text. Is it required to use the text box here, I can use html
> input text box and can pass this value for search at the server side when
> user clicks the search button.
> IS it a good design approach to avoid server side text boxes when compared
> to HTML input boxes?
> Nelson
>
After the search results (using ZIP Code) I am displaying city, state etc
corresponds to the zip code using a text box control. Is there anyway I can
avoid text box here?
Thanks for your reply.
Nelson
"Kevin Spencer" <kspencer@.takempis.com> wrote in message
news:e1CrReOyEHA.2752@.TK2MSFTNGP11.phx.gbl...
> It's all a matter of functionality. If all you need is an HTML input form
> object, and you don't need it to retain its value across PostBacks,
> certainly, a Server Control is not necessary.
> --
> HTH,
> Kevin Spencer
> .Net Developer
> Microsoft MVP
> Neither a follower
> nor a lender be.
> "Nelson" <NelsonSmith1997@.hotmail.com> wrote in message
> news:ezSB$aOyEHA.260@.TK2MSFTNGP11.phx.gbl...
> get
when
compared
>
1. By making Run at server can I access the search text from the server side
code. Is it correct?
2. In terms of performance does it matter between HTML INPUT control with
runat server attribute and ASP Server side text box.
Thanks for your suggestions.
Nelson.
"Kumar Reddi" <KumarReddi@.REMOVETHIS.gmail.com> wrote in message
news:OGm3EgOyEHA.3024@.TK2MSFTNGP14.phx.gbl...
> Hi Nelson,
> I guess you should use the TextBox control. Because, as I know, the
normal
> requirement for a Search window is to persist the search query after the
> page post backs and gets the results. So, if you use html INPUT, you would
> have to use another hidden variable to achieve this, with asp.net TextBox
> control you would have the ViewState, which does this automatically if you
> keep it enabled. If you do not bother about preserviing the search
criteria,
> go with html INPUT control with runat server
> "Nelson" <NelsonSmith1997@.hotmail.com> wrote in message
> news:ezSB$aOyEHA.260@.TK2MSFTNGP11.phx.gbl...
> get
when
compared
>
I never did performance tests. But, if you set "EnableViewState" to false,
asp.net TextBox is very much same as html INPUT with runat server. Yes by
making runat = server, you could access the text in the server side. Since
this is the only textbox control on your page, you shouldnt be too worried
about performance I guess
"Nelson" <NelsonSmith1997@.hotmail.com> wrote in message
news:O2UURsOyEHA.2196@.TK2MSFTNGP14.phx.gbl...
> 1. By making Run at server can I access the search text from the server
side
> code. Is it correct?
> 2. In terms of performance does it matter between HTML INPUT control with
> runat server attribute and ASP Server side text box.
> Thanks for your suggestions.
> Nelson.
>
>
> "Kumar Reddi" <KumarReddi@.REMOVETHIS.gmail.com> wrote in message
> news:OGm3EgOyEHA.3024@.TK2MSFTNGP14.phx.gbl...
> normal
would
TextBox
you
> criteria,
to
html
> when
> compared
>
The only performance hit I see is when the asp.net engine converts this
server control into the HTML output for a normal html textbox. Otherwise,
user the textbox control. Nobody will know the difference. The page has to
be compiled either way so its only going to take this hit the first time
"Nelson" wrote:
> 1. By making Run at server can I access the search text from the server si
de
> code. Is it correct?
> 2. In terms of performance does it matter between HTML INPUT control with
> runat server attribute and ASP Server side text box.
> Thanks for your suggestions.
> Nelson.
>
>
> "Kumar Reddi" <KumarReddi@.REMOVETHIS.gmail.com> wrote in message
> news:OGm3EgOyEHA.3024@.TK2MSFTNGP14.phx.gbl...
> normal
> criteria,
> when
> compared
>
>
Hi Nelson,
It all depends on what you want the user to do with the data. If you simply
want to display it, a form input object is not necessary; you can simply
write it out to the page. If, on the other hand, you want the user to be
able to edit it, change, it, etc., you would need a form field. And again,
if you want the values in a form field to survive PostBacks, you need to use
a Server Control. Adding "runat=server" to a Control, and declaring it in
the CodeBehind class, effectively creates a Server Control (an HTMLInputText
Control). You can then manipulate and work with the Control in the
CodeBehind class on the server, and it will retain its value across
PostBacks.
HTH,
Kevin Spencer
.Net Developer
Microsoft MVP
Neither a follower
nor a lender be.
"Nelson" <NelsonSmith1997@.hotmail.com> wrote in message
news:uhgKBmOyEHA.924@.TK2MSFTNGP10.phx.gbl...
> After the search results (using ZIP Code) I am displaying city, state etc
> corresponds to the zip code using a text box control. Is there anyway I
can
> avoid text box here?
> Thanks for your reply.
> Nelson
>
> "Kevin Spencer" <kspencer@.takempis.com> wrote in message
> news:e1CrReOyEHA.2752@.TK2MSFTNGP11.phx.gbl...
form
to
html
> when
> compared
>
Performance Q..
the search text. Is it required to use the text box here, I can use html
input text box and can pass this value for search at the server side when
user clicks the search button.
IS it a good design approach to avoid server side text boxes when compared
to HTML input boxes?
NelsonIt's all a matter of functionality. If all you need is an HTML input form
object, and you don't need it to retain its value across PostBacks,
certainly, a Server Control is not necessary.
--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Neither a follower
nor a lender be.
"Nelson" <NelsonSmith1997@.hotmail.com> wrote in message
news:ezSB$aOyEHA.260@.TK2MSFTNGP11.phx.gbl...
> In one of the search window (zip code search) I am using ASP Text box to
get
> the search text. Is it required to use the text box here, I can use html
> input text box and can pass this value for search at the server side when
> user clicks the search button.
> IS it a good design approach to avoid server side text boxes when compared
> to HTML input boxes?
> Nelson
Hi Nelson,
I guess you should use the TextBox control. Because, as I know, the normal
requirement for a Search window is to persist the search query after the
page post backs and gets the results. So, if you use html INPUT, you would
have to use another hidden variable to achieve this, with asp.net TextBox
control you would have the ViewState, which does this automatically if you
keep it enabled. If you do not bother about preserviing the search criteria,
go with html INPUT control with runat server
"Nelson" <NelsonSmith1997@.hotmail.com> wrote in message
news:ezSB$aOyEHA.260@.TK2MSFTNGP11.phx.gbl...
> In one of the search window (zip code search) I am using ASP Text box to
get
> the search text. Is it required to use the text box here, I can use html
> input text box and can pass this value for search at the server side when
> user clicks the search button.
> IS it a good design approach to avoid server side text boxes when compared
> to HTML input boxes?
> Nelson
After the search results (using ZIP Code) I am displaying city, state etc
corresponds to the zip code using a text box control. Is there anyway I can
avoid text box here?
Thanks for your reply.
Nelson
"Kevin Spencer" <kspencer@.takempis.com> wrote in message
news:e1CrReOyEHA.2752@.TK2MSFTNGP11.phx.gbl...
> It's all a matter of functionality. If all you need is an HTML input form
> object, and you don't need it to retain its value across PostBacks,
> certainly, a Server Control is not necessary.
> --
> HTH,
> Kevin Spencer
> .Net Developer
> Microsoft MVP
> Neither a follower
> nor a lender be.
> "Nelson" <NelsonSmith1997@.hotmail.com> wrote in message
> news:ezSB$aOyEHA.260@.TK2MSFTNGP11.phx.gbl...
> > In one of the search window (zip code search) I am using ASP Text box to
> get
> > the search text. Is it required to use the text box here, I can use html
> > input text box and can pass this value for search at the server side
when
> > user clicks the search button.
> > IS it a good design approach to avoid server side text boxes when
compared
> > to HTML input boxes?
> > Nelson
1. By making Run at server can I access the search text from the server side
code. Is it correct?
2. In terms of performance does it matter between HTML INPUT control with
runat server attribute and ASP Server side text box.
Thanks for your suggestions.
Nelson.
"Kumar Reddi" <KumarReddi@.REMOVETHIS.gmail.com> wrote in message
news:OGm3EgOyEHA.3024@.TK2MSFTNGP14.phx.gbl...
> Hi Nelson,
> I guess you should use the TextBox control. Because, as I know, the
normal
> requirement for a Search window is to persist the search query after the
> page post backs and gets the results. So, if you use html INPUT, you would
> have to use another hidden variable to achieve this, with asp.net TextBox
> control you would have the ViewState, which does this automatically if you
> keep it enabled. If you do not bother about preserviing the search
criteria,
> go with html INPUT control with runat server
> "Nelson" <NelsonSmith1997@.hotmail.com> wrote in message
> news:ezSB$aOyEHA.260@.TK2MSFTNGP11.phx.gbl...
> > In one of the search window (zip code search) I am using ASP Text box to
> get
> > the search text. Is it required to use the text box here, I can use html
> > input text box and can pass this value for search at the server side
when
> > user clicks the search button.
> > IS it a good design approach to avoid server side text boxes when
compared
> > to HTML input boxes?
> > Nelson
I never did performance tests. But, if you set "EnableViewState" to false,
asp.net TextBox is very much same as html INPUT with runat server. Yes by
making runat = server, you could access the text in the server side. Since
this is the only textbox control on your page, you shouldnt be too worried
about performance I guess
"Nelson" <NelsonSmith1997@.hotmail.com> wrote in message
news:O2UURsOyEHA.2196@.TK2MSFTNGP14.phx.gbl...
> 1. By making Run at server can I access the search text from the server
side
> code. Is it correct?
> 2. In terms of performance does it matter between HTML INPUT control with
> runat server attribute and ASP Server side text box.
> Thanks for your suggestions.
> Nelson.
>
>
> "Kumar Reddi" <KumarReddi@.REMOVETHIS.gmail.com> wrote in message
> news:OGm3EgOyEHA.3024@.TK2MSFTNGP14.phx.gbl...
> > Hi Nelson,
> > I guess you should use the TextBox control. Because, as I know, the
> normal
> > requirement for a Search window is to persist the search query after the
> > page post backs and gets the results. So, if you use html INPUT, you
would
> > have to use another hidden variable to achieve this, with asp.net
TextBox
> > control you would have the ViewState, which does this automatically if
you
> > keep it enabled. If you do not bother about preserviing the search
> criteria,
> > go with html INPUT control with runat server
> > "Nelson" <NelsonSmith1997@.hotmail.com> wrote in message
> > news:ezSB$aOyEHA.260@.TK2MSFTNGP11.phx.gbl...
> > > In one of the search window (zip code search) I am using ASP Text box
to
> > get
> > > the search text. Is it required to use the text box here, I can use
html
> > > input text box and can pass this value for search at the server side
> when
> > > user clicks the search button.
> > > > IS it a good design approach to avoid server side text boxes when
> compared
> > > to HTML input boxes?
> > > > Nelson
> >
The only performance hit I see is when the asp.net engine converts this
server control into the HTML output for a normal html textbox. Otherwise,
user the textbox control. Nobody will know the difference. The page has to
be compiled either way so its only going to take this hit the first time
"Nelson" wrote:
> 1. By making Run at server can I access the search text from the server side
> code. Is it correct?
> 2. In terms of performance does it matter between HTML INPUT control with
> runat server attribute and ASP Server side text box.
> Thanks for your suggestions.
> Nelson.
>
>
> "Kumar Reddi" <KumarReddi@.REMOVETHIS.gmail.com> wrote in message
> news:OGm3EgOyEHA.3024@.TK2MSFTNGP14.phx.gbl...
> > Hi Nelson,
> > I guess you should use the TextBox control. Because, as I know, the
> normal
> > requirement for a Search window is to persist the search query after the
> > page post backs and gets the results. So, if you use html INPUT, you would
> > have to use another hidden variable to achieve this, with asp.net TextBox
> > control you would have the ViewState, which does this automatically if you
> > keep it enabled. If you do not bother about preserviing the search
> criteria,
> > go with html INPUT control with runat server
> > "Nelson" <NelsonSmith1997@.hotmail.com> wrote in message
> > news:ezSB$aOyEHA.260@.TK2MSFTNGP11.phx.gbl...
> > > In one of the search window (zip code search) I am using ASP Text box to
> > get
> > > the search text. Is it required to use the text box here, I can use html
> > > input text box and can pass this value for search at the server side
> when
> > > user clicks the search button.
> > > > IS it a good design approach to avoid server side text boxes when
> compared
> > > to HTML input boxes?
> > > > Nelson
> > >
Hi Nelson,
It all depends on what you want the user to do with the data. If you simply
want to display it, a form input object is not necessary; you can simply
write it out to the page. If, on the other hand, you want the user to be
able to edit it, change, it, etc., you would need a form field. And again,
if you want the values in a form field to survive PostBacks, you need to use
a Server Control. Adding "runat=server" to a Control, and declaring it in
the CodeBehind class, effectively creates a Server Control (an HTMLInputText
Control). You can then manipulate and work with the Control in the
CodeBehind class on the server, and it will retain its value across
PostBacks.
--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Neither a follower
nor a lender be.
"Nelson" <NelsonSmith1997@.hotmail.com> wrote in message
news:uhgKBmOyEHA.924@.TK2MSFTNGP10.phx.gbl...
> After the search results (using ZIP Code) I am displaying city, state etc
> corresponds to the zip code using a text box control. Is there anyway I
can
> avoid text box here?
> Thanks for your reply.
> Nelson
>
> "Kevin Spencer" <kspencer@.takempis.com> wrote in message
> news:e1CrReOyEHA.2752@.TK2MSFTNGP11.phx.gbl...
> > It's all a matter of functionality. If all you need is an HTML input
form
> > object, and you don't need it to retain its value across PostBacks,
> > certainly, a Server Control is not necessary.
> > --
> > HTH,
> > Kevin Spencer
> > .Net Developer
> > Microsoft MVP
> > Neither a follower
> > nor a lender be.
> > "Nelson" <NelsonSmith1997@.hotmail.com> wrote in message
> > news:ezSB$aOyEHA.260@.TK2MSFTNGP11.phx.gbl...
> > > In one of the search window (zip code search) I am using ASP Text box
to
> > get
> > > the search text. Is it required to use the text box here, I can use
html
> > > input text box and can pass this value for search at the server side
> when
> > > user clicks the search button.
> > > > IS it a good design approach to avoid server side text boxes when
> compared
> > > to HTML input boxes?
> > > > Nelson
> >
Saturday, March 24, 2012
permission denied on object sp_sdidebug
t-SQL and scripting in the dialog box, run the web site, I get te following
error in spite of the fact I am logged as an administrator and the tyhe
connectionn string has trusted conn.:
SqlException: EXECUTE permission denied on object 'sp_sdidebug', database
'master', owner 'dbo'.]
System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior
cmdBehavior, RunBehavior runBehavior, Boolean returnStream) +742
System.Data.SqlClient.SqlCommand.ExecuteNonQuery() +195
Thanks for your helpHi,
are you using Windows authentication or SQL Server authentication for
conecting to the DB. Or may be grant execute rights to the user through whic
h
you are loggin into in SQL Server.
HTH.
Kaustav Neogy.
"SalamElias" wrote:
> Hi, whenever I attach the asp_net to a web site, checking 3 boxes aspnet,
> t-SQL and scripting in the dialog box, run the web site, I get te followin
g
> error in spite of the fact I am logged as an administrator and the tyhe
> connectionn string has trusted conn.:
> SqlException: EXECUTE permission denied on object 'sp_sdidebug', database
> 'master', owner 'dbo'.]
> System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior
> cmdBehavior, RunBehavior runBehavior, Boolean returnStream) +742
> System.Data.SqlClient.SqlCommand.ExecuteNonQuery() +195
> Thanks for your help
Hi SalamElias,
I think Kaustav's suggestion on checking the SQL db's security setting is
resonable. From the error info you provided, your program failed when try
to call a store procedure in the sql db. As Kaustav has said, you should
grant the proper permissions to the account you used to connect the sql db.
IF using Sqlserver authentication, that's the account you specify in the
connectionstring, if windows authentication, that'll be your asp.net
applications process identity if you 're not using impersonate.
Please feel free to let me know if you have anything unclear or there is
anything else we haven't quite understand well. Thanks.
Regards,
Steven Cheng
Microsoft Online Support
Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
permission denied on object sp_sdidebug
t-SQL and scripting in the dialog box, run the web site, I get te following
error in spite of the fact I am logged as an administrator and the tyhe
connectionn string has trusted conn.:
SqlException: EXECUTE permission denied on object 'sp_sdidebug', database
'master', owner 'dbo'.]
System.Data.SqlClient.SqlCommand.ExecuteReader(Com mandBehavior
cmdBehavior, RunBehavior runBehavior, Boolean returnStream) +742
System.Data.SqlClient.SqlCommand.ExecuteNonQuery() +195
Thanks for your helpHi,
are you using Windows authentication or SQL Server authentication for
conecting to the DB. Or may be grant execute rights to the user through which
you are loggin into in SQL Server.
HTH.
Kaustav Neogy.
"SalamElias" wrote:
> Hi, whenever I attach the asp_net to a web site, checking 3 boxes aspnet,
> t-SQL and scripting in the dialog box, run the web site, I get te following
> error in spite of the fact I am logged as an administrator and the tyhe
> connectionn string has trusted conn.:
> SqlException: EXECUTE permission denied on object 'sp_sdidebug', database
> 'master', owner 'dbo'.]
> System.Data.SqlClient.SqlCommand.ExecuteReader(Com mandBehavior
> cmdBehavior, RunBehavior runBehavior, Boolean returnStream) +742
> System.Data.SqlClient.SqlCommand.ExecuteNonQuery() +195
> Thanks for your help
Hi SalamElias,
I think Kaustav's suggestion on checking the SQL db's security setting is
resonable. From the error info you provided, your program failed when try
to call a store procedure in the sql db. As Kaustav has said, you should
grant the proper permissions to the account you used to connect the sql db.
IF using Sqlserver authentication, that's the account you specify in the
connectionstring, if windows authentication, that'll be your asp.net
applications process identity if you 're not using impersonate.
Please feel free to let me know if you have anything unclear or there is
anything else we haven't quite understand well. Thanks.
Regards,
Steven Cheng
Microsoft Online Support
Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)