what is the difference between webservice and webapplication? - asp.net

can you please tell me what is the difference between webservice and webapplication.

A web service:
Typically returns XML or JSON or something like that, something that is easily decoded by a program
The results you get from a web service is typically not just shown to a person in its raw form (ie. since it isn't HTML, the results have to be reformatted, like placed into a form)
The intended usage of a web service is that it is something an application can talk to
A web application
Typically returns HTML or image data or similar
The results you get from a web application is usually shown to a person, through a web browser
As for similarities:
Both typically use HTTP(S) as the transport
Both typically use HTTP authentication/authorization to secure data
Both are typically hosted by a web server
So the main difference is who usually talks to them. A web service usually by another application, a web application usually by a web browser. Other than that they're pretty similar.

Here is the Web Application and here is Web Service
Web application: any application which resides on a server, and mainly used by human using web browser. All user interactivity is done through web pages.
Web service: server-based application (as above) which may be accessed over the web via HTTP, but is meant primarily for interaction with other programs. Generally it is WEB API for other applications.

In a nutshell, a Webservice uses special HTTP transport protocols to communicate to other servers. Webservices are meant to be used by other applications.
In the ASP.Net world, a web application is a type of Visual Studio project that allows building ASP.Net websites in a particular configuration. E.g. A Webservice can be built using a Web Application type project. Or a Web Application can also refer to a website that is meant to be used directly by an end-user ( unlike web services ).
Here are a few links and related SO questions...
What is the difference between an asp.net web method and a wcf service?
ASP.NET Web Site or ASP.NET Web Application?
Introduction to Web Services and ASP.NET

check this
http://en.wikipedia.org/wiki/Web_service
http://www.w3schools.com/webservices/ws_intro.asp

Related

How to configure and call non-anonymous WCF services from SharePoint application and WPF?

We have a CRM/ERP web application (ASP.Net Forms) running on top of SharePoint (WSS and 201x).
On the other hand we have add-ins for Office (WPF) closely integrated to the web application via WCF services.
Both rely heavily on a WCF services project, in three ways:
WCF services called from code behind
AJAX-enabled client web services using webhttpbinding / enablewebscript
WCF services called from the add-ins.
However, there is a security concern.
In our current set-up, the WCF services need to be set to Anonymous authentication.
Otherwise our web application and add-ins won't work using the current configuration.
Our goal: to disable the anonymous access to the WCF services somehow, without breaking either the web application or add-ins.
This proved much less straight-forward than expected.
This is our typical set-up:
Extended SharePoint site (WSS / 201x). Alternate Access Mapping
configuration:
Default: Active Directory, NTLM.
Intranet: Membership Provider, Anonymous access.
ASP.Net web application runs within the main SharePoint web application (no sub web application in IIS).
WCF services project is configured in IIS as a 'sub' web application beneath the SharePoint web application.
This is what we came up with so far:
Added in the WCF services web.config
Changed Windows Authentication -> Advanced Settings to the following:
Extended Protection: Accept
[X] Enable Kernel-mode authentication
Changed client binding configuration of add-ins and web application to Security Mode TransportCredentialOnly with clientCredentialType Ntlm.
Above solution works in our SharePoint 2007 test environment in all three aforementioned places.
However in SharePoint 201x we can't get the WCF calls from within the web application to work.
At least not using the same client bindings as the add-ins (while the WCF calls from the add-ins also work in SharePoint 2013).
The error message we’re getting is: No credentials are available in the security package.
Another one we encountered is: Provider type not defined. (Exception from HRESULT: 0x80090017)
Question: How can we use WCF services non-anonymously from within a SharePoint web application and from WPF?
Any idea's on how to configure and call these in this scenario? (one way or another)
Any thoughts on this are greatly appreciated!

Host ASP.NET App In WCF or Generic Web Server

Objective:
We have a Windows Service/generic EXE that also hosts a WCF service (.Net 3.5). I'd like to be able to take a third party ASP.NET component in a DLL, and host it through that WCF Service.
Is this possible to do, in any way?
It seems like if you want to host a ASP.NET app, it must be through IIS, but we don't use IIS.
Is there any way that we could load the ASP.NET app into memory, make the app available through an endpoint, and receive requests back from the app?
Specifically, we'd like to take the "Microsoft.ReportViewer.WebForms.dll", expose the web form in a web page, and accept any requests back from the web form.
http://msdn.microsoft.com/en-us/library/ms251723.aspx
Looking for anything to get me started. Thx.
From owin.org
"OWIN defines a standard interface between .NET web servers and web applications. The goal of the OWIN interface is to decouple server and application, encourage the development of simple modules for .NET web development, and, by being an open standard, stimulate the open source ecosystem of .NET web development tools."
Essentially Owin implementations, like Katana (OWIN implementations for Microsoft servers and frameworks.), help you self host web apps, even in a Windows NT Service.
According to this post, hosting a WebForms app outside IIS/ASP.NET is not possible.
WebForms are tightly coupled to ASP.NET/IIS and cannot run directly on
OWIN/Katana (e.g. outside of ASP.NET/IIS). However, you should be able
to use Katana's middleware (Security, CORS, etc.) in a WebForms
application.
http://katanaproject.codeplex.com/discussions/571291

Calling WCF service from jsp page

I have created a WCF Service and published it to a Windows Server running IIS. In an asp.net web application, I can add a Service Reference to the WCF Service which exposes its methods which I can call. This all works fine.
I need someone who is running a jsp site to be able to call a method in my WCF Service. How can they do that? (I know absolutely nothing about jsp). Presumably they cannot reference my WCF Service within their application in the same way you can within a .net application.
The web services are totally platform independent. Therefore, someone writing in Java should have no problem calling a web service server, regardless if it was written using WCF or another platform. For example, here, here and here you could find some tutorials on how to build web service clients using java. This java code could be called from JSP pages.
If you want to quickly test your web service from the client side, you could use SoapUI. It's a web service client tool developed in java. I am sure you will find it useful.
Hope I helped!

Silverlight and RIA Service without ASP.NET

I'm pretty new to Silverlight/RIA/Asp.Net thing, and I'm trying to figure if an Asp.Net website is required (for hosting the app) if I wish to use RIA services with Silverlight?
You could use a Web Application for hosing the RIA services in which is a compiled version of a Web Site. This is a distinction made by Visual Studio for different types of web projects but that might not be what you mean.
Really though RIA is just web service that takes a certain set of parameters. You technically could use PHP and generate the same content although that seems like it might be a bit of work unless there are frameworks that already do this.
Your RIA service will need to live somewhere online though. You don't need a website with web pages but you will need to run the service in a web server like IIS and that means it probably needs to live in a web site, even if the website doesn't have any web pages.
No, you can not use RIA services without an ASP.NET application. While it is true that you can create the backend data service with PHP (or a number of other web technologies), that would not be making use of RIA services.
The basic idea of RIA services is to provide a super simply means of plumbing your data classes through ASP.NET. Mostly it is used in conjunction with an ORM and additional metadata classes in your web application. You then provide a service to manipulate your data. When you compile the solution than the work you did in the web project gets pushed into your Silverlight application (through code generation).

ASP.NET and Silverlight applications

I am new to Silverlight, so this question might seem pretty stupid. My question is, can an ASP.NET web application that's hosting a Silverlight application receive events generated by the Silverlight application? If not, how does an ASP.NET application communicate with a silverlight application?
You have essentially two wide-open paths for communication. First, Silverlight is dependent on services for data, and makes effective use of ASP.NET web services. Second, Silverlight is fully enabled for browser integration, including javascript between Silverlight and the HTML markup. So anything that Silverlight tells Javascript, or vice versa, is available to the web app in ASP.NET.
Edited to add:Also coming, and in beta now, is WCF RIA Services, which is full integration between ASP.NET and Silverlight. Service calls from Silverlight are seemlessly integrated with server code in ASP.NET.
Silverlight and ASP.NET are in different processes, and are most often on different computers. As such there is no direct linkage between the events which occur in both types of applications. Most people use Web Services either SOAP or REST to communicate.
You might use an event in the Silverlight to trigger a call to an ASP.NET web service or WCF service.

Resources