C# - WCF TCP Binding Setup Between IIS And Service?
Mar 4, 2011
I developed a WCF service, and now reading about the bindings. It s said that TCP binding is the fastest one, which i like to use, but it requires WCF to WCF communication? What s that exactly means?
I have a an application that s on IIS 7, using ASP.NET and a WCF service. they are on different machines. can i use TCP binding?
When i try tcp binding from client (IIS 7) to WCF service, i m getting connection error.
is it possible to connect to WCF service using only tcp binding from another server with IIS 7?
if there is , how to do it? I open the port on firewall etc. oh , wcftestclient works, my app doesnt. :(
again, CLIENT IS ASP.NET PAGE, SERVICE IS WCF, in the SAME NETWORK.
I want to include installation and registration of Widnows Service in Web Setup. (During Web Site Setup Windows Service also Install and Register on a client machine)
am using a windows service created by me it works fine in debug mode.I have created a setup for installation of windows service and installed it on the same machine.For testing i am creating a notepad file in c:\temp123.txtIts working gr8 in debug mode but not working when installed using a set up . also i have used same set up on another machine.Its not working thr as well.What can be the reason.Note:- two weeks back i have checked it using installer on another machine it was working, but suddenly now its not working any where.
I am kinda new to WCF and the setting up of service and have 2 questions. My first question I have a service that will be accessed via https on a web server. However locally on my local IIS7, it will be accessed via http as https is not available. How can I set up a service to be accessed by both?
My second question is regarding how I can set up a service that requires a username and password to be accessed. The service that I have in place I dont want methods within it to be accessed unless the calling application has the rights to do so?
Here is an example of the relevant area of my web.config file.
<system.serviceModel> <bindings> <webHttpBinding> <!-- standard AJAX binding that supports SSL --> <binding name="TransportSecurity"> <security mode="Transport" />
[Code].....
In this config, the service is set up for http only and not username/password applied to it.
I have a list of servers, all exposing the same web service interface, that I need to call from my code.
i.e.
[URL]
My code needs to get this list of servers and invoke the same function on all of them.
I added a web references to this service, and I use "Dynamic" URL behavior. This is supposed to let me create an instance of the server proxy object, set the URI property at runtime, and then invoke the web methods, right?
But it seems the code generated by VS assumes the URI will come from the application's config file, which isn't the case for this app.
I'm having trouble setting up a custom NEW User Screen. Here is my situation, I have a Request for Access Screen that uses the CreateNewUser Wizard Control. I want to leave the Question and Answer for this, however I also want a custom NEW User Setup which I build myself to allow the system administrators to setup users, but for this setup I don't want the administrators to have to pick the question and answer for the NEW user, so I would like to bypass this for this setup. However, my Membership.CreateUser keeps asking for it. How can I accomplish this? I've included a copy of my current web.config file. You will notice a AspNetAdminMemberhip which I use to allow the System Administrators to reset passwords.
I am recieving the following error when I try to browse to "http://10.28.2.246/SQLDataService.svc" yet it works fine at "http://localhost/SQLDataService.svc".
Server Error in '/' Application.
No protocol binding matches the given address 'http://10.28.2.246/SQLDataService.svc'. Protocol bindings are configured at the Site level in IIS or WAS configuration.
Description:
An unhandled exception occurred during the execution of the current web request. review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.InvalidOperationException: No protocol binding matches the given address 'http://10.28.2.246/SQLDataService.svc'. Protocol bindings are configured at the Site level in IIS or WAS configuration.
Source Error:
[Code]....
Stack Trace:
[Code]....
Version Information: Microsoft .NET Framework Version:2.0.50727.4927; ASP.NET Version:2.0.50727.4927
Am I correct in my belief that this is caused by the Web.config file?
I have a web setup package project alongside an old .asmx web service. When I build it I only get 'MyService.msi' and not the 'Setup.exe' in the 'Release' folder after build. Normally the .msi suffices for installation, but on Windows Server 2008 R2 I am getting denied from installing the .msi pacakge. I can only install .exe packages after right clicking and stating "Install as Administrator".
The server admin is still new to 2008 R2 and not sure why I can't install an .msi because I am an admin, so for now if I knew how to get that web setup package to generate the Setup.exe file as well I see my other VS.NET setup packages create.
I am calling an AJAX Enabled WCF Service from jscript code and I'd like to bind the results to a very simple template. I get the results by calling the service via its jscript proxy:
[Code].... In the OnComplete function the DataView is created:
[Code].... The template which the data is bound to is really simple.
[Code].... The XML response from the service is something like:
[Code]....
I get an error saying: 'Name' is undefined. I tried to bind Person.Name, ArrayOfPerson.Person.Name and several permutations without any luck. I'm sure I've been missing something here, and there should be an obvious answer.
What's the difference between binding for example a column called ("Name") in both cases ? and is there's any performance difference ?1- Assigning the data in the mark-up
2- defining a control object for every control inside the repeater ItemTemplate and find it and then assign the data in the column "Name" to ite.Item.FindControl("Name_Lbl")
I'm venturing out into the world of Linq and WCF web services and I can't seem to make the magic happen. I have a VERY basic WCF web service going and I can get my old SqlConnection calls to work and return a DataSet. But I can't/don't know how to get the Linq to SQL queries to work. I'm guessing it might be a permissions problem since I need to connect to the SQL Database with a specific set of credentials but I don't know how I can test if that is the issue. I've tried using both of these connection strings and neither seem to give me a different result.
I have built a WCF Service that is being consumed by a Silverlight app. At first I created one method that was very simple:
public String SfTest() { return "SF Test"; }
No poblem. My silverlight app references my service and displays "SF Test" in a textbox. Now I add a method to my wcf service like this:
public List<String> GetTest() { List<String> list = new List<string>(); String a = "a"; list.Add(a); String b = "b"; list.Add(b); return list; }
I update the reference to the service in my Silverlight app and the using statement in my xaml cs page throws an error like the service doesn't even exist although it is there. I am assuming the problem has to do with datatypes or serialization or something like that but it is driving me up the wall. Why can't I consume a simple generic list in my Silverlight app through the WCF service.
I developed a web service in VS2010 on my local machine, wrote a consumer of it also locally, and that all works.
I copied the dll and the asmx file to our server, and I am getting an error when I try to invoke it from a browser (also still on the server machine) to make sure it correctly exposes its web methods, but it is not, it is saying "Could not create type 'Service'". That error comes from this line:
Line 1: <%@ WebService Language="C#" CodeBehind="~/App_Code/WarrantyDuplicate.cs" Class="Service" %> There other web services in the same folder on the server that all work fine so I don't believe it's an IIS setup thing.
This is my first web service in C# and when I created it in VS I did think it odd that the code behind file went into App_Code (as you can see from the line in the asmx file) and is just named dot-cs rather than asmx-dot-cs. But since it worked fine locally, I wasn't sure that mattered.
I have asp.net 2.0 site which is calling web services hosted on another server. When i have an xml file from where web service ip for eg. www.mysite/webservice1/myservice.asmx is given. When i call the same server from developer machine using local networkit works fine.But the same is when hosted remotely and from client end when services is called reading xml fiile from client machine it given a message 'remote server not connecting'.
I am not sure which approach I should use. I have a web application that needs to get/receive data from a third party application that is in a secure remote network. The data needs to be secure during transport. The data layers cannot be exposed and the databases will not talk to each other. The data will be received from remote application on demand, or will get at scheduled intervals.
I have looked at WCF, but not sure if this will work. Can a WCF service be used to receive data as needed from a remote sender or service? Is this a secure way of doing it? I have also looked at SFTP using some XML/XSLT, but I don't think this is the right way to go. In addition, some data may be transported from my web application to the remote application (mostly reports at first). What protocols are used to transfer data between HIPAA compliant applications?
I am writing two ASP.NET apps. One is a web service that provides xml data and the other is a web client that will use the service to display and manipulate data. I would like for the web service to do the membership authentication and authorization. Is there any way to simply point the login controls in my client application to the web service instead of to a database. I assume I would have to provide the necesarry methods in my web service interface, which would then use the membership provider database I created and pass the results back through to the client.
Is this possible? I have seen many articles on security provisioin from a web service but none has really been what I am looking for. I was hoping that, since my service and my client are both written in ASP.NET, there might be some built functionality that would benefit me.
I'm currently trying to work out the best way to build this web application, which will then be intergrated on other systems, such as WinForms, Intranets etc.
We hope to include the usual layers i.e. DAL, BLL, BOL and UI but I have been experimenting with Entity Framework 4 and WCF Data Services and managed to get something in place where I was using WCF as a gateway to EF4.
i.e. Adding a Service Reference to my project and then using the EF4 context and writing LINQ queries against the DB
e.g.[Code]....
Now with the current setup I would still need to write a DAL Class Library, that interacts with the Data Service, because as I said WCF Data Services only seems to be a gateway, I can't see where to put the code (above) in the Data Service and then how I could these methods.
My questions are: 1. How do I develop a WCF Data Service in such a way to allow this behaviour - I know how I could do it using ASMX web service, something like [Code]....
2. If I am to use WCF Data Services, how is serialization handled (if at all) - again I know how to do something in ASMX web services
3. Again, If I am to use WCF, how do I add Security and only allow my applications to access the web service - for obvious reasons
4. Would it be possible / logical to also include the Business Logic Layer into the web service?
From tools, options, HTML designer, CSS Styling, I checked "Change positioning to absolute...", clicked OK, but never save it. Every time when I open the project, it became uncheck again.
Anyone able and willing to post a part of the CSS files they use for production websites? Curious what types of selectors people use and how they configure the CSS rules to connect to the html elements. I know how this all works in practice - I'm curious how professional coders actually organize their CSS rules. I'm starting a new web app and don't want to be constrained by the setups I've seen and used up to this point.
I am undergrad CS student with very little knowledge of ASP,VB.
I want to build a web-application for my college which will be used for making a Timetable out of several couses offered on campus. i.e As the user selects a course out of several courses,the selected couse gets filled in a grid.
For e.g. If user selects a course Chemistry-I taught on 'Mon Wed Fri ,3rd hour',the course name gets filled in the grid cells (Monday,3rdHour) (Wednesday,3rdHour) (Friday,3rdHour).
I have a database containing fields 'Course Name' and corresponding 'Days','Hours'. My problem is as the user enters a course name in entry field it gives suggestions for auto completion instantly as the letters are typed.
Like as soon as chem is typed it suggests chemistry I chemistry II organic chemistry etc..
We have Microsoft Visual Studio 2010 Professional installed in our labs and I want to learn it by doing tthis project.