ISAPI filter using C# - c#-3.0

Most of the article in web talking about using C++ for creating ISAPI filter dlls. Is it possible to create an ISAPI filter using C# ? My requirement is to catch few Request and Responses and process it further, including verifying the existing URL in database and redirecting.
Is it possible to achieve the same using C#? Thanks in advance.

You can you http handler to do that.Msdn have a good article"http://msdn.microsoft.com/en-us/library/ms228090(v=vs.85).aspx" .Hope it helps

Related

How do I use the GRAKN.AI REST API?

I am trying to make GRAKN API calls from a Chrome extension, but I cannot figure out how to make those calls.
I have only ever used heavily documented APIs (Twitter, Facebook, etc.) so I am not sure how to go about reading and writing from an to the database from Javascript just based off of reading this.
Any help would be greatly appreciated!
The Grakn REST API is specified here:
https://github.com/graknlabs/grakn/blob/master/docs/api.yaml
Each path under 'paths' can be adjoined to the base url (localhost:4567, by default), e.g.,
localhost:4567/kb
There are further paths in the results you can then follow.

Implement a multithreat in gwt with http request

I need implement a system with multithreat in GWT.
What is the best way to do this???
I am using http request, json
and web service building in php
Thanks
GWT code is translated to JavaScript which is not multithreaded (or at least, not in a way accessible to the user).
There are ways to program around tasks and callbacks in GWT. Take a look at the Scheduler class.

How to start with writing a RESTful service?

I am trying to create a RESTful web service that accepts JSON arguments and gives out a JSON response.
What I want is to accept HTTP requests made to my URL endpoint.
Something like,
POST /the/endpoint HTTP/1.1
Host: mywebsite.com
{"name":"yourname", "department":"your_department"}
Do a DB read at the backend and give relevant parameters like, say Manager name, salary etc as a JSON object, as the response.
What's the best way to go about it? I was thinking of using Java servlets for this? Is there a better way?
PS - I am just getting started so detailed answers or links to tutorials as to how to implement it would be much appreciated.
Thanks.
Yes you can easily do this with Servlets and some Json Libs for Marshalling /unmarshalling the Json Object to Java Object.
You can make use of Json libs like
Jackson ,
Gson etc
But you must know that REST application doesnt end with just handling the request and response , but it needs to take care of other non-functional requirements like
Authentication
Authorization
Security etc
Building this from a scratch from a Servlet is overkill and waste of time when there are ready made frameworks that these things for you
My favorite is Spring MVC 3.0
Check their project site for more details
Just to show you how easy to set up one in Spring MVC , check this below tutorial
Spring 3 REST Tutorial
Pls rate the post if it helps , Cheers.
If you want to go with Java, I suggest that you take a look at JAX-RS... And since REST is a complex topic, here is a url with tons of informations on it. http://code.google.com/p/implementing-rest/
As a complete beginner, I believe the best way to implement a (nearly) RESTful API without having to read a lot is simply to implement the API just using HTML pages and HTML forms with the back-end processing to handle them.
The rules are:
Use <a> tags to provide links to related resources. (navigation)
Use <form> tags to initiate any kind of processing operation on the server. (actions)
You can then make it properly RESTful by using progressive enhancement to add Javascript AJAX requests that perform PUT, PATCH, and DELETE instead of using POST for those three (of course, keeping POST for creating resources where the client doesn't know the resultant URI).
You can then click around and test the API in a web browser! Tools like Selenium can automate this.
If you need to provide JSON, this can be added after the API has been designed and tested, although libraries exist to process HTML or XHTML responses too, so JSON isn't necessarily required for machine readability.
if you are using php with symfony try:https://github.com/FriendsOfSymfony/FOSRestBundle this lets you create a real REST full servicer very quick.
Vogella made my day very easy when i started Web services with an super example here with eclipse screen shots ..Have a look here.

Client Program for RestFul WebService?

HI, i Have developed a restful webservice sample application, i want to create a client for the webservice, can anyone tell me how to do this? i was used Rest WebService explorer, but i want to know how to create a client and call the methods ?
Please help ?
Since REST is talking HTTP and is language-agnostic, you can use most any language/tooling available. Of course the simplest test bed available to you is the browser itself.
Have a look at these tools:
http://code.google.com/p/rest-client/
https://github.com/cloudhead/http-console
https://tcpmon.dev.java.net/ (proxying is helpful for debugging)
You can also use Resty, which should make accessing your webservices very easy.
https://github.com/beders/Resty
(see Readme for examples)

How to use a proxy with Google Web Toolkit

I am writing an application using GWT on Windows that needs to do some network calls.
I know that if these aren't to the same machine I'm developing on I need to setup a proxy, right?
I was just wondering if anyone could help with what my GWT code would look like?
What proxy should I use on Windows?
Thanks!
If you're simply requesting data from a RESTful service from a different domain, you can use JSONP (http://code.google.com/webtoolkit/tutorials/1.6/Xsite.html).
If you're trying to post data, you'd have to perform the network calls on the server side. (There are some hackish ways to try to submit via a hidden iframe, but they're non-standard). What this means is that you simply invoke a method on your server which does the network call (see http://code.google.com/webtoolkit/tutorials/1.6/RPC.html).
If you mean Google Web Toolkit, and you're trying to evade cross-domain scripting restrictions, check out Yahoo's how-to guide. There's even PHP sample code.
Why not perform the network calls in server side? That way you are not restricted to cross domain restrictions.
I think this is what you are looking for:
http://code.google.com/p/google-web-toolkit/issues/detail?id=3131