Choosing Local Webpage

mnsrkmnsrk Posts: 4
Hi,

I'm using ANTS Profiler Trial Version. When I click on Start the Profiler, I get a message "Machine Onlineapps is not local. ANTS Profiler cannot profile remote web applications...". I'm really surprised because this morning I had a older version of ANTS Profiler Trial Version and it worked with the same URL without any issues. I installed the newer version (Trial) and then it started giving me this error. The URL I entered is of local machine except that I cannot use Localhost or machine name but I configured my website with a different name (onlineapps). When I compile my code in .NET and launch browser for debugging, I get the same URL. Appreciate your inputs.

Mohan

Comments

  • Hello Mohan,

    If you have multiple websites and need to pass in the correct host header by manually changing the address bar in ANTS Profiler, you should be able to bypass this error message by putting an alias entry in your hosts file that resolves the address to your local IP. The hosts file is kept in %SYSTEMROOT%\system32\drivers\etc. Try adding a line to this like the example below:
    # Copyright (c) 1993-1999 Microsoft Corp.
    #
    # This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
    #
    # This file contains the mappings of IP addresses to host names. Each
    # entry should be kept on an individual line. The IP address should
    # be placed in the first column followed by the corresponding host name.
    # The IP address and the host name should be separated by at least one
    # space.
    #
    # Additionally, comments (such as these) may be inserted on individual
    # lines or following the machine name denoted by a '#' symbol.
    #
    # For example:
    #
    # 102.54.94.97 rhino.acme.com # source server
    # 38.25.63.10 x.acme.com # x client host

    127.0.0.1 localhost
    #[My local IP (get this from ipconfig)]{TAB}[machine name]{TAB}[alias]
    10.1.1.87 BRIAN OnlineApps
  • Brian,

    After adding the address in the local host, I got the following error message in the Event Log when I tried to start the profiler.

    Event Type: Error
    Event Source: ANTS Profiler
    Event Category: None
    Event ID: 0
    Date: 9/7/2005
    Time: 11:54:02 AM
    User: N/A
    Computer: MAXCONSULT2
    Description:
    Unable to start profiler - exception details System.Exception: Failed to start profiling web application because a communications link cannot be established with ANTS profiler service.

    Server stack trace:
    at RedGate.Profiler.Engine.ProfilingSession.StartProfiler()
    at System.Runtime.Remoting.Messaging.StackBuilderSink.PrivateProcessMessage(MethodBase mb, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext, Object[]& outArgs)
    at System.Runtime.Remoting.Messaging.StackBuilderSink.AsyncProcessMessage(IMessage msg, IMessageSink replySink)

    Exception rethrown at [0]:
    at System.Runtime.Remoting.Proxies.RealProxy.EndInvokeHelper(Message reqMsg, Boolean bProxyCase)
    at System.Runtime.Remoting.Proxies.RemotingProxy.Invoke(Object NotUsed, MessageData& msgData)
    at System.Windows.Forms.MethodInvoker.EndInvoke(IAsyncResult result)
    at ᐃ.ᐄ(IAsyncResult )
  • This seems fairly straightforward...

    ANTS Profiler has a Windows Service back-end. This communicates on TCP port 8087. If the service does not start because something else is using this port, then you can change it by making a registry key called
    HKEY_LOCAL_MACHINE\Software\Red Gate\ANTS Profiler\Communications Port
    This should be a string value with the port number inside. After changing this, you should be able to stop and restart the ANTS Profiler service.
  • Thanks Brian. You are the best. I'm able to run the profiler (latest version).

    Mohan
  • My pleasure!
This discussion has been closed.