For those new to message boards please try to follow a few simple rules when posting your question.
Choose the correct forum for your message. Posting a VB.NET question in the C++ forum will end in tears.
Be specific! Don't ask "can someone send me the code to create an application that does 'X'. Pinpoint exactly what it is you need help with.
Keep the subject line brief, but descriptive. eg "File Serialization problem"
Keep the question as brief as possible. If you have to include code, include the smallest snippet of code you can.
Be careful when including code that you haven't made a typo. Typing mistakes can become the focal point instead of the actual question you asked.
Do not remove or empty a message if others have replied. Keep the thread intact and available for others to search and read. If your problem was answered then edit your message and add "[Solved]" to the subject line of the original post, and cast an approval vote to the one or several answers that really helped you.
If you are posting source code with your question, place it inside <pre></pre> tags. We advise you also check the "Encode "<" (and other HTML) characters when pasting" checkbox before pasting anything inside the PRE block, and make sure "Use HTML in this post" check box is checked.
Be courteous and DON'T SHOUT. Everyone here helps because they enjoy helping others, not because it's their job.
Please do not post links to your question into an unrelated forum such as the lounge. It will be deleted. Likewise, do not post the same question in more than one forum.
Do not be abusive, offensive, inappropriate or harass anyone on the boards. Doing so will get you kicked off and banned. Play nice.
If you have a school or university assignment, assume that your teacher or lecturer is also reading these forums.
No advertising or soliciting.
We reserve the right to move your posts to a more appropriate forum or to delete anything deemed inappropriate or illegal.
I'm new in WCF.
And I would like to create a web site using WCF + JQuery.
What I have in mind is to have
JQuery + HTML5 as my Presentation Layer
WCF as Web Services that connect with JQuery
Dll as Business Logic Layer which work with WCF
EF6 as Data Access Layer
MSSQL as Database
Is this the way to do it?
Or to have everything inside WCF and remove the dll and Ef6?
From what I've read thus far, I think that WCF can achieve this. I'm just trying to wrap my head around the best option within WCF to use.
My servers and many clients are on the subnet 10.0.1.NNN, and other clients are on 10.0.2.NNN, 10.0.3.NNN, 10.0.4.NNN, 10.0.5.NNN, and 10.0.6.NNN. Every client has a static IP (no DHCP).
From what I presently understand, the P2P mesh option in WCF would not work in this, as the mesh option seems only to work within the same subnet. Correct me if I'm wrong.
In short, I'm in search of a "push" methodology vs. my present "pull" methodology. That being, the server "pushes" data to the client dynamically (when the data arrives at the server) vs. the client "pulling" the data from the server via a .NET timer being fired every NN minutes by 60+ workstations, with each workstation having 5+ apps running. That's 3500+ hits on the database per hour. A push method would reduce this to about 400 hits/hour.
What I currently conclude the option to be is that each client registers that it is "available" to receive msgs from the server. The server, when it receives data from another server activity, it needs to send info/data to the client. The client gets the data and takes appropriate action.
1) Do I need to "register" the client is available to receive msgs/data from the server? Candidly, I'd prefer to say away from "registering"/"unregistering".
2) Or, can the client merely have a WCF [server] channel open and the server check to see if that client's WCF channel is open to then send a msg/data? Note: The msg/data from the server to the client needs only be one-way.
Separate, though similar:
We do have a Chat app that uses older TCP/IP methods (.NET 1.1 dayz....) and does register/unregister with a main server.
I'd prefer to change it so that when the client chat app is opened, it can query to see which other clients are open to list as being "available" to chat with.
The good thing in both of these above is that we have a separate VMS-based system that everyone "logs" into (via a windows app or terminal via a windows telnet app) at the beginning of the day. This system identifies which IP address a given staff person is at. We can query this system in Windows to find out who is at which IP address, including multiple IP addresses.
As such, Windows (.NET) can get a list of "active" staff/IP addresses and then check those specific IP addresses for any WCF services available to connect into. OR so, I'm hoping is possible within WCF.
From what I've learned thus far of WCF, I prefer to do the entire binding in code and not via some .config file with each client.
I have made a WCF server and a client based on compact framework 3.5,while the client call the service,it always result in a EndPointNotFoundException which is "There was no endpoint listening at http://127.0.0.1:8731/Design_Time_Addresses/WcfDemoService/GreetingService/ that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details."
I can not find out the reason...could someone give me hand?
The following are the sources
WCF Server side
in main function:
staticvoid Main(string args)
ServiceHost host = new
Console.WriteLine("Server Opened !");
if (host.State == CommunicationState.Faulted)
Thanks for your time~
Finally,It connected successfully when I put the client program on my WinCE device!
But the problem still exist while using emulator which is on the desktop same as the wcf server.
I still can not figure out the reason...
WCF Application is working ok. but when i use the visual studio access my machine remotely. the service channel fault state exception is coming always. have to change any setting to resolve this issue..Thanks..
I have a WCF C# project that is hosted in a Windows Service on a Windows 2008 R2 Server. If I start my Windows Service manually everything behaves correctly. If I allow it to automatically run on Windows startup it does not startup properly. As an experiment I added a Thread.Sleep( 20000 ) call in my OnStart() method which gets around the issue (but obviously is not an acceptable solution). My guess is that my WCF application is dependend on other Windows Services and the Sleep call merely gives time for the dependent services to start up. Any idea on what Windows Services a WCF application requires? I have searched high and low on various forums and thought it was the Windows Process Activation Service (WAS). I added this bit of code to wait for the WAS service to start:
ServiceController sc = new ServiceController( "WAS" );
sc.WaitForStatus( ServiceControllerStatus.Running, new TimeSpan( 0, 0, 30 ) );
But the above did not solve the issue, so my WCF application must be dependent on other services.
The services it uses depend on the binding used for the WCF service.
There are the following services that are used by WCF (may be dependent on more):
"Net.Msmq Listener Adapter" - NetMsmqBinding
"Net.Pipe Listener Adapter" - NetNamedPipeBinding
"Net.Tcp Listener Adapter" - NetTcpBinding
"Net.Tcp Port Sharing Service" - Also for the NetTcpBinding
(You don't have to run all services. Only those that are required by your service)
there may be other services needed, but those were the ones that came into my mind about WCF
Thank you for the quick reply All four of those services you have listed are marked as Disabled and the Status is not Started. My application runs even with them disabled and not started but only if I start my service manually.
Yeah. As I said. Depends on the binding used. Those were a few that came into my mind. But if you're using something like BasicHttpBinding then you don't need those (and also manually starting the service can't start a disabled service) So you're probably fine with them beeing turned off.
But, I don't really know of any other services that could cause such problems (maybe someone else does? )
There is another way to start them with some delay without doing the sleep yourself:
- Try setting the service from the start type "Automatically" to "Automatically (delayed)". This should give the system some time before your service starts up (as far as I can see the delay is 2 minutes after the last service has been started during boot)
Also note that service dependencies (as you can see them on the dependencies tab of the properties dialog) may just be ignored by Windows. At least that's my impression with our services: our major service depends on our license server, but sometimes the major service was not started because the license server was not yet ready...
I have added a new columnto my databasetable. When I have added this new columnm, the first chance exception start appearing. When I debugged it, it stated the code line
MLongListSelector.ItemsSource = c.ToDoList.ToList(); is the next statement toexecute that causes the problem. What have I done wrong there?
using (DatabaseContext c = new DatabaseContext(DatabaseContext.ConnectionString))
c.LogDebug = true;
//output todolist data fromdatabase
MLongListSelector.ItemsSource = c.ToDoList.ToList();