Options

Profile existing WCF services

I have two WCF services that I want to profile, I saw this link but it's not helpful, as the installUtil is failing with the below exception, note I added the SVC files in the bin folder which contains all required DLLs.

http://www.red-gate.com/supportcenter/C ... htm#o11695

C:\Program Files\Microsoft Visual Studio 10.0\VC>installutil -LogToConsole=true -ShowCallStack C:\Te
stPublish\From2010\bin\MyService.svc
Microsoft (R) .NET Framework Installation utility Version 4.0.30319.1
Copyright (c) Microsoft Corporation. All rights reserved.

Exception occurred while initializing the installation:
System.BadImageFormatException: Could not load file or assembly 'file:///C:\TestPublish\From2010\bin
\MyService.svc' or one of its dependencies. The module was expected to contain an assembly
manifest..

Thanks,
Ninos

Comments

  • Options
    Ok, so I was trying to use installUtil without creating a new Windows Service project, but there's no way around that. Now I have a Windows service that references my WCF service project following the steps in this URL

    http://msdn.microsoft.com/en-us/library/ff649818.aspx

    But, as the above URL says to copy the app.config from the WCF project, I assume it means the web.config, so that's what I have copied.

    I have a service installed now, Service1, but every time I try to start it, it fails with Error 5: Access is denied.

    So, can you please direct me as how I can profile a WCF service with your profiler?

    Thanks.
  • Options
    Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    I'm afraid I don't understand how this relates to ANTS Performance Profiler. You must have an installed, working codebase before you can attempt to profile it, as it is not a static analysis tool.
  • Options
    Brian,

    I see that you didn't even read the post. I gave some extra info on the things I've tried to profile a WCF service with your profiler.

    I hope my question is clear.
  • Options
    Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    But you are posting all sorts of errors about installutil. And then that the service will not start (error code 5).
  • Options
    Like I said, I've posted extra information in regards the steps I've taken and the outcome I got. So please just disregard that and answer my question.

    How do you profile a WCF service with your profiler? And I have version 5.2
  • Options
    Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    I still don't see any information relevant to profiler in the previous text. But WCF can be hosted in any type of application and the profiler only cared about the process type, such as desktop application, windows service, or WCF hosted in IIS.

    And I'm not sure what you have - is it hosted in a Windows Service? Then you would use the option to profile a Windows Service.

    However, there is also information about web.config and .svc files, so I can't tell if your code is a Windows Service or a WCF hosted in IIS.
Sign In or Register to comment.