locked
Code Profiling for ASP.NET application RRS feed

  • Question

  • Hi:

    I have looked through this forum and ASP.NET forum and could not find the solution.  SO I just ask my question here.

    I had a file system ASP.NET application, run in http://localhost:1351/MyAspApp.  I wanted to use code profiling to test the performance, so I followed the MSDN Library to set the performance session through Performance wizard.  However, after launching the performance session, I got the following message:

    Launch Error: The web site could not be configured correctly; getting ASP.NET process information failed. Requesting 'http://localhost:48185/MyAspApp/VSEnterpriseHelper.axd' returned an error: The information returned is invalid.
    PRF0017: Can't launch server for 'D:\Bronx\Scrum\MyAspApp'.

    I checked with Visual Studio folder and saw Microsoft.VisualStudio.Enterprise.AspNetHelper.DLL in the right folder.  From Visual Studio TechNote articles, I added certain tag into web.config, but VS told me could not find this DLL.

    Did I forget something?  Not configure well?

    By the way, I tried CLR Profiler also, but this time CLR Profiler just showed the help screen and won't go any longer.

    Friday, April 7, 2006 11:40 PM

Answers

  • Here are some random troubleshooting ideas:

    One thing that stands out is you say it's running on port 1351 but the profiler was attempting port 48185.   Are you doing anything "sticky" with the 1351 port number?  Do you have two instances of the profiler going at the same time (for example one is still running when you launch the profiler against the other one?) Is there any difference between file permissions on the D:\Bronx\Scrum\MyAspApp folder than the default permissions you'd find in a project created under the "My Documents" folder? 

    If any of the above, you may want to close all instances of IDE, close any remaining web server icons lingering in the task tray, then open again using the default generated port numbers from a known state.  That would help me troubleshoot further. 

    Also, I haven't updated the title for RTM yet, but here's a post I put up a while ago that maps out some of what is and isn't possible with profiling, I believe it is all still current info:
    https://blogs.msdn.com/ejarvi/archive/2005/04/08/406578.aspx

    If you do have some special configuration needs not baked into the IDE support and don't mind dropping down to the command line scripting level, check out this "off-road" article: http://blogs.msdn.com/graycode/articles/AspNetOffRoadProfilingArticle.aspx

    Hope that helps, good luck, and thanks for using the profiler!

    Eric Jarvi
    http://blogs.msdn.com/ejarvi

    Monday, April 10, 2006 4:27 PM
  • Hi:

    I found the solution.  Eric posted the solution on April 6, 2006 at his blog:

    Performance Wizard Error

    https://blogs.msdn.com/echarran/archive/2006/04/06/570156.aspx

    When I removed the deny users="?", then it works.

    Thanks!

     

    Tuesday, May 2, 2006 10:11 PM

All replies

  • Here are some random troubleshooting ideas:

    One thing that stands out is you say it's running on port 1351 but the profiler was attempting port 48185.   Are you doing anything "sticky" with the 1351 port number?  Do you have two instances of the profiler going at the same time (for example one is still running when you launch the profiler against the other one?) Is there any difference between file permissions on the D:\Bronx\Scrum\MyAspApp folder than the default permissions you'd find in a project created under the "My Documents" folder? 

    If any of the above, you may want to close all instances of IDE, close any remaining web server icons lingering in the task tray, then open again using the default generated port numbers from a known state.  That would help me troubleshoot further. 

    Also, I haven't updated the title for RTM yet, but here's a post I put up a while ago that maps out some of what is and isn't possible with profiling, I believe it is all still current info:
    https://blogs.msdn.com/ejarvi/archive/2005/04/08/406578.aspx

    If you do have some special configuration needs not baked into the IDE support and don't mind dropping down to the command line scripting level, check out this "off-road" article: http://blogs.msdn.com/graycode/articles/AspNetOffRoadProfilingArticle.aspx

    Hope that helps, good luck, and thanks for using the profiler!

    Eric Jarvi
    http://blogs.msdn.com/ejarvi

    Monday, April 10, 2006 4:27 PM
  • Hi Eric:

    Thanks for the response.  Maybe I did not describe very clear, let me describe it again:

    • My ASP.NET application run on http://localhost:1351/MyAspApp in debug mode
    • No instance run in Visual Studio 2005
    • After I created a performance session and click "Launch" button, the instance in port 1351 created, I thought Profiler to be compiling my application (right?)
    • After the compilation, the error message displayed no matter how the port 1351 icon displayed in task bar or not; if this icon displayed, then there will be 2 local web servers displayed with ports 1351 and 48185

    Maybe this is the problem, in my Default.aspx page, there is no contents in this page; instead a code-behine page uses the Response.Redirect method to redirect the web page to a lohin page in \Pages\Login\Login.aspx immediately, and displayed the login page.  I tried to use Red Gate's ANTS Profiler and it said there is no ASP.NET application in this ASP.NET application.

    Thanks for help!

     

    Tuesday, April 11, 2006 5:52 PM
  • Hello
    I did the following and it worked just fine for me.
    1. Created New ASP.net project using file system
    2. Add a logon.aspx page to the project
    3. Added code in the Default.aspx Page_Load to redirect to logon.aspx page
    4. Ran the app under debugger to make sure it worked.
    5. From the Tools menu I select Performance Tools ->Performance Wizard.
    6. Took the default target which is the physical path to my ASP.Net app not a URL
    7. Clicked Next  and selected Instrumentation and then clicked Finish.
    8. In Performance Explorer I click the "Launch" button to profile my asp.net app.

    I then saw a new ASP.Net Development Server run and IE come up with my logon.aspx page. I did some work on my logn.aspx paged and then closed IE when I was finished.

    After that a profile report was generated and I could view it in the IDE.

    Thanks
    Brian [MSFT]
    Microsoft Developer Support
    This posting is provided "AS IS" with no warranties, and confers no rights.

     

    Thursday, April 13, 2006 8:24 PM
  • Hi:

    Thanks for help!  I think I found the problem.  Based on your suggestion, I created a new ASP.NET application and the profiler worked, great!  So the problem that why MyAspApp did not work is this web application was created with VS 2005 Beta 2.  I have another test machine also installed the Visual Studio 2005 Team Developers Edition, I moved the new ASP.NET application I created to that machine, the profiler works.  I moved MyAspApp to that machine, the profiler showed the same error (of course with different port numbers).

    Any suggestion that MyAspApp could work with profiler without recreating the web site?

    Thanks!

     

    Friday, April 14, 2006 3:01 PM
  • Hello
    I would suggest that you make sure the Use Dynamic Ports property for your project is set to true. If this ASP.Net app that you created with the beta continues to fail I would create a new Web Site project and then add the files from your old project to the new one and see if that fixes it.

    Thanks
    Brian [MSFT]
    Microsoft Developer Support
    This posting is provided "AS IS" with no warranties, and confers no rights.

    Monday, April 17, 2006 7:54 PM
  • Hi:

    I'll try to recreate a web site if there is still no way to tell why ASP.NET application beta code could not work with RTM profiler.

    Thanks!

     Tzu-Yie

    Tuesday, April 18, 2006 1:33 PM
  • Hi:

    I found the solution.  Eric posted the solution on April 6, 2006 at his blog:

    Performance Wizard Error

    https://blogs.msdn.com/echarran/archive/2006/04/06/570156.aspx

    When I removed the deny users="?", then it works.

    Thanks!

     

    Tuesday, May 2, 2006 10:11 PM