Profile existing WCF services

Code profiling for .NET Developers

Moderators: StephenC, Alex.Davies, AndrewH

Profile existing WCF services

Postby Ninosd » Tue Jan 03, 2012 10:20 pm

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
Ninosd
 
Posts: 4
Joined: Tue Jan 03, 2012 10:13 pm

Postby Ninosd » Wed Jan 04, 2012 12:11 am

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.
Ninosd
 
Posts: 4
Joined: Tue Jan 03, 2012 10:13 pm

Postby Brian Donahue » Thu Jan 05, 2012 11:02 am

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.
Brian Donahue
 
Posts: 6669
Joined: Mon Aug 23, 2004 10:48 am

Postby Ninosd » Thu Jan 05, 2012 5:37 pm

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.
Ninosd
 
Posts: 4
Joined: Tue Jan 03, 2012 10:13 pm

Postby Brian Donahue » Thu Jan 05, 2012 6:12 pm

But you are posting all sorts of errors about installutil. And then that the service will not start (error code 5).
Brian Donahue
 
Posts: 6669
Joined: Mon Aug 23, 2004 10:48 am

Postby Ninosd » Thu Jan 05, 2012 6:26 pm

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
Ninosd
 
Posts: 4
Joined: Tue Jan 03, 2012 10:13 pm

Postby Brian Donahue » Thu Jan 05, 2012 6:32 pm

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.
Brian Donahue
 
Posts: 6669
Joined: Mon Aug 23, 2004 10:48 am


Return to ANTS Performance Profiler 5

Who is online

Users browsing this forum: No registered users and 0 guests