Showing posts with label app. Show all posts
Showing posts with label app. Show all posts

Thursday, March 29, 2012

Performance problems using ASP.NET 2.0

I have just built my first ASP.NET v2.0 app and have it running on a 3 server web farm that runs several other ASP.NET v1.1 apps. The v1.1 apps run great, but the new v2.0 app always seems to run very slowly when first connecting to the site, even if other users have already visited the site. I believe I have pre-compiled the site, and even if I visit each server in turn to ensure the app has been compiled before hitting the load-balanced url, the site just runs very slowly. On our development machines the site runs very quickly, so the poor performance is a bit of a mystery.

The servers in the farm are running Windows 2003 Server and the machine.config on each server has been updated to syncronize the machine keys.

Check the event viewer to see if the app pool is restarting itself. Some people had problems with the application shutting down and if that's your case then when the app (aspnet) restarts itself the code has to recompile. Any other details that you might find, will help on directing you towards the right path.

hi

are u working with directory. The asp.net 2.0 application restart as soon as the directory structure changes. see the post below

http://vikramlakhotia.com/Post.aspx?postID=6

Hope this helps

Vikram

Vikram's Blog


Did not know that. If that's the case that's a huge bug on asp.net 2.0. It should be reported. Maybe there's a setting on the Machine.Config for the application not to restart when the directory structure changes.
There was nothing in the event viewer for all three servers (relating to asp.net anyway). The slow responses almost feel like every page request is causing the application to be re-built...

I don't know what else to tell you. Maybe you have indexing on and it's getting ahold of the files and thus restarting. Just throwing one out there.

Try creating another app and see how it behaves. If it behaves normal, then the problem is related to your application.

performance question

Lets just say my app is done HOO HOO.

Now, I'm accessing the database via a web service and one thing i noticed
that my app is running real slow. When I first started working on the app is
ran pretty quick returned the data to the screens in about 2 - 3 seconds. Now
its going about 5 - 10 seconds. How can I beef it up for better performance.> Lets just say my app is done HOO HOO.

I hate it when my app is done HOO HOO. But what are you going to do? Live it
or live with it, as the young lady says...

;-)

Performance. This is one of the reasons why Uncle Chutney says "Big things
are made up of lots of little things." In a client-server app, this is
especially true. Small increases or decreases in performance can make a big
difference when a lot of clients are accessing a web app. Multiply the
difference in performance by the number of clients, and you can see why.

There are lots of little things you can do to dramatically increase
performance. I'll try to hit the big ones.

1. In a client-server app, any work done by the client means a big savings
on the server. The more clients the bigger the savings. Use client-side
processing and JavaScript whenever possible.
2. If your App is written in VB.Net, make sure that Option Strict is turned
ON! Late-binding is anathema to performance.
3. Avoid duplication in your app. Don't duplicate values, and don't
duplicate code. Any time you see the same few lines of code in several
places, you're looking at a good candidate for a function or Sub. If you
have created a number of classes that have the same fields, properties,
and/or methods, you're looking at a good candidate for a base class, and
derived classes.
4. Avoid using the "drag and drop" tools in the toolbox. Some of them are
quite useful; others are one-size-fits-all memory hogs for beginners, to
make it easy for them to make something happen without much trouble.
5. Close and/or Dispose any objects that use unmanaged resources as quickly
as possible.
6. Close database connections ASAP.

On a similar note, it should be stressed that performance is a factor in
designing your app. The fastest apps have much more lower-level code in
them, and are also more proprietary overall. Writing an app that is easily
extensible may involve a trade-off of performance over code maintainability.
Striking the right balance is an art.

I'm sure I've overlooked several things, but I do believe I've hit on the
majors in this list. At any rate, I hope it helps.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
I get paid good money to
solve puzzles for a living

"Mike" <Mike@.discussions.microsoft.com> wrote in message
news:1DA19F5F-C332-4818-959F-7881D0D3A61A@.microsoft.com...
> Lets just say my app is done HOO HOO.
> Now, I'm accessing the database via a web service and one thing i noticed
> that my app is running real slow. When I first started working on the app
is
> ran pretty quick returned the data to the screens in about 2 - 3 seconds.
Now
> its going about 5 - 10 seconds. How can I beef it up for better
performance.
All good points. Actually all the db connections are closed and all the db
transactions are being done in the web service. The html(aspx) pages call the
function needed and then i do formatting on the aspx pages, such as the
datagrids.
The only question i have it the Option Strict. I turned that ON and when I
recompiled the project. I got all kinds of errors such as

Option Strict On Disallows implicit conversions from 'String' to 'Short'

how do i fix that?

"Kevin Spencer" wrote:

> > Lets just say my app is done HOO HOO.
> I hate it when my app is done HOO HOO. But what are you going to do? Live it
> or live with it, as the young lady says...
> ;-)
> Performance. This is one of the reasons why Uncle Chutney says "Big things
> are made up of lots of little things." In a client-server app, this is
> especially true. Small increases or decreases in performance can make a big
> difference when a lot of clients are accessing a web app. Multiply the
> difference in performance by the number of clients, and you can see why.
> There are lots of little things you can do to dramatically increase
> performance. I'll try to hit the big ones.
> 1. In a client-server app, any work done by the client means a big savings
> on the server. The more clients the bigger the savings. Use client-side
> processing and JavaScript whenever possible.
> 2. If your App is written in VB.Net, make sure that Option Strict is turned
> ON! Late-binding is anathema to performance.
> 3. Avoid duplication in your app. Don't duplicate values, and don't
> duplicate code. Any time you see the same few lines of code in several
> places, you're looking at a good candidate for a function or Sub. If you
> have created a number of classes that have the same fields, properties,
> and/or methods, you're looking at a good candidate for a base class, and
> derived classes.
> 4. Avoid using the "drag and drop" tools in the toolbox. Some of them are
> quite useful; others are one-size-fits-all memory hogs for beginners, to
> make it easy for them to make something happen without much trouble.
> 5. Close and/or Dispose any objects that use unmanaged resources as quickly
> as possible.
> 6. Close database connections ASAP.
> On a similar note, it should be stressed that performance is a factor in
> designing your app. The fastest apps have much more lower-level code in
> them, and are also more proprietary overall. Writing an app that is easily
> extensible may involve a trade-off of performance over code maintainability.
> Striking the right balance is an art.
> I'm sure I've overlooked several things, but I do believe I've hit on the
> majors in this list. At any rate, I hope it helps.
> --
> HTH,
> Kevin Spencer
> ..Net Developer
> Microsoft MVP
> I get paid good money to
> solve puzzles for a living
> "Mike" <Mike@.discussions.microsoft.com> wrote in message
> news:1DA19F5F-C332-4818-959F-7881D0D3A61A@.microsoft.com...
> > Lets just say my app is done HOO HOO.
> > Now, I'm accessing the database via a web service and one thing i noticed
> > that my app is running real slow. When I first started working on the app
> is
> > ran pretty quick returned the data to the screens in about 2 - 3 seconds.
> Now
> > its going about 5 - 10 seconds. How can I beef it up for better
> performance.
>
Dim x as string = "99"
Dim y as short = CType(x, Short)
OR
Dim y as short = CShort(x)

You'll use a lot of CType with Option Strict On, but it is worth the extra
effort.

Greg

"Mike" <Mike@.discussions.microsoft.com> wrote in message
news:8AEAF9A6-319B-4298-AC79-2991C3F89A2A@.microsoft.com...
> All good points. Actually all the db connections are closed and all the db
> transactions are being done in the web service. The html(aspx) pages call
> the
> function needed and then i do formatting on the aspx pages, such as the
> datagrids.
> The only question i have it the Option Strict. I turned that ON and when I
> recompiled the project. I got all kinds of errors such as
> Option Strict On Disallows implicit conversions from 'String' to 'Short'
> how do i fix that?
> "Kevin Spencer" wrote:
>> > Lets just say my app is done HOO HOO.
>>
>> I hate it when my app is done HOO HOO. But what are you going to do? Live
>> it
>> or live with it, as the young lady says...
>>
>> ;-)
>>
>> Performance. This is one of the reasons why Uncle Chutney says "Big
>> things
>> are made up of lots of little things." In a client-server app, this is
>> especially true. Small increases or decreases in performance can make a
>> big
>> difference when a lot of clients are accessing a web app. Multiply the
>> difference in performance by the number of clients, and you can see why.
>>
>> There are lots of little things you can do to dramatically increase
>> performance. I'll try to hit the big ones.
>>
>> 1. In a client-server app, any work done by the client means a big
>> savings
>> on the server. The more clients the bigger the savings. Use client-side
>> processing and JavaScript whenever possible.
>> 2. If your App is written in VB.Net, make sure that Option Strict is
>> turned
>> ON! Late-binding is anathema to performance.
>> 3. Avoid duplication in your app. Don't duplicate values, and don't
>> duplicate code. Any time you see the same few lines of code in several
>> places, you're looking at a good candidate for a function or Sub. If you
>> have created a number of classes that have the same fields, properties,
>> and/or methods, you're looking at a good candidate for a base class, and
>> derived classes.
>> 4. Avoid using the "drag and drop" tools in the toolbox. Some of them are
>> quite useful; others are one-size-fits-all memory hogs for beginners, to
>> make it easy for them to make something happen without much trouble.
>> 5. Close and/or Dispose any objects that use unmanaged resources as
>> quickly
>> as possible.
>> 6. Close database connections ASAP.
>>
>> On a similar note, it should be stressed that performance is a factor in
>> designing your app. The fastest apps have much more lower-level code in
>> them, and are also more proprietary overall. Writing an app that is
>> easily
>> extensible may involve a trade-off of performance over code
>> maintainability.
>> Striking the right balance is an art.
>>
>> I'm sure I've overlooked several things, but I do believe I've hit on the
>> majors in this list. At any rate, I hope it helps.
>>
>> --
>> HTH,
>> Kevin Spencer
>> ..Net Developer
>> Microsoft MVP
>> I get paid good money to
>> solve puzzles for a living
>>
>> "Mike" <Mike@.discussions.microsoft.com> wrote in message
>> news:1DA19F5F-C332-4818-959F-7881D0D3A61A@.microsoft.com...
>> > Lets just say my app is done HOO HOO.
>>> > Now, I'm accessing the database via a web service and one thing i
>> > noticed
>> > that my app is running real slow. When I first started working on the
>> > app
>> is
>> > ran pretty quick returned the data to the screens in about 2 - 3
>> > seconds.
>> Now
>> > its going about 5 - 10 seconds. How can I beef it up for better
>> performance.
>>>>
>>
>
That worked on the one error.
Now i'm getting Option Strict On disallows Late binding.
I'm doing some formatting of the datagrids based on certain data that is
returned.

How can i fix that issue now?
I need to format the grids based on the data being returned

"Greg Burns" wrote:

> Dim x as string = "99"
> Dim y as short = CType(x, Short)
> OR
> Dim y as short = CShort(x)
> You'll use a lot of CType with Option Strict On, but it is worth the extra
> effort.
> Greg
> "Mike" <Mike@.discussions.microsoft.com> wrote in message
> news:8AEAF9A6-319B-4298-AC79-2991C3F89A2A@.microsoft.com...
> > All good points. Actually all the db connections are closed and all the db
> > transactions are being done in the web service. The html(aspx) pages call
> > the
> > function needed and then i do formatting on the aspx pages, such as the
> > datagrids.
> > The only question i have it the Option Strict. I turned that ON and when I
> > recompiled the project. I got all kinds of errors such as
> > Option Strict On Disallows implicit conversions from 'String' to 'Short'
> > how do i fix that?
> > "Kevin Spencer" wrote:
> >> > Lets just say my app is done HOO HOO.
> >>
> >> I hate it when my app is done HOO HOO. But what are you going to do? Live
> >> it
> >> or live with it, as the young lady says...
> >>
> >> ;-)
> >>
> >> Performance. This is one of the reasons why Uncle Chutney says "Big
> >> things
> >> are made up of lots of little things." In a client-server app, this is
> >> especially true. Small increases or decreases in performance can make a
> >> big
> >> difference when a lot of clients are accessing a web app. Multiply the
> >> difference in performance by the number of clients, and you can see why.
> >>
> >> There are lots of little things you can do to dramatically increase
> >> performance. I'll try to hit the big ones.
> >>
> >> 1. In a client-server app, any work done by the client means a big
> >> savings
> >> on the server. The more clients the bigger the savings. Use client-side
> >> processing and JavaScript whenever possible.
> >> 2. If your App is written in VB.Net, make sure that Option Strict is
> >> turned
> >> ON! Late-binding is anathema to performance.
> >> 3. Avoid duplication in your app. Don't duplicate values, and don't
> >> duplicate code. Any time you see the same few lines of code in several
> >> places, you're looking at a good candidate for a function or Sub. If you
> >> have created a number of classes that have the same fields, properties,
> >> and/or methods, you're looking at a good candidate for a base class, and
> >> derived classes.
> >> 4. Avoid using the "drag and drop" tools in the toolbox. Some of them are
> >> quite useful; others are one-size-fits-all memory hogs for beginners, to
> >> make it easy for them to make something happen without much trouble.
> >> 5. Close and/or Dispose any objects that use unmanaged resources as
> >> quickly
> >> as possible.
> >> 6. Close database connections ASAP.
> >>
> >> On a similar note, it should be stressed that performance is a factor in
> >> designing your app. The fastest apps have much more lower-level code in
> >> them, and are also more proprietary overall. Writing an app that is
> >> easily
> >> extensible may involve a trade-off of performance over code
> >> maintainability.
> >> Striking the right balance is an art.
> >>
> >> I'm sure I've overlooked several things, but I do believe I've hit on the
> >> majors in this list. At any rate, I hope it helps.
> >>
> >> --
> >> HTH,
> >> Kevin Spencer
> >> ..Net Developer
> >> Microsoft MVP
> >> I get paid good money to
> >> solve puzzles for a living
> >>
> >> "Mike" <Mike@.discussions.microsoft.com> wrote in message
> >> news:1DA19F5F-C332-4818-959F-7881D0D3A61A@.microsoft.com...
> >> > Lets just say my app is done HOO HOO.
> >> >> > Now, I'm accessing the database via a web service and one thing i
> >> > noticed
> >> > that my app is running real slow. When I first started working on the
> >> > app
> >> is
> >> > ran pretty quick returned the data to the screens in about 2 - 3
> >> > seconds.
> >> Now
> >> > its going about 5 - 10 seconds. How can I beef it up for better
> >> performance.
> >> >> >>
> >>
> >>
>
Hi Mike,

> The only question i have it the Option Strict. I turned that ON and when I
> recompiled the project. I got all kinds of errors such as

Awesome! Sounds like you're coming from a VB background. Option Strict
ensures that you use correct data types in your code. The difference between
late and early binding is that Late Binding means that your app explicitly
declares data types, and doesn't mix and match them. This way, the app
already knows at run-time how much memory to allocate for each object. When
late-binding is used, the data type of an object may NOT be known at
run-time, and the Platform has to figure out how much memory to allocate by
calculation, which often involves the use of Reflection. It can slow your
app down quite a bit.

The errors can be fixed by going through your code, and making sure that you
explicitly declare the correct data type for each field, property, or
variable that you are using. Also, avoid the use of the "Object" data type.
Object is the base class for ALL data types, and is therefore a
"late-binding class." So, for example, here is a field and Property declared
with no Data Types:

Private _DayOfWeek = 1
Public Property DayofWeek
Get
Return _DayOfWeek
End Get
Set (ByVal Value)
_DayOfWeek = Value
End Set
End Property

Using this (Option Strinct OFF), you could assign a TexBox value (always a
string) to DayOfWeek, and it would compile fine. At run-time, the String
would have to be converted to a number by the Platform.

Instead, you would put (Option Strict ON):

Private _DayOfWeek As Short = 1
Public Property DayofWeek As Short
Get
Return _DayOfWeek
End Get
Set (ByVal Value As Short)
_DayOfWeek = Value
End Set
End Property

Your code will compile fine, as long as nothing in your code tries to assign
a String to DayOfWeek. You will get a "Data Type Mismatch" error if you do.

As I'm sure you can see, this also prevents a lot of errors (assigning a
non-numeric string to be used as a Short, for example), as well as informing
the Platform to allocate 16 Bits for _DayOfWeek.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
I get paid good money to
solve puzzles for a living

"Mike" <Mike@.discussions.microsoft.com> wrote in message
news:8AEAF9A6-319B-4298-AC79-2991C3F89A2A@.microsoft.com...
> All good points. Actually all the db connections are closed and all the db
> transactions are being done in the web service. The html(aspx) pages call
the
> function needed and then i do formatting on the aspx pages, such as the
> datagrids.
> The only question i have it the Option Strict. I turned that ON and when I
> recompiled the project. I got all kinds of errors such as
> Option Strict On Disallows implicit conversions from 'String' to 'Short'
> how do i fix that?
> "Kevin Spencer" wrote:
> > > Lets just say my app is done HOO HOO.
> > I hate it when my app is done HOO HOO. But what are you going to do?
Live it
> > or live with it, as the young lady says...
> > ;-)
> > Performance. This is one of the reasons why Uncle Chutney says "Big
things
> > are made up of lots of little things." In a client-server app, this is
> > especially true. Small increases or decreases in performance can make a
big
> > difference when a lot of clients are accessing a web app. Multiply the
> > difference in performance by the number of clients, and you can see why.
> > There are lots of little things you can do to dramatically increase
> > performance. I'll try to hit the big ones.
> > 1. In a client-server app, any work done by the client means a big
savings
> > on the server. The more clients the bigger the savings. Use client-side
> > processing and JavaScript whenever possible.
> > 2. If your App is written in VB.Net, make sure that Option Strict is
turned
> > ON! Late-binding is anathema to performance.
> > 3. Avoid duplication in your app. Don't duplicate values, and don't
> > duplicate code. Any time you see the same few lines of code in several
> > places, you're looking at a good candidate for a function or Sub. If you
> > have created a number of classes that have the same fields, properties,
> > and/or methods, you're looking at a good candidate for a base class, and
> > derived classes.
> > 4. Avoid using the "drag and drop" tools in the toolbox. Some of them
are
> > quite useful; others are one-size-fits-all memory hogs for beginners, to
> > make it easy for them to make something happen without much trouble.
> > 5. Close and/or Dispose any objects that use unmanaged resources as
quickly
> > as possible.
> > 6. Close database connections ASAP.
> > On a similar note, it should be stressed that performance is a factor in
> > designing your app. The fastest apps have much more lower-level code in
> > them, and are also more proprietary overall. Writing an app that is
easily
> > extensible may involve a trade-off of performance over code
maintainability.
> > Striking the right balance is an art.
> > I'm sure I've overlooked several things, but I do believe I've hit on
the
> > majors in this list. At any rate, I hope it helps.
> > --
> > HTH,
> > Kevin Spencer
> > ..Net Developer
> > Microsoft MVP
> > I get paid good money to
> > solve puzzles for a living
> > "Mike" <Mike@.discussions.microsoft.com> wrote in message
> > news:1DA19F5F-C332-4818-959F-7881D0D3A61A@.microsoft.com...
> > > Lets just say my app is done HOO HOO.
> > > > Now, I'm accessing the database via a web service and one thing i
noticed
> > > that my app is running real slow. When I first started working on the
app
> > is
> > > ran pretty quick returned the data to the screens in about 2 - 3
seconds.
> > Now
> > > its going about 5 - 10 seconds. How can I beef it up for better
> > performance.
> >
Please post some code.

Greg

"Mike" <Mike@.discussions.microsoft.com> wrote in message
news:24DE9539-DB6D-446D-A5BA-E7B6E4A19960@.microsoft.com...
> That worked on the one error.
> Now i'm getting Option Strict On disallows Late binding.
> I'm doing some formatting of the datagrids based on certain data that is
> returned.
> How can i fix that issue now?
> I need to format the grids based on the data being returned
> "Greg Burns" wrote:
>> Dim x as string = "99"
>> Dim y as short = CType(x, Short)
>> OR
>> Dim y as short = CShort(x)
>>
>> You'll use a lot of CType with Option Strict On, but it is worth the
>> extra
>> effort.
>>
>> Greg
>>
>> "Mike" <Mike@.discussions.microsoft.com> wrote in message
>> news:8AEAF9A6-319B-4298-AC79-2991C3F89A2A@.microsoft.com...
>> > All good points. Actually all the db connections are closed and all the
>> > db
>> > transactions are being done in the web service. The html(aspx) pages
>> > call
>> > the
>> > function needed and then i do formatting on the aspx pages, such as the
>> > datagrids.
>> > The only question i have it the Option Strict. I turned that ON and
>> > when I
>> > recompiled the project. I got all kinds of errors such as
>>> > Option Strict On Disallows implicit conversions from 'String' to
>> > 'Short'
>>> > how do i fix that?
>>> > "Kevin Spencer" wrote:
>>> >> > Lets just say my app is done HOO HOO.
>> >>
>> >> I hate it when my app is done HOO HOO. But what are you going to do?
>> >> Live
>> >> it
>> >> or live with it, as the young lady says...
>> >>
>> >> ;-)
>> >>
>> >> Performance. This is one of the reasons why Uncle Chutney says "Big
>> >> things
>> >> are made up of lots of little things." In a client-server app, this is
>> >> especially true. Small increases or decreases in performance can make
>> >> a
>> >> big
>> >> difference when a lot of clients are accessing a web app. Multiply the
>> >> difference in performance by the number of clients, and you can see
>> >> why.
>> >>
>> >> There are lots of little things you can do to dramatically increase
>> >> performance. I'll try to hit the big ones.
>> >>
>> >> 1. In a client-server app, any work done by the client means a big
>> >> savings
>> >> on the server. The more clients the bigger the savings. Use
>> >> client-side
>> >> processing and JavaScript whenever possible.
>> >> 2. If your App is written in VB.Net, make sure that Option Strict is
>> >> turned
>> >> ON! Late-binding is anathema to performance.
>> >> 3. Avoid duplication in your app. Don't duplicate values, and don't
>> >> duplicate code. Any time you see the same few lines of code in several
>> >> places, you're looking at a good candidate for a function or Sub. If
>> >> you
>> >> have created a number of classes that have the same fields,
>> >> properties,
>> >> and/or methods, you're looking at a good candidate for a base class,
>> >> and
>> >> derived classes.
>> >> 4. Avoid using the "drag and drop" tools in the toolbox. Some of them
>> >> are
>> >> quite useful; others are one-size-fits-all memory hogs for beginners,
>> >> to
>> >> make it easy for them to make something happen without much trouble.
>> >> 5. Close and/or Dispose any objects that use unmanaged resources as
>> >> quickly
>> >> as possible.
>> >> 6. Close database connections ASAP.
>> >>
>> >> On a similar note, it should be stressed that performance is a factor
>> >> in
>> >> designing your app. The fastest apps have much more lower-level code
>> >> in
>> >> them, and are also more proprietary overall. Writing an app that is
>> >> easily
>> >> extensible may involve a trade-off of performance over code
>> >> maintainability.
>> >> Striking the right balance is an art.
>> >>
>> >> I'm sure I've overlooked several things, but I do believe I've hit on
>> >> the
>> >> majors in this list. At any rate, I hope it helps.
>> >>
>> >> --
>> >> HTH,
>> >> Kevin Spencer
>> >> ..Net Developer
>> >> Microsoft MVP
>> >> I get paid good money to
>> >> solve puzzles for a living
>> >>
>> >> "Mike" <Mike@.discussions.microsoft.com> wrote in message
>> >> news:1DA19F5F-C332-4818-959F-7881D0D3A61A@.microsoft.com...
>> >> > Lets just say my app is done HOO HOO.
>> >>> >> > Now, I'm accessing the database via a web service and one thing i
>> >> > noticed
>> >> > that my app is running real slow. When I first started working on
>> >> > the
>> >> > app
>> >> is
>> >> > ran pretty quick returned the data to the screens in about 2 - 3
>> >> > seconds.
>> >> Now
>> >> > its going about 5 - 10 seconds. How can I beef it up for better
>> >> performance.
>> >>> >>> >>
>> >>
>> >>
>>
>>
>

performance question

Lets just say my app is done HOO HOO.
Now, I'm accessing the database via a web service and one thing i noticed
that my app is running real slow. When I first started working on the app is
ran pretty quick returned the data to the screens in about 2 - 3 seconds. No
w
its going about 5 - 10 seconds. How can I beef it up for better performance.> Lets just say my app is done HOO HOO.
I hate it when my app is done HOO HOO. But what are you going to do? Live it
or live with it, as the young lady says...
;-)
Performance. This is one of the reasons why Uncle Chutney says "Big things
are made up of lots of little things." In a client-server app, this is
especially true. Small increases or decreases in performance can make a big
difference when a lot of clients are accessing a web app. Multiply the
difference in performance by the number of clients, and you can see why.
There are lots of little things you can do to dramatically increase
performance. I'll try to hit the big ones.
1. In a client-server app, any work done by the client means a big savings
on the server. The more clients the bigger the savings. Use client-side
processing and JavaScript whenever possible.
2. If your App is written in VB.Net, make sure that Option Strict is turned
ON! Late-binding is anathema to performance.
3. Avoid duplication in your app. Don't duplicate values, and don't
duplicate code. Any time you see the same few lines of code in several
places, you're looking at a good candidate for a function or Sub. If you
have created a number of classes that have the same fields, properties,
and/or methods, you're looking at a good candidate for a base class, and
derived classes.
4. Avoid using the "drag and drop" tools in the toolbox. Some of them are
quite useful; others are one-size-fits-all memory hogs for beginners, to
make it easy for them to make something happen without much trouble.
5. Close and/or Dispose any objects that use unmanaged resources as quickly
as possible.
6. Close database connections ASAP.
On a similar note, it should be stressed that performance is a factor in
designing your app. The fastest apps have much more lower-level code in
them, and are also more proprietary overall. Writing an app that is easily
extensible may involve a trade-off of performance over code maintainability.
Striking the right balance is an art.
I'm sure I've overlooked several things, but I do believe I've hit on the
majors in this list. At any rate, I hope it helps.
HTH,
Kevin Spencer
.Net Developer
Microsoft MVP
I get paid good money to
solve puzzles for a living
"Mike" <Mike@.discussions.microsoft.com> wrote in message
news:1DA19F5F-C332-4818-959F-7881D0D3A61A@.microsoft.com...
> Lets just say my app is done HOO HOO.
> Now, I'm accessing the database via a web service and one thing i noticed
> that my app is running real slow. When I first started working on the app
is
> ran pretty quick returned the data to the screens in about 2 - 3 seconds.
Now
> its going about 5 - 10 seconds. How can I beef it up for better
performance.
>
All good points. Actually all the db connections are closed and all the db
transactions are being done in the web service. The html(aspx) pages call th
e
function needed and then i do formatting on the aspx pages, such as the
datagrids.
The only question i have it the Option Strict. I turned that ON and when I
recompiled the project. I got all kinds of errors such as
Option Strict On Disallows implicit conversions from 'String' to 'Short'
how do i fix that?
"Kevin Spencer" wrote:

> I hate it when my app is done HOO HOO. But what are you going to do? Live
it
> or live with it, as the young lady says...
> ;-)
> Performance. This is one of the reasons why Uncle Chutney says "Big things
> are made up of lots of little things." In a client-server app, this is
> especially true. Small increases or decreases in performance can make a bi
g
> difference when a lot of clients are accessing a web app. Multiply the
> difference in performance by the number of clients, and you can see why.
> There are lots of little things you can do to dramatically increase
> performance. I'll try to hit the big ones.
> 1. In a client-server app, any work done by the client means a big savings
> on the server. The more clients the bigger the savings. Use client-side
> processing and JavaScript whenever possible.
> 2. If your App is written in VB.Net, make sure that Option Strict is turne
d
> ON! Late-binding is anathema to performance.
> 3. Avoid duplication in your app. Don't duplicate values, and don't
> duplicate code. Any time you see the same few lines of code in several
> places, you're looking at a good candidate for a function or Sub. If you
> have created a number of classes that have the same fields, properties,
> and/or methods, you're looking at a good candidate for a base class, and
> derived classes.
> 4. Avoid using the "drag and drop" tools in the toolbox. Some of them are
> quite useful; others are one-size-fits-all memory hogs for beginners, to
> make it easy for them to make something happen without much trouble.
> 5. Close and/or Dispose any objects that use unmanaged resources as quickl
y
> as possible.
> 6. Close database connections ASAP.
> On a similar note, it should be stressed that performance is a factor in
> designing your app. The fastest apps have much more lower-level code in
> them, and are also more proprietary overall. Writing an app that is easily
> extensible may involve a trade-off of performance over code maintainabilit
y.
> Striking the right balance is an art.
> I'm sure I've overlooked several things, but I do believe I've hit on the
> majors in this list. At any rate, I hope it helps.
> --
> HTH,
> Kevin Spencer
> ..Net Developer
> Microsoft MVP
> I get paid good money to
> solve puzzles for a living
> "Mike" <Mike@.discussions.microsoft.com> wrote in message
> news:1DA19F5F-C332-4818-959F-7881D0D3A61A@.microsoft.com...
> is
> Now
> performance.
>
>
Dim x as string = "99"
Dim y as short = CType(x, Short)
OR
Dim y as short = CShort(x)
You'll use a lot of CType with Option Strict On, but it is worth the extra
effort.
Greg
"Mike" <Mike@.discussions.microsoft.com> wrote in message
news:8AEAF9A6-319B-4298-AC79-2991C3F89A2A@.microsoft.com...
> All good points. Actually all the db connections are closed and all the db
> transactions are being done in the web service. The html(aspx) pages call
> the
> function needed and then i do formatting on the aspx pages, such as the
> datagrids.
> The only question i have it the Option Strict. I turned that ON and when I
> recompiled the project. I got all kinds of errors such as
> Option Strict On Disallows implicit conversions from 'String' to 'Short'
> how do i fix that?
> "Kevin Spencer" wrote:
>
That worked on the one error.
Now i'm getting Option Strict On disallows Late binding.
I'm doing some formatting of the datagrids based on certain data that is
returned.
How can i fix that issue now?
I need to format the grids based on the data being returned
"Greg Burns" wrote:

> Dim x as string = "99"
> Dim y as short = CType(x, Short)
> OR
> Dim y as short = CShort(x)
> You'll use a lot of CType with Option Strict On, but it is worth the extra
> effort.
> Greg
> "Mike" <Mike@.discussions.microsoft.com> wrote in message
> news:8AEAF9A6-319B-4298-AC79-2991C3F89A2A@.microsoft.com...
>
>
Hi Mike,

> The only question i have it the Option Strict. I turned that ON and when I
> recompiled the project. I got all kinds of errors such as
Awesome! Sounds like you're coming from a VB background. Option Strict
ensures that you use correct data types in your code. The difference between
late and early binding is that Late Binding means that your app explicitly
declares data types, and doesn't mix and match them. This way, the app
already knows at run-time how much memory to allocate for each object. When
late-binding is used, the data type of an object may NOT be known at
run-time, and the Platform has to figure out how much memory to allocate by
calculation, which often involves the use of Reflection. It can slow your
app down quite a bit.
The errors can be fixed by going through your code, and making sure that you
explicitly declare the correct data type for each field, property, or
variable that you are using. Also, avoid the use of the "Object" data type.
Object is the base class for ALL data types, and is therefore a
"late-binding class." So, for example, here is a field and Property declared
with no Data Types:
Private _DayOfW = 1
Public Property DayofW
Get
Return _DayOfW
End Get
Set (ByVal Value)
_DayOfW = Value
End Set
End Property
Using this (Option Strinct OFF), you could assign a TexBox value (always a
string) to DayOfW, and it would compile fine. At run-time, the String
would have to be converted to a number by the Platform.
Instead, you would put (Option Strict ON):
Private _DayOfW As Short = 1
Public Property DayofW As Short
Get
Return _DayOfW
End Get
Set (ByVal Value As Short)
_DayOfW = Value
End Set
End Property
Your code will compile fine, as long as nothing in your code tries to assign
a String to DayOfW. You will get a "Data Type Mismatch" error if you do.
As I'm sure you can see, this also prevents a lot of errors (assigning a
non-numeric string to be used as a Short, for example), as well as informing
the Platform to allocate 16 Bits for _DayOfW.
HTH,
Kevin Spencer
.Net Developer
Microsoft MVP
I get paid good money to
solve puzzles for a living
"Mike" <Mike@.discussions.microsoft.com> wrote in message
news:8AEAF9A6-319B-4298-AC79-2991C3F89A2A@.microsoft.com...
> All good points. Actually all the db connections are closed and all the db
> transactions are being done in the web service. The html(aspx) pages call
the
> function needed and then i do formatting on the aspx pages, such as the
> datagrids.
> The only question i have it the Option Strict. I turned that ON and when I
> recompiled the project. I got all kinds of errors such as
> Option Strict On Disallows implicit conversions from 'String' to 'Short'
> how do i fix that?
> "Kevin Spencer" wrote:
>
Live it
things
big
savings
turned
are
quickly
easily
maintainability.
the
noticed
app
seconds.
Please post some code.
Greg
"Mike" <Mike@.discussions.microsoft.com> wrote in message
news:24DE9539-DB6D-446D-A5BA-E7B6E4A19960@.microsoft.com...
> That worked on the one error.
> Now i'm getting Option Strict On disallows Late binding.
> I'm doing some formatting of the datagrids based on certain data that is
> returned.
> How can i fix that issue now?
> I need to format the grids based on the data being returned
> "Greg Burns" wrote:
>

Performance questions

Hi;

Got a couple of performance questions.

1) My app is pre-compiled but when I bounce IIS and then go to a page for
the first time, it takes a couple of seconds to get that page. Subsequent
hits are fast. Why?

2) Even after hitting all pages involved, if I logout and then go to login
again - it takes 5 - 10 seconds. The login page uses the standard login
control and the ASP.NET membership classes so it's not my code at all. Any
ideas why it's slow?

3) I put Trace.Write("enter FindAllGlobal"); in my non ASP code so it's
using System.Diagnostics.Trace. This does not show up in the trace.axd
details at all. How can I get that in there too?

--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com
Cubicle Wars - http://www.windwardreports.com/film.htmHi Dave,

Regarding on the question you mentioned, here are some of my understanding:

1) My app is pre-compiled but when I bounce IIS and then go to a page for
the first time, it takes a couple of seconds to get that page. Subsequent
hits are fast. Why?
==========================
How did you precompile your web application, full mode(non-updatable) or
partial mode(updatable)? For partial precompile, the ASP.NET runtime still
need to do a slim precompile to merge the aspx and the class in the
pregenerated assembly. Also, even if you fully precompile the site, you
should still take the JIT compile into account.

2) Even after hitting all pages involved, if I logout and then go to login
again - it takes 5 - 10 seconds. The login page uses the standard login
control and the ASP.NET membership classes so it's not my code at all. Any
ideas why it's slow?
==============================
This seems a bit unexpected. Can you repro the behavior through a very
simple forms authentication secured web project?

3) I put Trace.Write("enter FindAllGlobal"); in my non ASP code so it's
using System.Diagnostics.Trace. This does not show up in the trace.axd
details at all. How can I get that in there too?
============================

..NET framework 2.0 does provide means for you to do redirection between
"Diagnostics Trace" and ASP.NET Trace. Here is a good web article mentioned
the steps to do so:

#Tracing Enhancements in ASP.NET 2.0
http://www.extremeexperts.com/Net/A...sinASPNET2.aspx
Hope this helps.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

==================================================

Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscript...ault.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscript...rt/default.aspx.

==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.
Hi;

1) I use WebDeployment and have it set to "NOT allow to be updatable",
"merge all pages and control outputs to a single assembly", APTCA. Should
this take time to run the first time? And if so, is there a way in IIS to
tell it to load and JIT compile everything?

2) I will try to create a sample.

3) perfect - thanks

--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com
Cubicle Wars - http://www.windwardreports.com/film.htm
"Steven Cheng[MSFT]" wrote:

Quote:

Originally Posted by

Hi Dave,
>
Regarding on the question you mentioned, here are some of my understanding:
>
1) My app is pre-compiled but when I bounce IIS and then go to a page for
the first time, it takes a couple of seconds to get that page. Subsequent
hits are fast. Why?
==========================
How did you precompile your web application, full mode(non-updatable) or
partial mode(updatable)? For partial precompile, the ASP.NET runtime still
need to do a slim precompile to merge the aspx and the class in the
pregenerated assembly. Also, even if you fully precompile the site, you
should still take the JIT compile into account.
>
>
2) Even after hitting all pages involved, if I logout and then go to login
again - it takes 5 - 10 seconds. The login page uses the standard login
control and the ASP.NET membership classes so it's not my code at all. Any
ideas why it's slow?
==============================
This seems a bit unexpected. Can you repro the behavior through a very
simple forms authentication secured web project?
>
>
>
3) I put Trace.Write("enter FindAllGlobal"); in my non ASP code so it's
using System.Diagnostics.Trace. This does not show up in the trace.axd
details at all. How can I get that in there too?
============================
>
.NET framework 2.0 does provide means for you to do redirection between
"Diagnostics Trace" and ASP.NET Trace. Here is a good web article mentioned
the steps to do so:
>
#Tracing Enhancements in ASP.NET 2.0
http://www.extremeexperts.com/Net/A...sinASPNET2.aspx
>
Hope this helps.
>
Sincerely,
>
Steven Cheng
>
Microsoft MSDN Online Support Lead
>
>
>
==================================================
>
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscript...ault.aspx#notif
ications.
>
>
>
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscript...rt/default.aspx.
>
==================================================
>
>
>
This posting is provided "AS IS" with no warranties, and confers no rights.
>
>
>
>
>
>
>
>
>


Thanks for your reply Dave,

there is no built-in means to make the entire ASP.NET site JIT compiled,
you may need to programmatically visit all those pages so as to make them
JIT compiled. For the "merge all pages and control outputs to a single
assembly", I dont think this is the cause of the slow performance.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

This posting is provided "AS IS" with no warranties, and confers no rights.
Hi Dave,

Any further progress on this issue? Please feel free to post here if there
is anything else we can help.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

This posting is provided "AS IS" with no warranties, and confers no rights.

Performance questions

Hi

I have 2 different sites with the same aspnet code.
Both are running in their own app pool.

1st one is the important site and performance for this one is more important
than the second one.
Of course in the codes I have some customization routines.

One of those routine shows and assigns url for a hyperlink.
For the important (high traffic) site (site 1) I need to show that link and
for the 2nd site I need to hide that link.

Now the question is:
Should I make this hyperlink visible from the HTML part which will be
suitable for site 1 and hide it from codebehind in the second site?
Is there any performance difference doing the vise versa?

The following is the code I have now:
if (Site1)
{
hyperlink.NavigateUrl = "Default.aspx";
}
else
{
hyperlink.Visible = false;
}

However the following code looks nicer but will it give any performance hit
to site 1?
if (Site1)
{
hyperlink.NavigateUrl = "Default.aspx";
hyperlink.Visible = true;
}

Looking forward for your advise.
--

SevDer
http://www.sevder.com
A new source for .NET DevelopersI don't think this is kind of code would be the performance bottleneck.
Typically it is either related to database access, or complicated
calculations or processing in the code. Setting one property on a hyperlink
isn't going to make a difference.

"SevDer" <sevder@.newsgroup.nospamwrote in message
news:etavoPztGHA.4752@.TK2MSFTNGP03.phx.gbl...

Quote:

Originally Posted by

Hi
>
I have 2 different sites with the same aspnet code.
Both are running in their own app pool.
>
1st one is the important site and performance for this one is more
important than the second one.
Of course in the codes I have some customization routines.
>
One of those routine shows and assigns url for a hyperlink.
For the important (high traffic) site (site 1) I need to show that link
and for the 2nd site I need to hide that link.
>
Now the question is:
Should I make this hyperlink visible from the HTML part which will be
suitable for site 1 and hide it from codebehind in the second site?
Is there any performance difference doing the vise versa?
>
The following is the code I have now:
if (Site1)
{
hyperlink.NavigateUrl = "Default.aspx";
}
else
{
hyperlink.Visible = false;
}
>
However the following code looks nicer but will it give any performance
hit to site 1?
if (Site1)
{
hyperlink.NavigateUrl = "Default.aspx";
hyperlink.Visible = true;
}
>
Looking forward for your advise.
--
>
SevDer
http://www.sevder.com
A new source for .NET Developers
>
>
>


I don't think that either of these options will have much of an effect on performance... how often is this code called?

--
Greg Collins [Microsoft MVP]
Visit Brain Trove ( http://www.BrainTrove.com )
Hi,

I don't really have a problem with the performance and the difference
between them is may be 1/10000000 but I just want to know which one is
faster.
May be in the future this information may help me on 100 show or hide items
in one page where there are tremendous amount of hits to that page.

--

SevDer
http://www.sevder.com
A new source for .NET Developers

"Greg Collins [Microsoft MVP]" <gcollins_AT_msn_DOT_comwrote in message
news:%23Ydm2TztGHA.4456@.TK2MSFTNGP06.phx.gbl...
I don't think that either of these options will have much of an effect on
performance... how often is this code called?

--
Greg Collins [Microsoft MVP]
Visit Brain Trove ( http://www.BrainTrove.com )
Well, if you have to set 2 properties instead of 1, then setting 2 will take
longer.

But even with 100 of these controls, you aren't going to see a difference.
This is just changing a variable in an object. That variable is used when
it's time to generate the corresponding HTML. But by setting the property,
you are just changing some local variable to the object.

Again, unless you have tens of thousands of these, this isn't going to make
a difference. I would focus on more likely bottlenecks in terms of
performance.

"SevDer" <sevder@.newsgroup.nospamwrote in message
news:%23jry6iztGHA.4752@.TK2MSFTNGP02.phx.gbl...

Quote:

Originally Posted by

Hi,
>
I don't really have a problem with the performance and the difference
between them is may be 1/10000000 but I just want to know which one is
faster.
May be in the future this information may help me on 100 show or hide
items in one page where there are tremendous amount of hits to that page.
>
--
>
SevDer
http://www.sevder.com
A new source for .NET Developers
>
>
"Greg Collins [Microsoft MVP]" <gcollins_AT_msn_DOT_comwrote in message
news:%23Ydm2TztGHA.4456@.TK2MSFTNGP06.phx.gbl...
I don't think that either of these options will have much of an effect on
performance... how often is this code called?
>
--
Greg Collins [Microsoft MVP]
Visit Brain Trove ( http://www.BrainTrove.com )
>
>
>

Performance questions

Hi;
Got a couple of performance questions.
1) My app is pre-compiled but when I bounce IIS and then go to a page for
the first time, it takes a couple of seconds to get that page. Subsequent
hits are fast. Why?
2) Even after hitting all pages involved, if I logout and then go to login
again - it takes 5 - 10 seconds. The login page uses the standard login
control and the ASP.NET membership classes so it's not my code at all. Any
ideas why it's slow?
3) I put Trace.Write("enter FindAllGlobal"); in my non ASP code so it's
using System.Diagnostics.Trace. This does not show up in the trace.axd
details at all. How can I get that in there too?
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com
Cubicle Wars - http://www.windwardreports.com/film.htmHi Dave,
Regarding on the question you mentioned, here are some of my understanding:
1) My app is pre-compiled but when I bounce IIS and then go to a page for
the first time, it takes a couple of seconds to get that page. Subsequent
hits are fast. Why?
==========================
How did you precompile your web application, full mode(non-updatable) or
partial mode(updatable)? For partial precompile, the ASP.NET runtime still
need to do a slim precompile to merge the aspx and the class in the
pregenerated assembly. Also, even if you fully precompile the site, you
should still take the JIT compile into account.
2) Even after hitting all pages involved, if I logout and then go to login
again - it takes 5 - 10 seconds. The login page uses the standard login
control and the ASP.NET membership classes so it's not my code at all. Any
ideas why it's slow?
==============================
This seems a bit unexpected. Can you repro the behavior through a very
simple forms authentication secured web project?
3) I put Trace.Write("enter FindAllGlobal"); in my non ASP code so it's
using System.Diagnostics.Trace. This does not show up in the trace.axd
details at all. How can I get that in there too?
============================
NET framework 2.0 does provide means for you to do redirection between
"Diagnostics Trace" and ASP.NET Trace. Here is a good web article mentioned
the steps to do so:
#Tracing Enhancements in ASP.NET 2.0
http://www.extremeexperts.com/Net/A...sinASPNET2.aspx
Hope this helps.
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
========================================
==========
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscript...ault.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscript...t/default.aspx.
========================================
==========
This posting is provided "AS IS" with no warranties, and confers no rights.
Hi;
1) I use WebDeployment and have it set to "NOT allow to be updatable",
"merge all pages and control outputs to a single assembly", APTCA. Should
this take time to run the first time? And if so, is there a way in IIS to
tell it to load and JIT compile everything?
2) I will try to create a sample.
3) perfect - thanks
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com
Cubicle Wars - http://www.windwardreports.com/film.htm
"Steven Cheng[MSFT]" wrote:

> Hi Dave,
> Regarding on the question you mentioned, here are some of my understanding
:
> 1) My app is pre-compiled but when I bounce IIS and then go to a page for
> the first time, it takes a couple of seconds to get that page. Subsequent
> hits are fast. Why?
> ==========================
> How did you precompile your web application, full mode(non-updatable) or
> partial mode(updatable)? For partial precompile, the ASP.NET runtime still
> need to do a slim precompile to merge the aspx and the class in the
> pregenerated assembly. Also, even if you fully precompile the site, you
> should still take the JIT compile into account.
>
> 2) Even after hitting all pages involved, if I logout and then go to login
> again - it takes 5 - 10 seconds. The login page uses the standard login
> control and the ASP.NET membership classes so it's not my code at all. Any
> ideas why it's slow?
> ==============================
> This seems a bit unexpected. Can you repro the behavior through a very
> simple forms authentication secured web project?
>
> 3) I put Trace.Write("enter FindAllGlobal"); in my non ASP code so it's
> using System.Diagnostics.Trace. This does not show up in the trace.axd
> details at all. How can I get that in there too?
> ============================
> .NET framework 2.0 does provide means for you to do redirection between
> "Diagnostics Trace" and ASP.NET Trace. Here is a good web article mentione
d
> the steps to do so:
> #Tracing Enhancements in ASP.NET 2.0
> l]
> ications.
>
> Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
> where an initial response from the community or a Microsoft Support
> Engineer within 1 business day is acceptable. Please note that each follow
> up response may take approximately 2 business days as the support
> professional working with you may need further investigation to reach the
> most efficient resolution. The offering is not appropriate for situations
> that require urgent, real-time or phone-based interactions or complex
> project analysis and dump analysis issues. Issues of this nature are best
> handled working with a dedicated Microsoft Support Engineer by contacting
> Microsoft Customer Support Services (CSS) at
> [url]http://msdn.microsoft.com/subscriptions/support/default.aspx." target="_blank">http://www.extremeexperts.com/Net/A...t/default.aspx.
> ========================================
==========
>
> This posting is provided "AS IS" with no warranties, and confers no rights
.
>
>
>
>
>
Thanks for your reply Dave,
there is no built-in means to make the entire ASP.NET site JIT compiled,
you may need to programmatically visit all those pages so as to make them
JIT compiled. For the "merge all pages and control outputs to a single
assembly", I dont think this is the cause of the slow performance.
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.
Hi Dave,
Any further progress on this issue? Please feel free to post here if there
is anything else we can help.
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.

Monday, March 26, 2012

Performance tweak

Hello all,
I've been doing some performance analysis on our app, and I've discovered
that the below code is quite a bottle neck:
this.OnFillParameters(selectCommand);
SqlDataAdapter selectAdapter = new SqlDataAdapter(selectCommand);
try
{
selectAdapter.Fill(resultsDataSet);
....
Does anyone have any suggestions/pointers on how this could be improved.
Any comments welcomed.
Thanks,
JYhi,
sorry what do you mean by bottle neck?
Jon wrote:
> Hello all,
> I've been doing some performance analysis on our app, and I've discovered
> that the below code is quite a bottle neck:
> this.OnFillParameters(selectCommand);
> SqlDataAdapter selectAdapter = new SqlDataAdapter(selectCommand);
> try
> {
> selectAdapter.Fill(resultsDataSet);
> ....
>
> Does anyone have any suggestions/pointers on how this could be improved.
> Any comments welcomed.
> Thanks,
> JY
Hi,
My apologies, I shouldn't use local terms on international forums! :)
By bottle next I mean an area of the application that is the slowest.
Thanks,
Jon
"Varangian" wrote:

> hi,
> sorry what do you mean by bottle neck?
>
> Jon wrote:
>
Hi Jon,
BottleNeck is a common technical term, so don't sweat it!
You've got some pretty simple code there. How many records does it fetch?
HTH,
Kevin Spencer
Microsoft MVP
Software Composer
http://unclechutney.blogspot.com
If the Truth hurts, wear it.
"Jon" <Jon@.discussions.microsoft.com> wrote in message
news:23D239C3-8A52-45ED-B123-951CB9881745@.microsoft.com...
> Hi,
> My apologies, I shouldn't use local terms on international forums! :)
> By bottle next I mean an area of the application that is the slowest.
> Thanks,
> Jon
> "Varangian" wrote:
>
Unless you're calling that code inside a loop, I can't see that it's
going to cause performance problems. You can always use a SqlDataReader
directly if you want the fastest access to your data but, in all
likelyhood, the performance problem lies with your database query.
Jon wrote:
> Hi,
> My apologies, I shouldn't use local terms on international forums! :)
> By bottle next I mean an area of the application that is the slowest.
> Thanks,
> Jon
> "Varangian" wrote:
>
Hi Kevin and thanks for the reply.
The SP returns varying amounts of data, but even for say 100 records, it's
slow. I do know that the Database and SP's need to be looked at, for example
,
if 1 SP returns 10 rows, it then fires off 10 SP's passing in the values fro
m
the first SP (you get the idea!).
But I'd prefer to start with the C# code, as it's less of a beast, and more
my domain. The DB has other issues, I'm really just trying to quel the fire
so to speak.
I was thinking of using the MS DAB, not the June 2005 release. Would that be
better? I'm really just looking for some advice / help.
Thanks again,
Jon
"Kevin Spencer" wrote:

> Hi Jon,
> BottleNeck is a common technical term, so don't sweat it!
> You've got some pretty simple code there. How many records does it fetch?
> --
> HTH,
> Kevin Spencer
> Microsoft MVP
> Software Composer
> http://unclechutney.blogspot.com
> If the Truth hurts, wear it.
> "Jon" <Jon@.discussions.microsoft.com> wrote in message
> news:23D239C3-8A52-45ED-B123-951CB9881745@.microsoft.com...
>
>
The first thing you should do, if you can, is look at the execution of
your procedure in Sql Query Analyzer and see how much of the time spent
in that block is accounted for by SQL server. Without knowing the
numbers, you can't optimise usefully.
There's not much code there to optimise. It isn't teh uber-leet h4x0r
fastest way of doing DB access, but the difference between that and
other methods is going to be minimal.
If that code is running slowly, I would place hard-earned money on the
issue being time spent inside Sql server. I don't honestly think you
will make any measurable dent on your performance problem by tweaking
that code.
Of course, if I'm wrong, I want to know about it, so let people know
what you find out in any case.
-- Bob Gregory
Unvalued Professional.
Jon wrote:
> Hi Kevin and thanks for the reply.
> The SP returns varying amounts of data, but even for say 100 records, it's
> slow. I do know that the Database and SP's need to be looked at, for examp
le,
> if 1 SP returns 10 rows, it then fires off 10 SP's passing in the values f
rom
> the first SP (you get the idea!).
> But I'd prefer to start with the C# code, as it's less of a beast, and mor
e
> my domain. The DB has other issues, I'm really just trying to quel the fir
e
> so to speak.
> I was thinking of using the MS DAB, not the June 2005 release. Would that
be
> better? I'm really just looking for some advice / help.
> Thanks again,
> Jon
> "Kevin Spencer" wrote:
>
Hi Jon,
You're correct about optimizing the stored procedures, which I can't really
say anything about. As for your code, yes, it could be optimized, depending
upon your requirements. For example, it sounds like you're simply fetching a
single set of data, or a single DataTable. But you're using a DataSet, which
is a rather large and complex class that mimics a database in many ways,
holding numerous DataTables, handling relationships, etc. One optimization
would be to simply use a DataTable with a SqlDataReader. The SqlDataReader
is a very fast little class (which is actually used by a SqlDataAdapter to
do the work that it does in filling DataTables and DataSets). You can fetch
the data with the SqlDataReader, and then pass it as a parameter to the
DataTable.Load method. See
http://msdn2.microsoft.com/en-us/li...table.load.aspx for
more details, and good luck!
HTH,
Kevin Spencer
Microsoft MVP
Software Composer
http://unclechutney.blogspot.com
If the Truth hurts, wear it.
"Jon" <Jon@.discussions.microsoft.com> wrote in message
news:0520A1D8-956E-44B1-8ACD-55DC3F6EC783@.microsoft.com...
> Hi Kevin and thanks for the reply.
> The SP returns varying amounts of data, but even for say 100 records, it's
> slow. I do know that the Database and SP's need to be looked at, for
> example,
> if 1 SP returns 10 rows, it then fires off 10 SP's passing in the values
> from
> the first SP (you get the idea!).
> But I'd prefer to start with the C# code, as it's less of a beast, and
> more
> my domain. The DB has other issues, I'm really just trying to quel the
> fire
> so to speak.
> I was thinking of using the MS DAB, not the June 2005 release. Would that
> be
> better? I'm really just looking for some advice / help.
> Thanks again,
> Jon
> "Kevin Spencer" wrote:
>

Performance tweak

Hello all,

I've been doing some performance analysis on our app, and I've discovered
that the below code is quite a bottle neck:

this.OnFillParameters(selectCommand);

SqlDataAdapter selectAdapter = new SqlDataAdapter(selectCommand);

try
{
selectAdapter.Fill(resultsDataSet);
.....

Does anyone have any suggestions/pointers on how this could be improved.

Any comments welcomed.

Thanks,

JYhi,

sorry what do you mean by bottle neck?

Jon wrote:

Quote:

Originally Posted by

Hello all,
I've been doing some performance analysis on our app, and I've discovered
that the below code is quite a bottle neck:
this.OnFillParameters(selectCommand);
SqlDataAdapter selectAdapter = new SqlDataAdapter(selectCommand);
try
{
selectAdapter.Fill(resultsDataSet);
....
>
Does anyone have any suggestions/pointers on how this could be improved.
Any comments welcomed.
Thanks,
JY


Hi,

My apologies, I shouldn't use local terms on international forums! :)

By bottle next I mean an area of the application that is the slowest.

Thanks,

Jon

"Varangian" wrote:

Quote:

Originally Posted by

hi,
>
sorry what do you mean by bottle neck?
>
>
Jon wrote:

Quote:

Originally Posted by

Hello all,

I've been doing some performance analysis on our app, and I've discovered
that the below code is quite a bottle neck:

this.OnFillParameters(selectCommand);

SqlDataAdapter selectAdapter = new SqlDataAdapter(selectCommand);

try
{
selectAdapter.Fill(resultsDataSet);
....

Does anyone have any suggestions/pointers on how this could be improved.

Any comments welcomed.

Thanks,

JY


>
>


Hi Jon,

BottleNeck is a common technical term, so don't sweat it!

You've got some pretty simple code there. How many records does it fetch?

--
HTH,

Kevin Spencer
Microsoft MVP
Software Composer
http://unclechutney.blogspot.com
If the Truth hurts, wear it.

"Jon" <Jon@dotnet.itags.org.discussions.microsoft.comwrote in message
news:23D239C3-8A52-45ED-B123-951CB9881745@dotnet.itags.org.microsoft.com...

Quote:

Originally Posted by

Hi,
>
My apologies, I shouldn't use local terms on international forums! :)
>
By bottle next I mean an area of the application that is the slowest.
>
Thanks,
>
Jon
>
"Varangian" wrote:
>

Quote:

Originally Posted by

>hi,
>>
>sorry what do you mean by bottle neck?
>>
>>
>Jon wrote:

Quote:

Originally Posted by

Hello all,
>
I've been doing some performance analysis on our app, and I've
discovered
that the below code is quite a bottle neck:
>
this.OnFillParameters(selectCommand);
>
SqlDataAdapter selectAdapter = new SqlDataAdapter(selectCommand);
>
try
{
selectAdapter.Fill(resultsDataSet);
....
>
>
Does anyone have any suggestions/pointers on how this could be
improved.
>
Any comments welcomed.
>
Thanks,
>
JY


>>
>>


Unless you're calling that code inside a loop, I can't see that it's
going to cause performance problems. You can always use a SqlDataReader
directly if you want the fastest access to your data but, in all
likelyhood, the performance problem lies with your database query.

Jon wrote:

Quote:

Originally Posted by

Hi,
>
My apologies, I shouldn't use local terms on international forums! :)
>
By bottle next I mean an area of the application that is the slowest.
>
Thanks,
>
Jon
>
"Varangian" wrote:
>

Quote:

Originally Posted by

hi,

sorry what do you mean by bottle neck?

Jon wrote:

Quote:

Originally Posted by

Hello all,
>
I've been doing some performance analysis on our app, and I've discovered
that the below code is quite a bottle neck:
>
this.OnFillParameters(selectCommand);
>
SqlDataAdapter selectAdapter = new SqlDataAdapter(selectCommand);
>
try
{
selectAdapter.Fill(resultsDataSet);
....
>
>
Does anyone have any suggestions/pointers on how this could be improved.
>
Any comments welcomed.
>
Thanks,
>
JY



Hi Kevin and thanks for the reply.

The SP returns varying amounts of data, but even for say 100 records, it's
slow. I do know that the Database and SP's need to be looked at, for example,
if 1 SP returns 10 rows, it then fires off 10 SP's passing in the values from
the first SP (you get the idea!).

But I'd prefer to start with the C# code, as it's less of a beast, and more
my domain. The DB has other issues, I'm really just trying to quel the fire
so to speak.

I was thinking of using the MS DAB, not the June 2005 release. Would that be
better? I'm really just looking for some advice / help.

Thanks again,

Jon

"Kevin Spencer" wrote:

Quote:

Originally Posted by

Hi Jon,
>
BottleNeck is a common technical term, so don't sweat it!
>
You've got some pretty simple code there. How many records does it fetch?
>
--
HTH,
>
Kevin Spencer
Microsoft MVP
Software Composer
http://unclechutney.blogspot.com
>
If the Truth hurts, wear it.
>
"Jon" <Jon@dotnet.itags.org.discussions.microsoft.comwrote in message
news:23D239C3-8A52-45ED-B123-951CB9881745@dotnet.itags.org.microsoft.com...

Quote:

Originally Posted by

Hi,

My apologies, I shouldn't use local terms on international forums! :)

By bottle next I mean an area of the application that is the slowest.

Thanks,

Jon

"Varangian" wrote:

Quote:

Originally Posted by

hi,
>
sorry what do you mean by bottle neck?
>
>
Jon wrote:
Hello all,

I've been doing some performance analysis on our app, and I've
discovered
that the below code is quite a bottle neck:

this.OnFillParameters(selectCommand);

SqlDataAdapter selectAdapter = new SqlDataAdapter(selectCommand);

try
{
selectAdapter.Fill(resultsDataSet);
....

Does anyone have any suggestions/pointers on how this could be
improved.

Any comments welcomed.

Thanks,

JY
>
>


>
>
>


The first thing you should do, if you can, is look at the execution of
your procedure in Sql Query Analyzer and see how much of the time spent
in that block is accounted for by SQL server. Without knowing the
numbers, you can't optimise usefully.

There's not much code there to optimise. It isn't teh uber-leet h4x0r
fastest way of doing DB access, but the difference between that and
other methods is going to be minimal.

If that code is running slowly, I would place hard-earned money on the
issue being time spent inside Sql server. I don't honestly think you
will make any measurable dent on your performance problem by tweaking
that code.

Of course, if I'm wrong, I want to know about it, so let people know
what you find out in any case.

-- Bob Gregory
Unvalued Professional.

Jon wrote:

Quote:

Originally Posted by

Hi Kevin and thanks for the reply.
>
The SP returns varying amounts of data, but even for say 100 records, it's
slow. I do know that the Database and SP's need to be looked at, for example,
if 1 SP returns 10 rows, it then fires off 10 SP's passing in the values from
the first SP (you get the idea!).
>
But I'd prefer to start with the C# code, as it's less of a beast, and more
my domain. The DB has other issues, I'm really just trying to quel the fire
so to speak.
>
I was thinking of using the MS DAB, not the June 2005 release. Would that be
better? I'm really just looking for some advice / help.
>
Thanks again,
>
Jon
>
"Kevin Spencer" wrote:
>

Quote:

Originally Posted by

Hi Jon,

BottleNeck is a common technical term, so don't sweat it!

You've got some pretty simple code there. How many records does it fetch?

--
HTH,

Kevin Spencer
Microsoft MVP
Software Composer
http://unclechutney.blogspot.com
If the Truth hurts, wear it.

"Jon" <Jon@dotnet.itags.org.discussions.microsoft.comwrote in message
news:23D239C3-8A52-45ED-B123-951CB9881745@dotnet.itags.org.microsoft.com...

Quote:

Originally Posted by

Hi,
>
My apologies, I shouldn't use local terms on international forums! :)
>
By bottle next I mean an area of the application that is the slowest.
>
Thanks,
>
Jon
>
"Varangian" wrote:
>
>hi,
>>
>sorry what do you mean by bottle neck?
>>
>>
>Jon wrote:
Hello all,
>
I've been doing some performance analysis on our app, and I've
discovered
that the below code is quite a bottle neck:
>
this.OnFillParameters(selectCommand);
>
SqlDataAdapter selectAdapter = new SqlDataAdapter(selectCommand);
>
try
{
selectAdapter.Fill(resultsDataSet);
....
>
>
Does anyone have any suggestions/pointers on how this could be
improved.
>
Any comments welcomed.
>
Thanks,
>
JY
>>
>>



Hi Jon,

You're correct about optimizing the stored procedures, which I can't really
say anything about. As for your code, yes, it could be optimized, depending
upon your requirements. For example, it sounds like you're simply fetching a
single set of data, or a single DataTable. But you're using a DataSet, which
is a rather large and complex class that mimics a database in many ways,
holding numerous DataTables, handling relationships, etc. One optimization
would be to simply use a DataTable with a SqlDataReader. The SqlDataReader
is a very fast little class (which is actually used by a SqlDataAdapter to
do the work that it does in filling DataTables and DataSets). You can fetch
the data with the SqlDataReader, and then pass it as a parameter to the
DataTable.Load method. See
http://msdn2.microsoft.com/en-us/li...table.load.aspx for
more details, and good luck!

--
HTH,

Kevin Spencer
Microsoft MVP
Software Composer
http://unclechutney.blogspot.com
If the Truth hurts, wear it.

"Jon" <Jon@dotnet.itags.org.discussions.microsoft.comwrote in message
news:0520A1D8-956E-44B1-8ACD-55DC3F6EC783@dotnet.itags.org.microsoft.com...

Quote:

Originally Posted by

Hi Kevin and thanks for the reply.
>
The SP returns varying amounts of data, but even for say 100 records, it's
slow. I do know that the Database and SP's need to be looked at, for
example,
if 1 SP returns 10 rows, it then fires off 10 SP's passing in the values
from
the first SP (you get the idea!).
>
But I'd prefer to start with the C# code, as it's less of a beast, and
more
my domain. The DB has other issues, I'm really just trying to quel the
fire
so to speak.
>
I was thinking of using the MS DAB, not the June 2005 release. Would that
be
better? I'm really just looking for some advice / help.
>
Thanks again,
>
Jon
>
"Kevin Spencer" wrote:
>

Quote:

Originally Posted by

>Hi Jon,
>>
>BottleNeck is a common technical term, so don't sweat it!
>>
>You've got some pretty simple code there. How many records does it fetch?
>>
>--
>HTH,
>>
>Kevin Spencer
>Microsoft MVP
>Software Composer
>http://unclechutney.blogspot.com
>>
>If the Truth hurts, wear it.
>>
>"Jon" <Jon@dotnet.itags.org.discussions.microsoft.comwrote in message
>news:23D239C3-8A52-45ED-B123-951CB9881745@dotnet.itags.org.microsoft.com...

Quote:

Originally Posted by

Hi,
>
My apologies, I shouldn't use local terms on international forums! :)
>
By bottle next I mean an area of the application that is the slowest.
>
Thanks,
>
Jon
>
"Varangian" wrote:
>
>hi,
>>
>sorry what do you mean by bottle neck?
>>
>>
>Jon wrote:
Hello all,
>
I've been doing some performance analysis on our app, and I've
discovered
that the below code is quite a bottle neck:
>
this.OnFillParameters(selectCommand);
>
SqlDataAdapter selectAdapter = new SqlDataAdapter(selectCommand);
>
try
{
selectAdapter.Fill(resultsDataSet);
....
>
>
Does anyone have any suggestions/pointers on how this could be
improved.
>
Any comments welcomed.
>
Thanks,
>
JY
>>
>>


>>
>>
>>

Saturday, March 24, 2012

Permission for bin folder: ASP.NET app deployed under a web site

Hi All,
I have an asp.net application and I have deployed it under a Web Site. I am
using IIS 6.0.
However, while running the application it fails saying that can't monitor
file changes under bin directory and access is denied.
I have given read permission to ASPNET and Impersonation account. However,
it still fails.
If I give permission to "everyone" to read the bin folder it works fine.
How do I find out which account the application is trying to use to read the
bin directory or which account needs the read permission?
Any pointer or help.
Thanks in advance
SachinHi,
Try NETWORK SERVICE account
Teemu Keiski
ASP.NET MVP, AspInsider
Finland, EU
http://blogs.aspadvice.com/joteke
"Sachin" <annonymous@.microsoft.com> wrote in message
news:OaczMSczFHA.3188@.TK2MSFTNGP14.phx.gbl...
> Hi All,
> I have an asp.net application and I have deployed it under a Web Site. I
> am
> using IIS 6.0.
> However, while running the application it fails saying that can't monitor
> file changes under bin directory and access is denied.
> I have given read permission to ASPNET and Impersonation account. However,
> it still fails.
> If I give permission to "everyone" to read the bin folder it works fine.
> How do I find out which account the application is trying to use to read
> the
> bin directory or which account needs the read permission?
> Any pointer or help.
> Thanks in advance
> Sachin
>
To add to Teemu's advice
WIN 2003 uses servername\Network service acct
Patrick
"Teemu Keiski" <joteke@.aspalliance.com> wrote in message
news:ezNsr5czFHA.2212@.TK2MSFTNGP15.phx.gbl...
> Hi,
> Try NETWORK SERVICE account
> --
> Teemu Keiski
> ASP.NET MVP, AspInsider
> Finland, EU
> http://blogs.aspadvice.com/joteke
> "Sachin" <annonymous@.microsoft.com> wrote in message
> news:OaczMSczFHA.3188@.TK2MSFTNGP14.phx.gbl...
monitor
However,
>
Patrick.O.Ige wrote:
> To add to Teemu's advice
> WIN 2003 uses servername\Network service acct
> Patrick
>
However, it's important to note that IIS 6 is hard-coded to check
permissions for the IIS_WPG group of which NETWORK SERVICE is a member.
Jim Cheshire
JIMCO Software
http://www.jimcosoftware.com
FrontPage add-ins for FrontPage 2000 - 2003

Permission for bin folder: ASP.NET app deployed under a web site

Hi All,

I have an asp.net application and I have deployed it under a Web Site. I am
using IIS 6.0.

However, while running the application it fails saying that can't monitor
file changes under bin directory and access is denied.

I have given read permission to ASPNET and Impersonation account. However,
it still fails.

If I give permission to "everyone" to read the bin folder it works fine.

How do I find out which account the application is trying to use to read the
bin directory or which account needs the read permission?

Any pointer or help.

Thanks in advance
SachinHi,

Try NETWORK SERVICE account

--
Teemu Keiski
ASP.NET MVP, AspInsider
Finland, EU
http://blogs.aspadvice.com/joteke

"Sachin" <annonymous@.microsoft.com> wrote in message
news:OaczMSczFHA.3188@.TK2MSFTNGP14.phx.gbl...
> Hi All,
> I have an asp.net application and I have deployed it under a Web Site. I
> am
> using IIS 6.0.
> However, while running the application it fails saying that can't monitor
> file changes under bin directory and access is denied.
> I have given read permission to ASPNET and Impersonation account. However,
> it still fails.
> If I give permission to "everyone" to read the bin folder it works fine.
> How do I find out which account the application is trying to use to read
> the
> bin directory or which account needs the read permission?
> Any pointer or help.
> Thanks in advance
> Sachin
To add to Teemu's advice
WIN 2003 uses servername\Network service acct
Patrick

"Teemu Keiski" <joteke@.aspalliance.com> wrote in message
news:ezNsr5czFHA.2212@.TK2MSFTNGP15.phx.gbl...
> Hi,
> Try NETWORK SERVICE account
> --
> Teemu Keiski
> ASP.NET MVP, AspInsider
> Finland, EU
> http://blogs.aspadvice.com/joteke
> "Sachin" <annonymous@.microsoft.com> wrote in message
> news:OaczMSczFHA.3188@.TK2MSFTNGP14.phx.gbl...
> > Hi All,
> > I have an asp.net application and I have deployed it under a Web Site. I
> > am
> > using IIS 6.0.
> > However, while running the application it fails saying that can't
monitor
> > file changes under bin directory and access is denied.
> > I have given read permission to ASPNET and Impersonation account.
However,
> > it still fails.
> > If I give permission to "everyone" to read the bin folder it works fine.
> > How do I find out which account the application is trying to use to read
> > the
> > bin directory or which account needs the read permission?
> > Any pointer or help.
> > Thanks in advance
> > Sachin
Patrick.O.Ige wrote:
> To add to Teemu's advice
> WIN 2003 uses servername\Network service acct
> Patrick

However, it's important to note that IIS 6 is hard-coded to check
permissions for the IIS_WPG group of which NETWORK SERVICE is a member.

--
Jim Cheshire
JIMCO Software
http://www.jimcosoftware.com

FrontPage add-ins for FrontPage 2000 - 2003

Permission required to execute a DTS package from ASP.NET app

Hello,

I'm calling a DTS package from my asp.net application.Apparently because of
permission issue I canot run the package within the sql server ,because when
I set it to call a package from my local host it can execute te package.one
step before calling the package I get the IDENTITY of the current security
context and it is my Domian user name and I'm using IntegratedSecurity to
call the DTS package.I'm also memeber of sysadmin rols in Database.Do I have
to give it extra permissions?

Thasnk"Ray5531" <Ray5531@.microsoft.com> wrote in
news:#QTNS10hFHA.3164@.TK2MSFTNGP15.phx.gbl:

> Hello,
> I'm calling a DTS package from my asp.net application.Apparently
> because of permission issue I canot run the package within the sql
> server ,because when I set it to call a package from my local host it
> can execute te package.one step before calling the package I get the
> IDENTITY of the current security context and it is my Domian user name
> and I'm using IntegratedSecurity to call the DTS package.I'm also
> memeber of sysadmin rols in Database.Do I have to give it extra
> permissions?
> Thasnk

Hi Ray,

If you are using SSPI in the connectionstring, you have to impersonate the
call to the DTS.
You can do that by adding the next line to the web.config:
<identity impersonate="true" /
link: http://msdn.microsoft.com/library/d...rl=/library/en-
us/vsent7/html/vxconImpersonation.asp

Pablo
> If you are using SSPI in the connectionstring, you have to impersonate the
> call to the DTS.
> You can do that by adding the next line to the web.config:
> <identity impersonate="true" /
I've done this ,that's why the curent security context is under my
identity:)

Thanks
"Pablo Galiano" <pagaliano@.hotmail.com> wrote in message
news:Xns969288D8242Apagalianohotmailcom@.207.46.248 .16...
> "Ray5531" <Ray5531@.microsoft.com> wrote in
> news:#QTNS10hFHA.3164@.TK2MSFTNGP15.phx.gbl:
>> Hello,
>>
>> I'm calling a DTS package from my asp.net application.Apparently
>> because of permission issue I canot run the package within the sql
>> server ,because when I set it to call a package from my local host it
>> can execute te package.one step before calling the package I get the
>> IDENTITY of the current security context and it is my Domian user name
>> and I'm using IntegratedSecurity to call the DTS package.I'm also
>> memeber of sysadmin rols in Database.Do I have to give it extra
>> permissions?
>>
>> Thasnk
>>
>>
>>
> Hi Ray,
> If you are using SSPI in the connectionstring, you have to impersonate the
> call to the DTS.
> You can do that by adding the next line to the web.config:
> <identity impersonate="true" />
> link: http://msdn.microsoft.com/library/d...rl=/library/en-
> us/vsent7/html/vxconImpersonation.asp
>
> Pablo