Why is Fiddler keep capturing sessions when I start web API service? - http

I'm a newbbie to Fiddler, and I really need it in my web debugging. I tried to search for how to use it, but there is no much useful topics on this, may be due to its easiness!
What I'm trying to do is to capture the session from my Web API service. However, as soon as I start the service in Fiddler, it starts to capture a lot of sessions, and keep adding to its list, none of them seems to be what I requested.
I'm following a tutorial on YouTube, where the tutor starts the service and issue a GET request and Fiddler stores just this session.
Is there any configuration I can do to get it working like that?
This is what Fiddler looks like when I start the Web API service:
EDIT
I used filters to block sessions from vshub, but still not getting any records for the service at all!

Related

Application Insights shows GET calls while my code does not have any such calls being made

We have integrated Azure Application insights with our bot built using Azure bot framework using node.JS and typescript. Everything looks fine and we can see telemetry data flowing in.
In the failures section, we can see Operation name "GET /api/messages" showing repeated times - one failed call (405) and one success call (200).
But we have no GET operation being done on "/api/messages" in our code. We only have "POST" operations.
We are unable to understand why telemetry shows GET operation and one as failed and one as success.
Any help is appreciated.
The operation_SyntheticSource field of request telemetry is often used by microsoft / azure to indicate traffic that is generated by infrastructure or bots. Examples are health requests, keep alive traffic, spider bots.
There are options to filter out telemetry, so it is possible to filter out telemetry cause by synthetic traffic. See the docs.
Telemetry processors can be configured using DI.

How to troubleshoot failed requests to Azure web services

I have a ASP .NET Core MVC web service hosted in Azure to which I would like to POST data. I am able to post from Postman so I know the service is working and the required format of the request. I have another client sending what I believe to be the same post request but somewhere the request is failing. I would like to confirm the requests are reaching the service and if so see exactly what the request looks like when it gets there so I can compare to the working version. I have enabled web logs on the service but what info I can find as a result does not provide detail of the failed request. I also downloaded logs via the Cloud Explorer in Visual Studio but again I cannot see the content of the request to troubleshoot. I'm sure I'm not utilizing the logging fully but I'm not familiar enough with Azure web services to know what I'm missing and am having trouble finding guidance on the web. Perhaps it is not possible to capture the failed post data for security reasons? If so then presumably I need to hook up a debugger and see if I can step through the processing of the request.
What would be the most effective way to troubleshoot failed web service requests?
After further research I found an excellent reference on troubleshooting Azure Web Services at https://learn.microsoft.com/en-us/azure/app-service-web/web-sites-dotnet-troubleshoot-visual-studio. Using the information and tools covered there I was able to resolve my problem which ultimately proved to be a problem sending the request. Watching the web server logs it became clear the client's request was never reaching the server.

Server disables page after several GET requests from SIM908

I set up a free domain on 000webhost.com
I am using this as a web server to receive data from SIM908+arduino setup and store it in the database. Then display it on a web page.
I am sending the data from the SIM908 using HTTP GET requests. Basically I am sending two pieces of information, one is the location (lat and long) and other is a string. Both are sent using GET requests. The problem is very unusual so bear with me. EVERYTHING WORKS FINE, for a while. After several GET requests are sent, for some reason, 000webhost just deactivates my domain. I simply cannot access it. Every time I try to browse to the page it times out. It remains like this for around 7-8 hours after which the domain works fine again. I tried another hosting byethost.com, but GET requests from the SIM908 do not work there at all. Everything is 100% OK. The code, arduino setup everything is fine. My question is why is 000webhost stopping my domain? Really need a good answer or at least some direction, i am completely lost.
**NOTE: Please don't suggest POST method unless you explicitly know how to perform a POST operation using SIM908 AT commands, as far as I know it's not possible.
You are using the free webhost which has limitations. They will block you if your site is getting too much requests. Just read the limitations of free accounts with the server.
Look for a better free service or buy one. There is no issue with sim900 or arduino.
The following hosting service providers might be better than the one you are currently using in terms of limitations
Host Buddy You would get two months free
Free Hostia
Free Hosting .eu

How to oconsume JWT's from identityServer in ASP.NET REST API

I have spent days trying to get up to speed on this but everything has changed since I last touched a web project and I'm utterly overwhelmed right now, and getting nowhere. I'm trying to put together the pieces for an implicit grant flow - just a simple web API that respects the tokens issued by my local instance of I.S.
I have been able to download and configure I.S. v2 locally. I've got it issuing authentication tokens in JWT format after sending the browser to the login page. I can see the token info come back as part of the redirect URL from IS, like 'access_token=...&token_type=urn:ietf:params:oauth:token-type:jwt&expires_in=599'.
So now I need to configure my asp.net API site to accept these tokens, and I can't figure out how. As I said, I haven't done web work in a while so Owin, WIF, and many more things involved here are brand new to me all at once.
What are the key steps I need to do have my API site accept these tokens? I guess I'm not sure what packages to include, what goes into the web.config related to the WIF aspect, do I need to write any code to make it work, or should there be some combination of config settings that just activate it? Do I need to create a custom ClaimsAuhtorizationManager?
Please, I'm bad shape here, I've been looking at this stuff for days and I still don't know enough to even figure out what else to try. Every sample I've found has had a significant different from my situation, rendering it unhelpful to me (most point to Azure or ADFS, or use the old classes which are now deprecated). It's not for a lack of effort, I've been reading everything I can get my hands on and scouring the web for days.
Thanks in advance for any help.
IdSrv issues standard JWT tokens - so there is nothing specific to it.
You can e.g. use the JWT handler from Microsoft. For Web API v2 the typical way would be to use the JWT middleware - here is a sample:
https://github.com/thinktecture/Thinktecture.AuthorizationServer/blob/master/samples/Flows/ResourceServer%20(Web%20API%20v2)/App_Start/AuthConfig.cs

Implement User Activity Tracking

I am working on an ASP.NET website with sql server 2008 R2.
i need to implement a tracking system to track user activity as which pages the user browsed which item liked and so on
i have a lot of options and tried couple of them
i tried to send an insert with every page the user browses but it
turned out a huge load on the sql server and after two days i
removed it
I had a solution is to buffer the users history in xml and flush them every 500 records in the database. it is working fine but it would be bad when users number increase
I had found there is message queues like MSMQ and SQL Service Broker but i didnt go any further in this
In the end i would like to hear your suggestions and recommendations as well as your comments for the MSMQ and SQL Service broker and if i should go for them and to which one of both and why
You can try using a logging framework like log4net or nLog which gives you the flexibility to log to various targets and also use buffering / asynchronous logging to reduce the load.
I would use something like Google analytics. It's easy, you just put the boilerplate code into your pages, and google does the rest.

Resources