ASP.NET Web Service Application in .net 4 - asp.net

I was going through the MSDN walkthrough on using client application services.
http://msdn.microsoft.com/en-us/library/bb546195.aspx
This is for .net 3.5..but i need to do it in .net 4. The thing is that it doesn't have any ASP.NET Web Service Applications listed. Has it introduced any replacement for that? Or is there any workaround?
Regards.

One of the way is to select target platform as .NET 3.5 in the drop-down at the top of New Project dialog - this will allow you to select "ASP.NET Web Service Application" project template. Once you select the template, you may change the target platform to .NET 4 using project properties.
I believe that the main reason for this template not being available in .NET 4 view is that this project uses ASP.NET web services (asmx files). Microsoft has declared this to be an obsolete technology and recommends to use WCF services instead.
You can expose ASP.NET application services (authentication, role etc used the sample sited by you) as WCF services. See section titled "Using application services as WCF services" in this link. So I will recommend you to choose ASP.NET Web Application project and then expose ASP.NET services as WCF services.

Instead web services use WCF, it has more features than asp.net Web Services
http://msdn.microsoft.com/en-us/library/ms731082.aspx

Related

Can I use ASP.NET Core SignalR Javascript file in my .NET Framework Web appplication?

I have a Web application that uses the .NET Framework. I created a separate ASP.NET Core web application to use as a SignalR server.
In the .NET Framework web app, I followed the Microsoft tutorial on adding the Javascript client libraries (#microsoft/signalr#latest).
The chat application is working, but then I saw this statement "ASP.NET Core SignalR isn't compatible with clients or servers for ASP.NET SignalR." Link
I get that there is no backwards compatibility, but is this also saying that if your application is using the .NET Framework, you must use ASP.NET SignalR for both client and server?
I found this SO answer which seems to indicate that it is okay, but I'm not sure what he means by "normal System.Web" pipeline.

ASP.Net web form "not" web API with Owin or self hosting?

I have an ASP.Net webform application , deployed on IIS , now I want to make it self hosted application , I found that Owin can do it , but I am unable to find a way to do it with ASP.Net webform , I have found code with Owin and webapi .I did not found any tutorial or any help on internet .
It's not possible, I go into the details here http://keyoti.com/blog/asp-net-v5web-apivnextowin-a-beginners-primer-part-1/ but basically Web Forms uses System.Web assembly, and System.Web is coupled to IIS.
You can however self host MVC with ASP.NET 5, if that is any use.
Microsoft only developed Katana/Owin partially and then realized they had to dump ASP.NET WebForms/MVC/Web API/SignalR completely and embraced the new design, ASP.NET Core.
Thus, you can only use Katana to self host Web API and SignalR officially from Microsoft. But third party vendors, such as Cassini, allow you to bundle the web server with your web app, which is another approach to achieve self hosting,
Creating a standalone ASP.NET MVC application for Windows XP

Is Web Service in ASP.NET obsolete? What to use with ASP.NET 4.0?

I have to write a simple Web Service application in ASP.NET. I read somewhere that Web Services is now obsolete and some new technologies like WCF is there.
But as the name suggests, Windows Communication Foundation, might me restricted to WinForms applications only and not for ASP.NET. What shall I use with Visual Studio 2010?
I want to build a simple Web Forms application and not MVC.
What shall I use with Visual Studio 2010?
You have many choices other than ASP.NET Web Services which are completely obsolete now. So if you are starting a new project and need to develop a web service you might consider:
WCF
ASP.NET Web API
ServcieStack
ASP.NET MVC
But as the name suggests, Windows Communication Foundation, might me
restricted to WinForms applications only
The name is misleading. WCF has strictly nothing to do with Windows Forms only. You could host a WCF service in an ASP.NET application or self-host it if you want.
Simple Web Service application in ASP.NET (webForm OR mvc) ?
My firt choice : ASP.NET WebApi
Easy to unit test
Easy to secure
Restful
Still, WCF is pretty cool too because it is very well integrated with VS, and easy to configure through web.config
Both WebApi and WCF make it possible to version your web services.

can i use wcf rest service in my asp.net 3.5 web application

I heard that rest services are moved from wcf to asp.net web api frame work.
Our web application is built on vs 2010 (asp.Net 3.5) .So still i can use wcf rest services in my web application?
Please suggest some alternatives if it is not possible.
WCF can still be used to build RESTful services1, many services are already built with it and it's not going away. What you heard is that most of the new developments in terms of new functionality in the area by Microsoft will be made in the ASP.NET Web API framework, not in WCF. But as all the services out there can attest, WCF for building web services is still a valid alternative, if it does all you need.
1 The official name is actually "WCF Web HTTP Services"; REST is a well-defined set of constraints which need to be implemented, which would give the service some useful properties. There are some people who argue that people should stop using the term REST for all HTTP-based, non-SOAP services.

Is this the way I should deploy a asp.net application

I have a solution containing
asp.net project
class library
WCF service class library
WCF service application
I've added a project refference from the asp.net project to the class library project and to the service class library project.
I've published the asp.net application, loaded it to the webserver root. all ok.
Now for the service, I've created a new folder on the root called WCF, and placed the aplication in there.
Is this The way I should deploy the sollution? Are this the steps when you have more than a simple asp.net application?
PS: How do I change that WCF folder to make it an application trough a control panel because I get this:http://surveillancecamera.somee.com/WCF. The reason why I get this is described here:
I would treat the WCF service as a separate entity altogether. Deploy the WCF service and verify it works, then deploy the ASP.Net application.
WCF services have a different set of configuration rules that don't always pair nicely in the same "application root" as your ASP.Net web application. In addition, you may want to use the same WCF service in different applications, and it may not be accessible if it is tightly coupled to this ASP.Net application.

Resources