Showing posts with label visual. Show all posts
Showing posts with label visual. Show all posts

Thursday, March 29, 2012

performance of code

Is there someway to profile your code in Visual Studio with reagard to performance, meaning, to see the time elapse per code that is crunching behind the scenes? I have an application that seems to slow way down at a certain page but I really have no idea where it is hanging up?

Thanks in advance,

Eric

I havent found anything that tests for complexity, calculating the McCabe factor etc.. like there is in C++ and fortran or Delphi.

However here is a link that does have a freeware program you can download to test performance

http://www.alessandropulvirenti.it/programmazione/ for c# and VB


You can enable Tracing on your page (just add Trace="true" to the page directive of your aspx page), and then use Trace.Write(DateTime.Now); to determine what time different sections of code are executed.


Hi Eric,

Based on my understanding, you want to know how to analyze your application performance. If I have misunderstood you, please feel free to let me know.

To better understand your question, could you please confirm the following information:
What version of Visual Studio are you using? If you use Visual Studio 2005 Team Edition, you can use Performance tools which be integrated with development environment (IDE) to measure, evaluate, and target performance-related issues in your code. For more information, see Analyzing Application Performance.


I hope this helps.


Tracing is very clumsy and awkward to set up and leaves you with swathes of code to remove once you've sorted the problems out.

Consider using something like this:

http://www.red-gate.com/products/ants_profiler/


you can get some pretty good results fromhttp://www.jetbrains.com/profiler/

They offer a 10 day trial.

Saturday, March 24, 2012

Permissions - giving "everyone" full permissions is bad ?

Hi all,
I have developed an ASP.NET application, on my Windows XP using visual studi
o 2003 professional.
Now I want to deploy this app to a windows 2003 web edition server, so my cu
stomers can test the app.
I have prepared a new site on the windows 2003 server, and copied all files
over to this server.
It works perfectly, but when my app tries to create / write to a TXT file, i
t throws an "System.UnauthorizedAccessException" exception. If I test ASPX f
iles which does not try to create a TXT file, I get no exception.
So I go into the properties for the dir where this TXT file is, and adds ASP
NET user and gives it "modify" permissions - no luck!
I then do the same with the "IUSR_<machine>" user - no luck!
Finally, in total desperation, I add the "Everyone" user and gives it FULL a
ccess, and then my ASP.NET application works ...
My question is now :
1) How do I setup the right permissions ? I cannot be true, that I need to a
dd full permissions to the "Everyone" user account ...
Am I missing something here ? Please help me ...
Regards,
Tony Fonager, DenmarkHi Tony:
One of the best ways to debug an issue like this is to turn on
auditing for objects and then get a log of exactly who is being denied
permission.
For some more information see:
http://odetocode.com/Blogs/scott/ar.../06/22/283.aspx
Scott
http://www.OdeToCode.com
On Tue, 13 Jul 2004 12:58:02 -0700, Tony Fonager
<fonager@.newsgroups.nospam> wrote:

>Hi all,
>I have developed an ASP.NET application, on my Windows XP using visual stud
io 2003 professional.
>Now I want to deploy this app to a windows 2003 web edition server, so my c
ustomers can test the app.
>I have prepared a new site on the windows 2003 server, and copied all files
over to this server.
>It works perfectly, but when my app tries to create / write to a TXT file,
it throws an "System.UnauthorizedAccessException" exception. If I test ASPX
files which does not try to create a TXT file, I get no exception.
>So I go into the properties for the dir where this TXT file is, and adds AS
PNET user and gives it "modify" permissions - no luck!
>I then do the same with the "IUSR_<machine>" user - no luck!
>Finally, in total desperation, I add the "Everyone" user and gives it FULL
access, and then my ASP.NET application works ...
>My question is now :
>1) How do I setup the right permissions ? I cannot be true, that I need to
add full permissions to the "Everyone" user account ...
>Am I missing something here ? Please help me ...
>
>Regards,
>Tony Fonager, Denmark
Oh, forgot to mention, I think what you'll find on your 2003 server is
that the NETWORK SERVICE account will be the context trying to write
to the file.
--s
On Tue, 13 Jul 2004 12:58:02 -0700, Tony Fonager
<fonager@.newsgroups.nospam> wrote:

>Hi all,
>I have developed an ASP.NET application, on my Windows XP using visual stud
io 2003 professional.
>Now I want to deploy this app to a windows 2003 web edition server, so my c
ustomers can test the app.
>I have prepared a new site on the windows 2003 server, and copied all files
over to this server.
>It works perfectly, but when my app tries to create / write to a TXT file,
it throws an "System.UnauthorizedAccessException" exception. If I test ASPX
files which does not try to create a TXT file, I get no exception.
>So I go into the properties for the dir where this TXT file is, and adds AS
PNET user and gives it "modify" permissions - no luck!
>I then do the same with the "IUSR_<machine>" user - no luck!
>Finally, in total desperation, I add the "Everyone" user and gives it FULL
access, and then my ASP.NET application works ...
>My question is now :
>1) How do I setup the right permissions ? I cannot be true, that I need to
add full permissions to the "Everyone" user account ...
>Am I missing something here ? Please help me ...
>
>Regards,
>Tony Fonager, Denmark
Scott
http://www.OdeToCode.com
Scott,
That was exactly the account I needed to change permissions for - thanks alo
t, now I can control permissions, and I just tested it with success.
And thanks for at FAST reply :-)
-
Tony Fonager
"Scott Allen" wrote:

> Oh, forgot to mention, I think what you'll find on your 2003 server is
> that the NETWORK SERVICE account will be the context trying to write
> to the file.
> --s
> On Tue, 13 Jul 2004 12:58:02 -0700, Tony Fonager
> <fonager@.newsgroups.nospam> wrote:
>
> --
> Scott
> http://www.OdeToCode.com
>