Showing posts with label aspnet. Show all posts
Showing posts with label aspnet. Show all posts

Thursday, March 29, 2012

Performance of an ASP.Net application

After reviewing the code and compiling the application as release
version, are there any other deployment and/or .Net CLR settings that
can be used to improve the application performance?Not really. You can tweak how IIS and ASP.NET work via the machine.config's
processModel, but I doubt you'll get much out of it.
IF you are seeing performance issues, caching using OutputCaching and the
Cache api as well as database tuning are generally good quick hits.
Karl
http://www.openmymind.net/
http://www.codebetter.com/
<robin9876@.hotmail.com> wrote in message
news:1162894730.222245.309590@.m73g2000cwd.googlegroups.com...
> After reviewing the code and compiling the application as release
> version, are there any other deployment and/or .Net CLR settings that
> can be used to improve the application performance?
>
Here is a Wonderful document which help you in improving the performance of
the application
http://www.microsoft.com/downloads/...&displaylang=en
Regards
Prabakar
"robin9876@.hotmail.com" wrote:

> After reviewing the code and compiling the application as release
> version, are there any other deployment and/or .Net CLR settings that
> can be used to improve the application performance?
>

Performance of an ASP.Net application

After reviewing the code and compiling the application as release
version, are there any other deployment and/or .Net CLR settings that
can be used to improve the application performance?Not really. You can tweak how IIS and ASP.NET work via the machine.config's
processModel, but I doubt you'll get much out of it.

IF you are seeing performance issues, caching using OutputCaching and the
Cache api as well as database tuning are generally good quick hits.

Karl

--
http://www.openmymind.net/
http://www.codebetter.com/
<robin9876@.hotmail.comwrote in message
news:1162894730.222245.309590@.m73g2000cwd.googlegr oups.com...

Quote:

Originally Posted by

After reviewing the code and compiling the application as release
version, are there any other deployment and/or .Net CLR settings that
can be used to improve the application performance?
>


Here is a Wonderful document which help you in improving the performance of
the application

http://www.microsoft.com/downloads/...&displaylang=en
Regards
Prabakar

"robin9876@.hotmail.com" wrote:

Quote:

Originally Posted by

After reviewing the code and compiling the application as release
version, are there any other deployment and/or .Net CLR settings that
can be used to improve the application performance?
>
>

Performance problem with asp.net and database connection

Hallo,

I have an ASP.NET application with masterpages, skins and diffrent themes.
The application works fine, but the performance is not realy good. If I load
an ASPX file, which has no database connection, is the performance ok. ASPX
file with one or more database queries have a answer time about 15 or 20
seconds. Each database query need maximal a second to give the answer. So
the query works ok!
Know you a reason, why the time with a database connection is so long? How
can I make my application faster?

Thanks for the answers and tips

ThomasHello Thomas,

Do you use connection pooling?!
Seems that your delay is the reason that no connection pooling is activated
and new connection takes some ammount of time to be initiated

--
WBR, Michael Nemtsev [.NET/C# MVP].
My blog: http://spaces.live.com/laflour
Team blog: http://devkids.blogspot.com/
"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo

THI have an ASP.NET application with masterpages, skins and diffrent
THthemes.
THThe application works fine, but the performance is not realy good.
THIf I load
THan ASPX file, which has no database connection, is the performance
THok. ASPX
THfile with one or more database queries have a answer time about 15
THor 20
THseconds. Each database query need maximal a second to give the
THanswer. So
THthe query works ok!
THKnow you a reason, why the time with a database connection is so
THlong? How
THcan I make my application faster?
On Tue, 3 Jul 2007 07:26:48 +0000 (UTC), Michael Nemtsev
<nemtsev@.msn.comwrote:

Quote:

Originally Posted by

>Hello Thomas,
>
>Do you use connection pooling?!
>Seems that your delay is the reason that no connection pooling is activated
>and new connection takes some ammount of time to be initiated


I was under the impession that connection pooling was activated by
default.

One bad thing about connection pooling is the default pool size is zero
- the number of permanently open connections.

* Add a "Min Pool Size" entry to your connection string. 5 seems a
suitable minimum pool size.

* Check all your database code to ensure that connections are closed
after being used. the "using" keyword is handy here as it limits the
scope of the connection. Although your app should just fail if this
isn't the case rather than just going slow.

* If you are using datasets - what happens when you have no data in the
dataset?
- make sure you check with something like
if ( rs != null ) ... before you try to access a dataset

* Consider using data caching for some of the data.

* Try not to use datasets when you don't need to. For instance accessing
a DataTable or, better some kind of generic list (e.g. List<T>) is
nearly always faster - this will often use a datareader to read the
actual data - there is no real syntax shortcut but it seems to always
exectute faster.

Read this: http://www.15seconds.com/issue/040830.htm
I can't add anything more to this as we really need to see the code
before commenting further.

Quote:

Originally Posted by

>THI have an ASP.NET application with masterpages, skins and diffrent
>THthemes.
>THThe application works fine, but the performance is not realy good.
>THIf I load
>THan ASPX file, which has no database connection, is the performance
>THok. ASPX
>THfile with one or more database queries have a answer time about 15
>THor 20
>THseconds. Each database query need maximal a second to give the
>THanswer. So
>THthe query works ok!
>THKnow you a reason, why the time with a database connection is so
>THlong? How
>THcan I make my application faster?
>


Hi Thomas,

In addition to what Mark said, you could easily identify bottlenecks on the
page by turning on trace (see <trace web.config element). Plus, inspect the
size of the ViewState as it could have grown up. There's one more potential
cause I have seen in several systems. Check how many queries are run for each
page impression, and how it affects the database (Profiler is the best tool
to use in this case).

Hope this helps
--
Milosz

"Hahn, Thomas" wrote:

Quote:

Originally Posted by

Hallo,
>
I have an ASP.NET application with masterpages, skins and diffrent themes.
The application works fine, but the performance is not realy good. If I load
an ASPX file, which has no database connection, is the performance ok. ASPX
file with one or more database queries have a answer time about 15 or 20
seconds. Each database query need maximal a second to give the answer. So
the query works ok!
Know you a reason, why the time with a database connection is so long? How
can I make my application faster?
>
Thanks for the answers and tips
>
Thomas
>
>
>

Performance problem with asp.net and database connection

Hallo,
I have an ASP.NET application with masterpages, skins and diffrent themes.
The application works fine, but the performance is not realy good. If I load
an ASPX file, which has no database connection, is the performance ok. ASPX
file with one or more database queries have a answer time about 15 or 20
seconds. Each database query need maximal a second to give the answer. So
the query works ok!
Know you a reason, why the time with a database connection is so long? How
can I make my application faster?
Thanks for the answers and tips
ThomasHello Thomas,
Do you use connection pooling?!
Seems that your delay is the reason that no connection pooling is activated
and new connection takes some ammount of time to be initiated
WBR, Michael Nemtsev [.NET/C# MVP].
My blog: http://spaces.live.com/laflour
Team blog: http://devkids.blogspot.com/
"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo
TH> I have an ASP.NET application with masterpages, skins and diffrent
TH> themes.
TH> The application works fine, but the performance is not realy good.
TH> If I load
TH> an ASPX file, which has no database connection, is the performance
TH> ok. ASPX
TH> file with one or more database queries have a answer time about 15
TH> or 20
TH> seconds. Each database query need maximal a second to give the
TH> answer. So
TH> the query works ok!
TH> Know you a reason, why the time with a database connection is so
TH> long? How
TH> can I make my application faster?
On Tue, 3 Jul 2007 07:26:48 +0000 (UTC), Michael Nemtsev
<nemtsev@.msn.com> wrote:

>Hello Thomas,
>Do you use connection pooling?!
>Seems that your delay is the reason that no connection pooling is activated
>and new connection takes some ammount of time to be initiated
I was under the impession that connection pooling was activated by
default.
One bad thing about connection pooling is the default pool size is zero
- the number of permanently open connections.
* Add a "Min Pool Size" entry to your connection string. 5 seems a
suitable minimum pool size.
* Check all your database code to ensure that connections are closed
after being used. the "using" keyword is handy here as it limits the
scope of the connection. Although your app should just fail if this
isn't the case rather than just going slow.
* If you are using datasets - what happens when you have no data in the
dataset?
- make sure you check with something like
if ( rs != null ) ... before you try to access a dataset
* Consider using data caching for some of the data.
* Try not to use datasets when you don't need to. For instance accessing
a DataTable or, better some kind of generic list (e.g. List<T> ) is
nearly always faster - this will often use a datareader to read the
actual data - there is no real syntax shortcut but it seems to always
exectute faster.
Read this: http://www.15seconds.com/issue/040830.htm
I can't add anything more to this as we really need to see the code
before commenting further.

>TH> I have an ASP.NET application with masterpages, skins and diffrent
>TH> themes.
>TH> The application works fine, but the performance is not realy good.
>TH> If I load
>TH> an ASPX file, which has no database connection, is the performance
>TH> ok. ASPX
>TH> file with one or more database queries have a answer time about 15
>TH> or 20
>TH> seconds. Each database query need maximal a second to give the
>TH> answer. So
>TH> the query works ok!
>TH> Know you a reason, why the time with a database connection is so
>TH> long? How
>TH> can I make my application faster?
>
Hi Thomas,
In addition to what Mark said, you could easily identify bottlenecks on the
page by turning on trace (see <trace > web.config element). Plus, inspect th
e
size of the ViewState as it could have grown up. There's one more potential
cause I have seen in several systems. Check how many queries are run for eac
h
page impression, and how it affects the database (Profiler is the best tool
to use in this case).
Hope this helps
--
Milosz
"Hahn, Thomas" wrote:

> Hallo,
> I have an ASP.NET application with masterpages, skins and diffrent themes.
> The application works fine, but the performance is not realy good. If I lo
ad
> an ASPX file, which has no database connection, is the performance ok. ASP
X
> file with one or more database queries have a answer time about 15 or 20
> seconds. Each database query need maximal a second to give the answer. So
> the query works ok!
> Know you a reason, why the time with a database connection is so long? How
> can I make my application faster?
> Thanks for the answers and tips
> Thomas
>
>

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

Monday, March 26, 2012

Performance tuning ASP.NET applications

I have an ASP.NET application where one of the pages has a Save button to allow the user to save their work. So I have a client running the application in Internet Explorer, a separate IIS server running IIS version 6 and a separate SQL Server 2000 server where the data is saved in a database.
Some users are experiencing major performance issues during the save process. I'm looking for any pointers to articles on the web which can help me analyze/determine where the bottlenecks are in the entire process, i.e. is it a client problem, IIS problem or SQL Server problem.
Any help on how to do this would be greatly appreciated!
Thanks!!

Here's a few online resources related to ASP.NET performance:
ASP.NET Performance Overview
Improving ASP.NET Performance
ASP.NET Performance
Getting Started - Enhancing Web Site Performance with Caching
Optimizing Performance in ASP.NET
Developing High-Performance ASP.NET Applications
Hope these links help.

-- Erik Reitan

ASP.NET User Education
This posting is provided "AS IS" with no warranties, and confers no rights.




Om Sri Sai Ram

Performance :
http://msdn.microsoft.com/practices/compcat/default.aspx?pull=/library/en-us/dnpag/html/scalenet.asp

Caching:
http://msdn.microsoft.com/practices/compcat/default.aspx?pull=/library/en-us/dnbda/html/cachingarch.asp
Thanks,
Ram

Performance-related questions about an ASP.NET page...

1- Is it better to use TABLEs or DIVs in an HTML/ASP.NET page? Why?
2- Is it better to form your response (HTML page) result from your ASP.NET
page mostly using server side controls, or HTML controls. For example, if
you want to display the word "Welcome" is it better to use an asp:label
control or just type it using a P tag?

Thank you.Sammy:
The table/div issue has nothing to do with ASP.Net...it's more a general
html question...a nice thing about tables is how well they let you structure
data using server-side controls via the Table, TableRow and TableCell
controls. If you do a google search for "Table vs Div" you'll get a lot of
results. The main issue i believe is accessibility...

Your second question is loaded, but i'll answer it as best as possible.
First off, it's pretty obvious that

#1
<p>Hello World</p
is going to be faster than

#2
<Asp:label id="blah" runat="server" />
...
OnPage_Load
blah.text = "hello world"
end sub

in the first example you are simply sending it as plain text to the browser
to render. In the 2nd example, ur doing the same thing, but before that you
are creating an object on the server and doing some other magic.

The real point though is that it shouldn't matter. The debate is purely
speculative...the microsecond (literally) that you'll save in one way
doesn't equate much compared to the flexibility you gain the other. If the
flexiliby isn't, and never will be needed, then do it the first way..

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/

"Sammy" <sammy@.picostation.com> wrote in message
news:%23ySlri1EFHA.1012@.TK2MSFTNGP14.phx.gbl...
> 1- Is it better to use TABLEs or DIVs in an HTML/ASP.NET page? Why?
> 2- Is it better to form your response (HTML page) result from your ASP.NET
> page mostly using server side controls, or HTML controls. For example, if
> you want to display the word "Welcome" is it better to use an asp:label
> control or just type it using a P tag?
> Thank you.
Thank you!

"Karl Seguin" <karl REMOVE @. REMOVE openmymind REMOVEMETOO . ANDME net>
wrote in message news:ux0CJU2EFHA.1564@.TK2MSFTNGP09.phx.gbl...
> Sammy:
> The table/div issue has nothing to do with ASP.Net...it's more a general
> html question...a nice thing about tables is how well they let you
> structure
> data using server-side controls via the Table, TableRow and TableCell
> controls. If you do a google search for "Table vs Div" you'll get a lot
> of
> results. The main issue i believe is accessibility...
> Your second question is loaded, but i'll answer it as best as possible.
> First off, it's pretty obvious that
> #1
> <p>Hello World</p>
> is going to be faster than
> #2
> <Asp:label id="blah" runat="server" />
> ...
> OnPage_Load
> blah.text = "hello world"
> end sub
> in the first example you are simply sending it as plain text to the
> browser
> to render. In the 2nd example, ur doing the same thing, but before that
> you
> are creating an object on the server and doing some other magic.
> The real point though is that it shouldn't matter. The debate is purely
> speculative...the microsecond (literally) that you'll save in one way
> doesn't equate much compared to the flexibility you gain the other. If
> the
> flexiliby isn't, and never will be needed, then do it the first way..
> Karl
> --
> MY ASP.Net tutorials
> http://www.openmymind.net/
>
> "Sammy" <sammy@.picostation.com> wrote in message
> news:%23ySlri1EFHA.1012@.TK2MSFTNGP14.phx.gbl...
>> 1- Is it better to use TABLEs or DIVs in an HTML/ASP.NET page? Why?
>> 2- Is it better to form your response (HTML page) result from your
>> ASP.NET
>> page mostly using server side controls, or HTML controls. For example, if
>> you want to display the word "Welcome" is it better to use an asp:label
>> control or just type it using a P tag?
>>
>> Thank you.
>>
>>

Performance-related questions about an ASP.NET page...

1- Is it better to use TABLEs or DIVs in an HTML/ASP.NET page? Why?
2- Is it better to form your response (HTML page) result from your ASP.NET
page mostly using server side controls, or HTML controls. For example, if
you want to display the word "Welcome" is it better to use an asp:label
control or just type it using a P tag?
Thank you.Sammy:
The table/div issue has nothing to do with ASP.Net...it's more a general
html question...a nice thing about tables is how well they let you structure
data using server-side controls via the Table, TableRow and TableCell
controls. If you do a google search for "Table vs Div" you'll get a lot of
results. The main issue i believe is accessibility...
Your second question is loaded, but i'll answer it as best as possible.
First off, it's pretty obvious that
#1
<p>Hello World</p>
is going to be faster than
#2
<Asp:label id="blah" runat="server" />
...
OnPage_Load
blah.text = "hello world"
end sub
in the first example you are simply sending it as plain text to the browser
to render. In the 2nd example, ur doing the same thing, but before that you
are creating an object on the server and doing some other magic.
The real point though is that it shouldn't matter. The debate is purely
speculative...the microsecond (literally) that you'll save in one way
doesn't equate much compared to the flexibility you gain the other. If the
flexiliby isn't, and never will be needed, then do it the first way..
Karl
MY ASP.Net tutorials
http://www.openmymind.net/
"Sammy" <sammy@.picostation.com> wrote in message
news:%23ySlri1EFHA.1012@.TK2MSFTNGP14.phx.gbl...
> 1- Is it better to use TABLEs or DIVs in an HTML/ASP.NET page? Why?
> 2- Is it better to form your response (HTML page) result from your ASP.NET
> page mostly using server side controls, or HTML controls. For example, if
> you want to display the word "Welcome" is it better to use an asp:label
> control or just type it using a P tag?
> Thank you.
>
Thank you!
"Karl Seguin" <karl REMOVE @. REMOVE openmymind REMOVEMETOO . ANDME net>
wrote in message news:ux0CJU2EFHA.1564@.TK2MSFTNGP09.phx.gbl...
> Sammy:
> The table/div issue has nothing to do with ASP.Net...it's more a general
> html question...a nice thing about tables is how well they let you
> structure
> data using server-side controls via the Table, TableRow and TableCell
> controls. If you do a google search for "Table vs Div" you'll get a lot
> of
> results. The main issue i believe is accessibility...
> Your second question is loaded, but i'll answer it as best as possible.
> First off, it's pretty obvious that
> #1
> <p>Hello World</p>
> is going to be faster than
> #2
> <Asp:label id="blah" runat="server" />
> ...
> OnPage_Load
> blah.text = "hello world"
> end sub
> in the first example you are simply sending it as plain text to the
> browser
> to render. In the 2nd example, ur doing the same thing, but before that
> you
> are creating an object on the server and doing some other magic.
> The real point though is that it shouldn't matter. The debate is purely
> speculative...the microsecond (literally) that you'll save in one way
> doesn't equate much compared to the flexibility you gain the other. If
> the
> flexiliby isn't, and never will be needed, then do it the first way..
> Karl
> --
> MY ASP.Net tutorials
> http://www.openmymind.net/
>
> "Sammy" <sammy@.picostation.com> wrote in message
> news:%23ySlri1EFHA.1012@.TK2MSFTNGP14.phx.gbl...
>

perl and asp.net

is there a way i can use some perl code in asp? there is a certain module in perl that i need to use. suggestions?Here is a link that may come in handy:

http://aspn.activestate.com/ASPN/Downloads/PerlASPX/
Hello ADEC:
It was a nice link. In fact combinning these two technologies is something great. I wanted to ask you, what do you think of MONO project, have you heard of it ? It allows ASP.NET to run under UNIX enviroments.

regards.

Saturday, March 24, 2012

permission denied on object sp_sdidebug

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

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

Permission Denied Writing to a file

I'm getting a 'permission denied' error when I try to write to a file. I'm running Windows XP Professions, FAT32, and I've set the aspnet user to be an administrator. And I still get this error. I know it's not that the folder doesn't exist, because if I change the path to one that doesn't exist I get the appropriate error that it doesn't exist.

Help.

buzzWow! I hope this server is not exposed to the Internet in any way.
First, you should use NTFS and not FAT32 (there are no permissions on FAT32 disks).
And making ASPNET an administrator is something you should never do. You could edit the machine.config file instead and make the process use SYSTEM instead of ASPNET. I don't even recommend doing this, and you should really just give enough rights on the directories to ASPNET so that you can write to your file.
Does this help?
I'm just in development on my desktop for now, which is why it's FAT32, and the only reason why I made the ASPNET account an admin was to troubleshoot my permission denied error. That's why I mentioned it, because even with it being an admin I'm still getting this error.
You should use NTFS on your dev machines too. I doubt that you will be able to sort this one out except if you use NTFS. I haven't checked this, but I wouldn't be surprised if we used low permissions by default if the file system is Fat, as there are no permissions on this file system.
And 'low permissions' means no write permission, ever, anywhere? That would be remarkably restrictive, wouldn't it? Aren't there some IIS settings I can look at? I also went into my app in IIS and gave write permission in there and that didn't work either.

Thanks for your input.

buzz
Once again, I'm not sure about that at all.
But usually, a web site has no need to write files.
And it would be incredibly dangerous to allow writing to an unprotected file system by default.
I strongly recommend you use NTFS in all circumstances. Fat32 is only there for Win9x compatibility.
I see, well I'll look into converting to NTFS.

>> But usually, a web site has no need to write files.

Is this true? I'm not an expert, but what about uploading files, etc? Also, I want to write to a file for logging purposes, for when my database goes down.

Thanks for all your help!

buzz
Yes, that's why I said "usually".
Most sites don't need to upload files. And if you upload, you should do so in a directory that's not acessible from the web, for obvious security reasons, whenever possible. And you should always require reliable authentication when you allow for it.
Logging can be done using the System.Diagnostics namespace, using the standard Windows event logs.

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 Problem writing to Disk in Asp.NET application

Here's what I need to do:
Due to a bug in Crystal Reports ExportToStream() method I can't stream a
Crystal Reports directly to the client as PDF and I must must use the
Export() and put the the PDF on disk first and stream to the client. That's
just how it is.

Question:
So I need to let the aspx user have write permissions to disk.. NOT GOOD.
How do I solve this? Can I somehow write the PDF to disk in another thread
with other writes? OR are ther other ways around this?

best regards
/Lars NetzelLars

Note : The code below is stripped from a asp.net project using a web
service. This project would relay a binary file from an internal web server
where Crystal reports is installed to an external web server. You will still
need write permissions for the directory you want to save to

You could try this, I hope It helps

Stream fs =
rep.ExportToStream(CrystalDecisions.Shared.ExportF ormatType.PortableDocFormat);
byte[] binaryfile = StreamToBinary(fs);
string docLocation = Server.MapPath(null) + @."\Docs\";
SaveFileToServer(binaryfile,docLocation,"my.pdf",DateTime.Now);
Response.Redirect("Docs/"+"my.pdf");

public void SaveFileToServer(byte[] binaryFile, string docPath, string
docName, DateTime fileModifiedDate)
{
Directory.CreateDirectory(docPath);
MemoryStream m = new MemoryStream(binaryFile);
FileStream f = new FileStream(docPath+docName,FileMode.Create);
m.WriteTo(f);
f.Close();
m.Close();
File.SetLastWriteTime(docPath+docName,fileModified Date);
}

public byte[] StreamToBinary(Stream fs)
{
Int32 i = Convert.ToInt32(fs.Length);
byte[] b = new byte[fs.Length];
fs.Read(b,0,i);
fs.Close();
}

"Lars Netzel" <lars.netzel@.NO-SPAM.qlogic.se> wrote in message
news:%23wlKhu8HFHA.3244@.TK2MSFTNGP09.phx.gbl...
> Here's what I need to do:
> Due to a bug in Crystal Reports ExportToStream() method I can't stream a
> Crystal Reports directly to the client as PDF and I must must use the
> Export() and put the the PDF on disk first and stream to the client.
> That's just how it is.
> Question:
> So I need to let the aspx user have write permissions to disk.. NOT GOOD.
> How do I solve this? Can I somehow write the PDF to disk in another thread
> with other writes? OR are ther other ways around this?
> best regards
> /Lars Netzel
Thanks but I can't ExportToStream due to a bug with record and
groupselections in the Crystal Reports Engine. so I can't use that code.

I need to write to disk with other permisisons than the ASPNET user

/Lars

"Kamal Vaghjiani" <kamal@.mortgageuk.com> wrote in message
news:Ok7aI59HFHA.2784@.TK2MSFTNGP09.phx.gbl...
> Lars
> Note : The code below is stripped from a asp.net project using a web
> service. This project would relay a binary file from an internal web
> server where Crystal reports is installed to an external web server. You
> will still need write permissions for the directory you want to save to
> You could try this, I hope It helps
> Stream fs =
> rep.ExportToStream(CrystalDecisions.Shared.ExportF ormatType.PortableDocFormat);
> byte[] binaryfile = StreamToBinary(fs);
> string docLocation = Server.MapPath(null) + @."\Docs\";
> SaveFileToServer(binaryfile,docLocation,"my.pdf",DateTime.Now);
> Response.Redirect("Docs/"+"my.pdf");
> public void SaveFileToServer(byte[] binaryFile, string docPath, string
> docName, DateTime fileModifiedDate)
> {
> Directory.CreateDirectory(docPath);
> MemoryStream m = new MemoryStream(binaryFile);
> FileStream f = new FileStream(docPath+docName,FileMode.Create);
> m.WriteTo(f);
> f.Close();
> m.Close();
> File.SetLastWriteTime(docPath+docName,fileModified Date);
> }
> public byte[] StreamToBinary(Stream fs)
> {
> Int32 i = Convert.ToInt32(fs.Length);
> byte[] b = new byte[fs.Length];
> fs.Read(b,0,i);
> fs.Close();
> }
>
> "Lars Netzel" <lars.netzel@.NO-SPAM.qlogic.se> wrote in message
> news:%23wlKhu8HFHA.3244@.TK2MSFTNGP09.phx.gbl...
>> Here's what I need to do:
>> Due to a bug in Crystal Reports ExportToStream() method I can't stream a
>> Crystal Reports directly to the client as PDF and I must must use the
>> Export() and put the the PDF on disk first and stream to the client.
>> That's just how it is.
>>
>> Question:
>> So I need to let the aspx user have write permissions to disk.. NOT GOOD.
>> How do I solve this? Can I somehow write the PDF to disk in another
>> thread with other writes? OR are ther other ways around this?
>>
>> best regards
>> /Lars Netzel
>>

Permission Problem writing to Disk in Asp.NET application

Here's what I need to do:
Due to a bug in Crystal Reports ExportToStream() method I can't stream a
Crystal Reports directly to the client as PDF and I must must use the
Export() and put the the PDF on disk first and stream to the client. That's
just how it is.
Question:
So I need to let the aspx user have write permissions to disk.. NOT GOOD.
How do I solve this? Can I somehow write the PDF to disk in another thread
with other writes? OR are ther other ways around this?
best regards
/Lars NetzelLars
Note : The code below is stripped from a asp.net project using a web
service. This project would relay a binary file from an internal web server
where Crystal reports is installed to an external web server. You will still
need write permissions for the directory you want to save to
You could try this, I hope It helps
Stream fs =
rep.ExportToStream(CrystalDecisions.Shared.ExportFormatType.PortableDocForma
t);
byte[] binaryfile = StreamToBinary(fs);
string docLocation = Server.MapPath(null) + @."\Docs\";
SaveFileToServer(binaryfile,docLocation,
"my.pdf",DateTime.Now);
Response.Redirect("Docs/"+"my.pdf");
public void SaveFileToServer(byte[] binaryFile, string docPath, string
docName, DateTime fileModifiedDate)
{
Directory.CreateDirectory(docPath);
MemoryStream m = new MemoryStream(binaryFile);
FileStream f = new FileStream(docPath+docName,FileMode.Create);
m.WriteTo(f);
f.Close();
m.Close();
File. SetLastWriteTime(docPath+docName,fileMod
ifiedDate);
}
public byte[] StreamToBinary(Stream fs)
{
Int32 i = Convert.ToInt32(fs.Length);
byte[] b = new byte[fs.Length];
fs.Read(b,0,i);
fs.Close();
}
"Lars Netzel" <lars.netzel@.NO-SPAM.qlogic.se> wrote in message
news:%23wlKhu8HFHA.3244@.TK2MSFTNGP09.phx.gbl...
> Here's what I need to do:
> Due to a bug in Crystal Reports ExportToStream() method I can't stream a
> Crystal Reports directly to the client as PDF and I must must use the
> Export() and put the the PDF on disk first and stream to the client.
> That's just how it is.
> Question:
> So I need to let the aspx user have write permissions to disk.. NOT GOOD.
> How do I solve this? Can I somehow write the PDF to disk in another thread
> with other writes? OR are ther other ways around this?
> best regards
> /Lars Netzel
>
Thanks but I can't ExportToStream due to a bug with record and
groupselections in the Crystal Reports Engine. so I can't use that code.
I need to write to disk with other permisisons than the ASPNET user
/Lars
"Kamal Vaghjiani" <kamal@.mortgageuk.com> wrote in message
news:Ok7aI59HFHA.2784@.TK2MSFTNGP09.phx.gbl...
> Lars
> Note : The code below is stripped from a asp.net project using a web
> service. This project would relay a binary file from an internal web
> server where Crystal reports is installed to an external web server. You
> will still need write permissions for the directory you want to save to
> You could try this, I hope It helps
> Stream fs =
> rep.ExportToStream(CrystalDecisions.Shared.ExportFormatType.PortableDocFor
mat);
> byte[] binaryfile = StreamToBinary(fs);
> string docLocation = Server.MapPath(null) + @."\Docs\";
> SaveFileToServer(binaryfile,docLocation,
"my.pdf",DateTime.Now);
> Response.Redirect("Docs/"+"my.pdf");
> public void SaveFileToServer(byte[] binaryFile, string docPath, string
> docName, DateTime fileModifiedDate)
> {
> Directory.CreateDirectory(docPath);
> MemoryStream m = new MemoryStream(binaryFile);
> FileStream f = new FileStream(docPath+docName,FileMode.Create);
> m.WriteTo(f);
> f.Close();
> m.Close();
> File. SetLastWriteTime(docPath+docName,fileMod
ifiedDate);
> }
> public byte[] StreamToBinary(Stream fs)
> {
> Int32 i = Convert.ToInt32(fs.Length);
> byte[] b = new byte[fs.Length];
> fs.Read(b,0,i);
> fs.Close();
> }
>
> "Lars Netzel" <lars.netzel@.NO-SPAM.qlogic.se> wrote in message
> news:%23wlKhu8HFHA.3244@.TK2MSFTNGP09.phx.gbl...
>

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

Permission to access PDF files from ASP.NET

Hi All,

My web app requires to access a PDF document. However it will not open when
I start to access it using Process.Start("fileName"). Although at the task
manager, it says that the Acrobat service has been started by ASPNET. Is
there something I did wrong or have not done? Pls help.

Thanksryu wrote:
> Hi All,
> My web app requires to access a PDF document. However it will not open when
> I start to access it using Process.Start("fileName"). Although at the task
> manager, it says that the Acrobat service has been started by ASPNET. Is
> there something I did wrong or have not done? Pls help.
> Thanks

You want to open a PDF on the *server*??

Process.Start will open only local (that is: local *to the server*)
processes and will open them on the *invisible* desktop of the ASPNET user.

If you want to open that PDF file on the *client*, you need to send
that file to the client:
Response.AppendHeader("Content-Disposition", "attachment;
filename=myfile.pdf");
Response.ContentType = "application/pdf";
Response.WriteFile("myLocalFile.pdf");
Response.End();

--
Hans Kesting

Permission to access PDF files from ASP.NET

Hi All,
My web app requires to access a PDF document. However it will not open when
I start to access it using Process.Start("fileName"). Although at the task
manager, it says that the Acrobat service has been started by ASPNET. Is
there something I did wrong or have not done? Pls help.
Thanksryu wrote:
> Hi All,
> My web app requires to access a PDF document. However it will not open whe
n
> I start to access it using Process.Start("fileName"). Although at the task
> manager, it says that the Acrobat service has been started by ASPNET. Is
> there something I did wrong or have not done? Pls help.
> Thanks
>
You want to open a PDF on the *server*'
Process.Start will open only local (that is: local *to the server*)
processes and will open them on the *invisible* desktop of the ASPNET user.
If you want to open that PDF file on the *client*, you need to send
that file to the client:
Response.AppendHeader("Content-Disposition", "attachment;
filename=myfile.pdf");
Response.ContentType = "application/pdf";
Response.WriteFile("myLocalFile.pdf");
Response.End();
Hans Kesting