AppD Archive

IIS / ASP.NET Lightswitch HTML Client requests not collected by AppDynamics

CommunityUser
Splunk Employee
Splunk Employee

Hello all,

I have a web application hosted on IIS 8 running on Windows Server 2012 implemented using Microsoft Lightswitch HTML Framework on Visual Studio 2013

I've installed the .NET AppDynamics Agent for IIS on the machine, no requests (except Login.aspx and LogOut.aspx) are recognized by AppDynamics.

Below are examples of network activity captured from Chrome Dev Tools that I was expecting also to visualize in AppDynamics Controller.

All HTTP requests that take place in the webapp are going to http://xxx.xxx.xxx.xxx/TripManager/OLA_Data.svc OR  http://xxx.xxx.xxx.xxx/TripManager/OLA_ViewData.svc but none of these, which represent the activity on the website, are captured.

(OLA_Data and OLA_ViewData are the two datasources defined in Visual Studio while developing the webapp)

Example of a POST request 

  1. Request Method: POST
     
    Request Headers
    POST /TripManager/OLA_Data.svc/$batch HTTP/1.1
    Host: xxx.xxx.xxx.xxx
    Connection: keep-alive
    Content-Length: 847
    Authorization: Basic dHJpcGFkbWluOnRyaXBhZG1pbg==
    Accept: multipart/mixed
    MaxDataServiceVersion: 3.0
    Origin: http://xxx.xxx.xxx.xxx
    DataServiceVersion: 1.0
    Content-Type: multipart/mixed;boundary=batch_1daa-72cd-62f2
    Referer: http://xxx.xxx.xxx.xxx/TripManager/HTMLClient/
    Accept-Encoding: gzip,deflate,sdch
    Accept-Language: en-US,en;q=0.8,pt;q=0.6
    Cookie: ASP.NET_SessionId=2fyadpqr0mtyh2okjduxb2ec; TripManager=57AB95CA9E2A7213ACD03A1130A4A33C5DF1DFB250559A893100179379016DD208051F11FE331EE6997C9A2ECEF7B1D0015C16FEA1011569D01FB985A124739307CE4270F901149C9E051329E3C76D578458B11A3F63454488BD75B05EF9E54D8BD703A7A0E6E84C59EC6BED21E8A199846FC4EAB35589C964FFDE54B591EF9BFB199DF12C8466C7CC0295EABEAE48FF; msls-client-parameters=preferredLanguage=en-US
     
     
    Request Payload
    --batch_1daa-72cd-62f2
    Content-Type: multipart/mixed; boundary=changeset_bbb4-26ca-ece0
     
    --changeset_bbb4-26ca-ece0
    Content-Type: application/http
    Content-Transfer-Encoding: binary
     
    POST Runs HTTP/1.1
    Content-ID: 0
    DataServiceVersion: 3.0
    Accept: application/atomsvc+xml;q=0.8, application/json;odata=fullmetadata;q=0.7, application/json;q=0.5, */*;q=0.1
    Content-Type: application/json;odata=verbose MaxDataServiceVersion: 3.0 {"Trip_ID":522,"Odometer":500,"Location":{"__metadata":{"uri":"http://xxx.xxx.xxx.xxx/TripManager/OLA_Data.svc/Locations(130)"}},"DockTime":"15:10","DepartTime":"16:00","ShipmentNo":"nv1","WorkType":{"__metadata":{"uri":"http://xxx.xxx.xxx.xxx/TripManager/OLA_Data.svc/WorkTypes(10)"}},"ArrivalTime":"15:10","LoadID":"nv1"}
     
    --changeset_bbb4-26ca-ece0--
    --batch_1daa-72cd-62f2--
     

Example of a GET request 

 

  1. Request Method: GET
     
    Request Headers
    GET /TripManager/OLA_Data.svc/TripsSearch()?$orderby=Trip_ID%20desc&$expand=Driver/DriverGrade,Driver,Vehicle3,Vehicle2,Vehicle1,Vehicle4,Customer&$top=45 HTTP/1.1
    Accept: application/json;q=0.8, application/json;odata=fullmetadata;q=0.7, application/atomsvc+xml;q=0.5, */*;q=0.1
    Accept-Encoding: gzip,deflate,sdch
    Accept-Language: en-US,en;q=0.8,pt;q=0.6
    Authorization: Basic dHJpcGFkbWluOnRyaXBhZG1pbg==
    Connection: keep-alive
    Cookie: ASP.NET_SessionId=2fyadpqr0mtyh2okjduxb2ec; TripManager=59BCB34F334311579987F7BFBA0899CC5D1A9C8FE5459E1491D5F8CEE22EAEF3335D25BBEFC6EF66AB0AB79EA7D7F2780C3622CDF6DABDFF7EA97D0D29DA594498121710FCF282102B1B87AE9FC43909D9EC53B063296FAD16AEC2A09B4B6ECD57E574BBADE304C1F5482E172E26FEEB6AFEF115D6756C2A8A2090FAC8E8D48E68CCE51C4D9ED28B148A919EEACCCC7E; msls-client-parameters=preferredLanguage=en-US
    Host: xxx.xxx.xxx.xxx
    MaxDataServiceVersion: 3.0
    MinDataServiceVersion: 3.0
    Referer: http://xxx.xxx.xxx.xxx/TripManager/HTMLClient/
     
    Query String Parameters
    $orderby: Trip_ID desc
    $expand: Driver/DriverGrade,Driver,Vehicle3,Vehicle2,Vehicle1,Vehicle4,Customer
    $top: 45

Other GET request URL examples

http://xxx.xxx.xxx.xxx/TripManager/HTMLClient/OLA_Data.svc/WorkTypes?$filter=WorkType_ID%20eq%20null

http://xxx.xxx.xxx.xxx/TripManager/HTMLClient/OLA_Data.svc/Products?$filter=Product_ID%20eq%205

 

 

 

What suggestions do you have so that I can capture all HTTP requests that hit IIS?

 

Thank you

0 Karma

CommunityUser
Splunk Employee
Splunk Employee

Hi Ihellyer,

Thank you for reaching out to us. It looks like the lightswitch framework uses WCF Data Services over the ODATA protocol in the middle tier (hosted in IIS). In order to monitor WCFDS, please add the following to your config.xml. You can find config.xml under

%ProgramData\AppDynamics\DotNetAgent\Config

Under the machine agent node

<machine-agent>

 

<instrumentor name="WCFDSEntryInstrumentor" enabled="true" /> 

 

</machine-agent>

After saving the config.xml please restart IIS(iisreset from an elevated command prompt)  and AppDynamics.Agent.Coordinator service (from services.msc).

Let us know if that helps.

Cheers

0 Karma

CommunityUser
Splunk Employee
Splunk Employee

Hello Amod Gupta,

I've added those configuration lines to config.xlm (and restarted IIS and AppDynamics service), but awhen I do that no events are displayed in the controller after multiple tests. Not even the Login.aspx and Logout.aspx.

Here's how my config.xml looks like after adding tohse lines:

<?xml version="1.0" encoding="utf-8"?>
<appdynamics-agent xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <controller host="<removed>.saas.appdynamics.com" port="443" ssl="true">
    <application name="IIS" />
    <account name="<removed>" password="<removed>" />
  </controller>
  <machine-agent>
    <instrumentor name="WCFDSEntryInstrumentor" enabled="true" />
  </machine-agent>
  <app-agents>
    <IIS>
      <automatic />
      <applications />
    </IIS>
  </app-agents>
</appdynamics-agent>

 I've tried it both with the Machine Agent running and not running - the result is the same.

Do you have any other suggestion?

Thank you

0 Karma

CommunityUser
Splunk Employee
Splunk Employee

Right after posting the previous message, decided to give a look at the log file and noticed that there was an error

2014-05-26 09:46:32.8711 3288 dllhost 1 3 Info ConfigurationLoader Reading configuration file: C:\ProgramData\AppDynamics\DotNetAgent\Config\config.xml
2014-05-26 09:46:33.1221 3288 dllhost 1 3 Error ConfigurationManager Error reading the configuration file: There is an error in XML document (8, 6).
The element 'machine-agent' has invalid child element 'instrumentor'. List of possible elements expected: 'node, perf-counters, tier, assembly-black-list, historical-nodes, instrumentation'.
2014-05-26 09:46:33.3622 3288 dllhost 1 3 Info ConfigurationManager Apps:

So I updated the config.xml file with

  <machine-agent>
    <instrumentation name="WCFDSEntryInstrumentor" enabled="true" />
  </machine-agent>

 But then got this error in the log file

2014-05-26 10:09:44.5094 284 dllhost 1 3 Info ConfigurationLoader Reading configuration file: C:\ProgramData\AppDynamics\DotNetAgent\Config\config.xml
2014-05-26 10:09:44.7674 284 dllhost 1 3 Error ConfigurationManager Error reading the configuration file: There is an error in XML document (8, 22).
The 'name' attribute is not declared.

How can I fix this error?

Thank you

0 Karma

CommunityUser
Splunk Employee
Splunk Employee

Ok, so after digging into AppDynamics documentation I now understand that the syntax must be as follows:

<machine-agent>
  <instrumentation>
    <instrumentor name="WCFDSEntryInstrumentor" enabled="true"/>
  </instrumentation>
</machine-agent>

Now I can see many more events in the controller 🙂

Thank you so much for your help Amod Gupta.

I have a new question though 🙂

I'd like to eliminate part of the Business Transaction name, and make some kind of rules to organize some of them together.

For example this is how the Business Transactions are listed in the Controller:

/TripManager/OLA_Data.svc./TripManager/OLA_Data.svc/Activities

/TripManager/OLA_Data.svc./TripManager/OLA_Data.svc/Products
/TripManager/OLA_Data.svc./TripManager/OLA_Data.svc/Product_Deliveries

For these first type of transactions I can (and I have) simply rename them via the Controller interface, so that they are listed as List Activities, List Product and List Product_Deliveires respectively.

But there's a second group of transactions, that include parameters, but I'd like to have them all into their own type of transactions


/TripManager/OLA_Data.svc./TripManager/OLA_Data.svc/Runs(Run_ID=1057,Trip
/TripManager/OLA_Data.svc./TripManager/OLA_Data.svc/Runs(Run_ID=987,Trip
/TripManager/OLA_Data.svc./TripManager/OLA_Data.svc/Runs(Run_ID=319,Trip

(These should be Edit Run)


/TripManager/OLA_Data.svc./TripManager/OLA_Data.svc/Trips(Trip_ID=524)
/TripManager/OLA_Data.svc./TripManager/OLA_Data.svc/Trips(Trip_ID=237)
/TripManager/OLA_Data.svc./TripManager/OLA_Data.svc/Trips(Trip_ID=194)

(These should be Edit Trip)

How can I do that? Is there anywhere in the controller, or in config.xml where I can build rules or dynamically rename transactions?

Thank you again.

0 Karma

CommunityUser
Splunk Employee
Splunk Employee

Hi Ihellyer,

Glad to know that it solved your problem and all of your business transactions (BT) are showing up now.

As for your other question, have you tried setting up custom match rules (in the controller) for your BTs? You can find more infromation about them in our docs (links below)

http://docs.appdynamics.com/display/PRO13S/Configure+Business+Transaction+Detection#ConfigureBusines...

Take a look at the Custom Match Rules section. If you create a rule using part of your URI (/TripManager/OLA_Data.svc./TripManager/OLA_Data.svc/Runs) it should ignore the parameters that follow. Let me know how it goes also if you have any problems accessing the link above.

 

Thanks

0 Karma
Get Updates on the Splunk Community!

Dashboards: Hiding charts while search is being executed and other uses for tokens

There are a couple of features of SimpleXML / Classic dashboards that can be used to enhance the user ...

Splunk Observability Cloud's AI Assistant in Action Series: Explaining Metrics and ...

This is the fourth post in the Splunk Observability Cloud’s AI Assistant in Action series that digs into how ...

Brains, Bytes, and Boston: Learn from the Best at .conf25

When you think of Boston, you might picture colonial charm, world-class universities, or even the crack of a ...