I'm trying to build a C# application, which uses Fiddler. I saw in the documentation somewhere, that there is supposed to be a function Fiddler.Application.Start or something like that. However, I can't find it. I'd prefer not to write a fiddler extension, because I think it will be more powerful to integrate fiddler into my app. Does anyone know how to do this?
You're really asking about FiddlerCore, which is different than Fiddler. You cannot replicate FiddlerCore by simply wrapping Fiddler.exe.
If you want to automate Fiddler, simply launch it with Process.Start. You can send commands to the FiddlerScript engine using the ExecAction executable.
Incidentally, neither Fiddler nor FiddlerCore is a COM object.
You can just do a System.Diagnostics.Process.Start() on the fiddler EXE, no?
Is this what you are looking for?
"Please note: FiddlerCore is currently undergoing a limited, Microsoft-Internal alpha. At present, there is no timeline for a broader release." http://fiddler.wikidot.com/fiddlercore
So, it appears there is no way to get FiddlerCore unless you work for Microsoft.
Related
So I have finished my application, everything works and it has been tested.... but what now? I am somewhat new to C# and I have never been in a position that I am in now.
I have a Windows server that is meant to constantly run this API, so how do I get this application out of VS? Normally I would just copy and .exe of the release build of my apps and run it like that, but that doesn't seem to work.
This sounds like a thing any C# dev should know but I can't find anything on the web, probably because "I am searching wrong", I would be really thankful I someone would show me where I can learn this part of development :D
EDIT: Thank you all for suggestions, I feel like I left out important information about the goals of my API. This API would run locally on my companies network, my employees have a good VPN on all of our devices and they are the only ones who would use the API anyways, so I felt like running it locally is the way to go for now.
You're looking for how to "Publish". This article https://www.c-sharpcorner.com/UploadFile/3d39b4/publish-and-host-Asp-Net-web-api/ will get you most of the way I'd say.
In a (really) rough summary:
Publish your code which will create the files you need a "publish" folder in the source project
Set up a site in IIS on the server (I guess you might need to set up a database too)
Copy the files to the server and make any changes you need to appsettings.json for things like db connection strings.
There are a lot of things that go into this, but with just the information you have given so far, I would suggest reading this article on publishing your API to your server.
The main issue with deployment is:
Will you do API versioning?
How you will maintain the code?
What happens when you change the code e.g. fix a bug or add a new features?
What happens when the new code does not work and you deploy it accidentally, how do you rollback it?
What kind of shutdown time is allowed?
Do you need continuous integration?
Do you need docker?
Do you need cloud?
etc...
People usually write automated deploy code nowadays, so it is not as simple as just running the code on an IIS server normally, though it depends on project size or how serious you and your bosses take it.
REST API versioning: https://www.xmatters.com/blog/blog-four-rest-api-versioning-strategies/
MsDeploy to IIS: https://learn.microsoft.com/en-us/aspnet/web-forms/overview/deployment/web-deployment-in-the-enterprise/deploying-web-packages https://dennistretyakov.com/setting-up-msdeploy-for-ci-cd-deployments-to-iis
CI servers: https://www.ahmetkucukoglu.com/en/how-to-publish-asp-net-core-application-by-using-jenkins https://www.alibabacloud.com/help/en/web-app-service/latest/08d871 https://octopus.com/docs/guides/deploy-aspnet-app/to-iis/using-octopus-onprem-teamcity-builtin
Cloud: https://learn.microsoft.com/en-us/azure/devops-project/azure-devops-project-aspnet-core
Some db versioning tools: https://www.liquibase.org/ http://dbdeploy.com/ https://flywaydb.org/
I am looking for a small utility that can perhaps sit in the tray that functions similar to Fiddler's Auto-Responder. I would be willing to write such a utility that supports taking a request and responding with data located in a file containing the response headers/body. I am writing an application is C# that would benefit from such a utility.
If there is no such utility, could someone point me in the right direct for beginning to write such an application? I ask because I figured someone out there probably knows and would point me in the right direction in no time.
Thank you in advanced for your help.
Typically we call this a web server. They listen for web traffic and automatically respond to it with a file, typically a webpage. Apache is cheap. I think MS has a free IIS package too.
You haven't explained what's wrong with simply using Fiddler itself? If you run it using the -quiet command line argument, it sits quietly in the tray.
If you want to write your own application in C#, you can do so using FiddlerCore; see http://www.fiddler2.com/core/ for more details.
I have got problem, I need to download graphics from next site
http://www.kakioka-jma.go.jp/cgi-bin/plot/plotSetNN.pl?lang=en
I am using PowerShell, I need to create POST request to Plot the image (see Plot button). The problem that I do now know how it's can be done in PowerShell. Before I used function 'System.Net.WebClient' for downloading, and created url for it with
I googled and find how POST request may be done in C#, and I tried to built them in one script. http://www.everfall.com/paste/id.php?2ppnztfqx3we
But it's not working, it's even do not print "Hello World", and I do not know how to get it's work.
But the main question - not get this code to work, but to find the easiest way to load that graphics, and it would be good if it would on Powershell.
I have seen "Http Rest" script, but it's to hard even to understand does it do what I need, I even do not talk about to modificate it's for my work. I need the simplest way, because my knowledge in programming it now good.
I wrote a series a while back on Splatting (a language technique in PowerShell V2). The last item in the series provides a wrapper on the Net.WebClient class that makes it easier to send requests via Post.
The blog explains a lot about how the client object works, and you can read that if you want:
http://blogs.technet.com/b/heyscriptingguy/archive/2010/10/22/make-windows-powershell-your-web-client.aspx
Or you can download the script directly from the Script Center Repository:
http://gallery.technet.microsoft.com/ScriptCenter/en-us/7e7b6bf2-d067-48c3-96b3-b38f26a1d143
Hope this Helps,
It sounds like curl could be useful for you. It will deal with the trickier aspects of posting data to a web service.
I've used it myself to download text and parse through it with PowerShell. I had a batch file to call curl, the batch file was called from a powershell script. Sounds the long way around but it worked quickly and I didnl't have to put much time in!
I'm on my phone and don't have any examples here, if you interested I can have a look for them later.
HTH,
Matt
I have a unit testing framework for WP7 and it runs on the phone. The results are fairly hard to read so I am writing them to an XDocument.
My question is, how can I then get this XML file off of the phone and onto my desktop where I can actually analyze the results?
What I have done so far is to put a Debugger.Break() line right after where the summary xml is created. I can then copy/paste the xml out of VS or inspect it right in the debugger. The problem is though, that if you don't already have a debugger attached (which is good when lots of ExpectedException tests) Debugger.Attach() seems to not work, also manually attaching VS to the emulator processes seems to do nothing.
I tried running the emulator with some extra command line parameters so I could try to see if I could get it to use my actual hard drive as it's own disk but I couldn't seem to get it to work...
PS it's probably not reasonable to pop open a new process such as a webserver to listen for this data. I know how to do that, I would just rather not.
So how the heck do you get stuff off of these phones??
Have a look at this article about emulator automation from Justin Angel.
It includes details on how to remotely read and write files from/to emulator/device isolated storage.
As you pointed out the other alternative would be to have the applciation send the results to a [local] web server.
The article by Justin Angel is really great, but unfortunately his file-based solution does not work on the final RTM versions of the CoreCon API. Microsoft has simply removed that functionality from the native conman layer.
I've been in the same situation as you and have contemplated various ways to get data out of the device, but in the end only one thing seems to work: as you suggest yourself, pass data to an external webservice.
That solution is less than ideal not only because it takes some effort, but also because of a few caveats:
your app must be granted ID_CAP_NETWORKING capability
network-traffic seems disallowed in the Application_Closing event, and maybe elsewhere too
On the bright side I found that webrequests from the phone, both hardware and emulator, were really fast so the approach works very well (our app is EQATEC Profiler for WP7).
In my win forms C# app, I want to be able to add spell check functionality. But, I want to do it my own way, and NOT use any other components. All I need is just an online service where I can send a request or something and it tells me whether or not the word i sent was spelled correctly.
Preferred but not required: The ability for that online service to also send back suggestions.
Personally, I wonder why you want only online access...what if you lose connection? Also, most online accesses come with restrictions.. which you might hit sooner than you think during debugging.
If you were to use WPF, I'd suggest using the SpellCheck Class.
Since you specified Windows.Forms, you might try the NetSpell library for offline access. You can also try and use Microsoft Word's spellchecker, but you might not have it installed on the machine (or use Linux & Mono)
If you persist on using online access, you can use Yahoo, as Giovanni Galbo says. It's been done in C# before.
A quick google search turned up this:
Search Web Services: Spelling Suggestion
This is not c#/.NET specific. Its a simple REST service provided by Yahoo!. It looks like they do limit you to 5,000 queries per day for free and I'm not sure if Yahoo! lets you upgrade to a pay service.