.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

A quick question about protocols a WCF service can use

Posted By:      Posted Date: October 08, 2010    Points: 0   Category :WCF

I am beginning to examine WCF, and like what I have seen so far.

I am intrigued, however, by something I recently read about WCF services being able to work with multiple protocols (and the example used included support for TCP and HTTP). Alas, I am so new at trying to figure out proper use of WCF, I don't know where to look for relevant information for my present query.

First, is it true? Can a WCF service handle both TCP/IP packets and http requests?

Second, I am also studying WinPcap, to learn how to examine TCP packets to see if there is a discrepancy between IP address data in those packets and the IP addresses in the HTTP headers (among other things).  I want to be able to redirect HTTP traffic through a site based on such an analysis of the TCP/IP packets used to make a given HTTP request.  I don't suppose there is already a class within .NET 4 that provides access to the complete TCP/IP packet that contains a given HTTP request (that would let me avoid having to compile the WinPcap code into a .NET app).  I guess the first question for this ought to be, is WCF the right technology to use for this?  Then, if WCF is appropriate for this, how would I establish the connection between multiple OSI layers?  If I can use WCF for this, can you provide URLs for resources that discuss how to do it?



View Complete Post

More Related Resource Links

asp 4 quick question????


i am checking out a hosting provider f(https://www.blacksun.ca/order_hosting.html?plan=advanced_checked) and im trying to check if they are compatible with asp.net. they say they support asp4. can somebody please tell me if this is compatible with my version of asp.net that im using right now? im using visual studio 2008, version 9.0.3729.1 SP, .net framework version 3.5 SP1. is this compantible with asp4? thanks so much in advance.

web service soap mapper error question

Hi,I'm trying to connect to a web service using excel.I have currently no issues logging into the web service, and running one of the other functions to fetch a full list of data.  Once I am able to log in, the function returns a token, which I use to fetch data.But Currently, I'm getting the following errors one two of the functions:SoapMapper:Restoring data into SoapMapper ViewListResult failed HRESULT=0x80020009: Exception occurred. - Client:Unspecified client error. HRESULT=0x80020009: Exception occurred.Run-time error '-2147221504 (80040000)':SoapMapper:Restoring data into SoapMapper ViewListResult failedAny idea why I might be getting this error?  And also how I can fix it?  Thanks.

Question about WCF Service hosted in Windows Service

Hi, I have little experience with WCF and working on a projet that requires WCF Service instance to run 24x7. After searching for a solution and reading about WCF, I think if I host it under Windows Service I can have a single instance of WCF Service running 24x7. Is this correct? I just successfully ran the MSDN sample project that hosts CalculatorService in Windows Service. I realized that Windows Service cannot communicate with WCF Service it is hosting (I do not have any experience with writing Windows Service). I wrote a test function (public) in Windows Service and tried to call it from WCF Service but it did not appear in the Intellisense list. Is my assumption correct or is there a way to establish communication between Windows Service and its hosted WCF Service? Thanks. kr

Discover a WCF service using different protocols

Hello, Is there a way to make my WCF service discoverable for clients that use different discovery versions? That is, I want my service to be discoverable, for example, by a client which uses WSDiscovery11 version, but also by a client which uses WSDiscoveryApril2005. Any tips? Thanks.

SQL Server 2008 R2 Installation and Service Pack 1 Question

I am migrating a SQL 2000 server to a SQL 2008 R2 server (on different physical servers) . When I ordered SQL Server 2008 the volume licensing allowed me to download sql server web 2008, sql server web 2008 R2 and sql server 2008 service pack 1. I don't know why I have three options to download. Don't I just need to just install the sql server 2008 Web R2? Are there any sql 2008 R2 service packs available?   

Quick basic question about TFS 2010

Is TFS a standalone platform or do I need to install SQL Server 2010 first?     Thanks, Joshua

A quick question

I am new to ASP.net but i used VB a lot back in days, i am working on a site and i want to create form so the data from it could be submited to the email. i have put some stuff together but need some corrections. It feels like having brain shut down. I am paralzed and need help.. Thanks<% Dim EmailFrom Dim EmailTo Dim Subject Dim Name Dim LastName EmailFrom = "Example@mysite.com" EmailTo = "Example@mysite.com" Subject = "Example@mysite.com" Name = Trim(Request.Form("Name")) LastName = Trim(Request.Form("LastName")) Dim validationOK validationOK=true If (validationOK=false) Then Response.Redirect("error.htm?" & EmailFrom) Dim Body Body = Body & "Name: " & Name & VbCrLf Body = Body & "LastName: " & LastName & VbCrLf Dim mail Set mail = Server.CreateObject("CDONTS.NewMail") mail.To = EmailTo mail.From = EmailFrom mail.Subject = Subject mail.Body = Body mail.Send Response.Redirect("ok.htm?" & EmailFrom) %> And here is code that contact the Email server that i have found in this forum on diffrent thread.# public static bool SendMessage(string RecipientAddress, string Subject, string Content, string SenderAdress) # { # MailMessage m = new MailMessage(SenderAdress, RecipientAddress, Subject, Cont

Question on WCF service with Linq to SQL on 64-bit system

I'm trying this question one more time since I realized the work in in a 64-bit environment. I have a WCF service which runs in production in a 32-bit environment using VS2008 and .NET 2.0. We made a big change to our environment (lots at the same time) and I moved the services to VS2010, .NET 4.0, and 64-bit processes.  I wrote a new service and deployed it under IIS.  If I browse to the service I get the example screen and clicking on the link gives me the metadata.  So all of that is working. In my services I create a Linq to SQL context, perform a query, then return the result set as an Array.  I wrapped the context creation with a using.  My tests returned an exception "Attempt to access an object that has already been disposed".  I traced it down and found that the code executes, forces the query, returns the results, exits the using statement (disposing the context properly) then exits the method.  The next thing I get is the exception, inside framework code, and it is linq code attempting to fulfill the query once again. I have searched until I'm blue in the face trying to find prior incidents and fixes but all I found was one post, two years ago, same problem with less debugging, and no answer to the problem other than 'don't use the using statement' which is a bad suggestion.  So for a work around I wrote a Co

Web Service Response Question: < and > getting converted to > and >


Hi there,

I created a asmx web service which returns a string as response. The return response is as follows:

<?xml version="1.0" encoding="utf-8" ?> 
 <string xmlns="https://xyz.com"> <result>Success</result></string> 
 But when the client is doing http post they are getting the following response on their side:
<?xml version="1.0" encoding="utf-8" ?> 
 <string xmlns="https://xyz.com"> &lt;result&gt;Success&lt;/result&gt;</string> 
What should i be doing so that the client sees < and > instead of &lt; and &gt; ?

question about sending form data to web service


Hello, i have some web service in outsource server (not on the form server) and i need to send to this web service few text boxes fill by the user (text only - no files) i need to send the data + the number 1 + some guid string (that not changing - the same guid always) is anyone have an idea how im doing that? ( all the data need to be sending to asmx file.

Quick Question in using nvarchar and varchar


Basically I am desiging a schema for datawarehouse in multi language support and iam setting up a suitable collation for this. But in some of the fields in different tables i am using nvarchar as a data type for some fileds where i need to insert different language characters. But in some fileds i am thinking of  using varchar where i am expecting just english language data.

My question is if i use varchar and nvarchar in the different fields on the same table in this database. Is there any performance issues ?

or just use nvarchar on all the fields where i am getting alphanumeric data.

What you people suggest.

Please tell me.


quick question on support for WPF on server 2003



I need to make a pretty small utility and I was thinking of using this task as my first experience with a WPF application... whether I do this largely depends on if it will work on server 2003, which is the oldest OS I need to support. I know WPF is part of .net 3.0 and later, so does that mean as long as server 2003 has .net 3.0 or later installed WPF is an option? Or are there other steps that would need to be taken to install, or enable WPF on server 2003? It all comes comes to if all our server 2003 systems can utilize WPF as-is, if not, I need to use WinForms.


Newbie Question: Configuring WCF Service - Named Pipes Only for PubSub setup

I am refactoring an existing application and want to learn / move forward with WCF services contained within a Windows Service.  I have several WCF services that will only connect through Named Pipes - the client applications will receive information through callbacks - what is the proper way to keep the channel open - events may not occur for hours.  Is there a way to keep the session connection open until the clients have disconnected?

AJAX enabled WCF Service Question


From a pure html/javascript (jquery)/ajax client I need to access a WCF Service. For this reason I (probably) need to create an AJAX enable WCF Service.
Should I create an ASP.NET empty web application project and in this project add an AJAX enabled WCF Service or should I create an WCF Service Appication or WCF Service Library project and add in one of these projects my AJAX enabled WCF Service?



Sharepoint Service Applications question, architecture



I read an article in documentation:

When for example u want to use service applications you need to connect your service
applications to the WFE’s. This is done using a proxy (don’t think WCF/ASMX proxy… think of it
in the more generic term for now (as compared to 2007)).

I donnt exactly undestand this - so what is this proxy and what is communication Protocol between WFE and the application server?

Second question is if it is truth, then if there are two farms or more then could you search content through all of them using one Search Service Application? And would it be enough to have ONE search server in total and on the other farm there would be only some proxy to search sevice?

SharePoint Usage Reporting Quick Poll Question


I've got a very quick poll question for any DBAs out there who utilize SharePoint Usage Reporting.


Would you rather view your SP Usage Reports inside SharePoint itself, or have them emailed to you once per day/week/month in a PDF or Office formats?

Quick validation question...


I have a textbox called "tax rate" which I need to validate the input...

The only thing I need to ensure is that the value entered is a number (decimals ok of course).

eg. the input might be "8.75"

How do I write the validation expression for this please?



ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend