-
July 13th, 2006, 11:23 AM
#1
handle connection attempt
I have a webservice written in c#. I simply want to handle (intercept) all connection attempts in order to validate the client IP.
How do you handle a connection attempt in a webservice?
-
July 13th, 2006, 11:49 AM
#2
Re: handle connection attempt
you generally wrap the connection in a try / catch block. That way you can thow or ignore any errors. And you can put your ip validation method in the try part and if it fails you can throw it to the catch part.
hth,
mcm
rate my posts!
mcm
-
July 13th, 2006, 11:53 AM
#3
Re: handle connection attempt
Ok. That's good, but how do I even detect that there is a connection attempt. Something like...
Code:
myService.OnConnection += new ConnectionHandler(handleConnect);
private void handleConnect()
{
//handle connection here
}
So how do you intercept a connection attempt? Where does it come from?
-
July 13th, 2006, 11:57 AM
#4
Re: handle connection attempt
rate my posts!
mcm
-
July 13th, 2006, 06:27 PM
#5
Re: handle connection attempt
I'm curious how people out there handle connection attempts to the webservices. Certainly there must be some way to intercept a connection request and either allow or deny? Right?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|