In my n-tier solution there is a main Web project along with child web projects and class library projects(business logic etc). one of the child project is purely for webservices (asp.net asmx webservices written almost 10 years ago). I am in the process of developing a new webservice and thinking of using WCF with IIS hosting option. I want to know would it be a problem if I put WCF stuff in the existing webservices project or create a new child web project and use it solely for WCF Services.
Related
I have a Visual Studio solution with 3 layers (data, logic, service) and I also have an ASP.NET MVC 5 application consuming those layers, and a Web API to expose some functionality to the outside.
The question is how you handle the deployment of a such structure, because if you publish, ASP.NET MVC app and Web API separately, you will basically duplicate the business layers, so next time you will have to re-deploy again in 2 sites?
What I will have now in IIS: at the moment on my IIS folder:
* Web (folder)
* Bin -> Data.dll, Logic.dll, Service.dll (duplicated)
and also
* Api (folder)
* Bin -> Data.dll, Logic.dll, Service.dll (duplicated)
Regards
why dont just mvc app work only as a presentation layer and consume your api ?? by this buisness logic will not be repeatative as well as your future presentation layer could also consume the same apis ....
Your service(web api) and application (Mvc) are basically 2 different applications. So you should deploy them separately. They will be served from 2 different domains (at least from different ports).
Whenever you make a change to service you only need to deploy the service. Same goes for the web application too.
But, what I feel will be enough for this project is, single MVC application (your web app), with WebApi controllers for exposing some endpoints (your service). So you'll only deploy one MVC application.
I'm building a messaging application that needs to receive messages from the web. Originally I was going to run this application as a Windows service and have a web wrapper using ASP.NET MVC that could be accessed by clients to send messages to the application. But I am now learning about the Web API which is much better suited for this task but the question remains whether it makes more sense to include the base application as part of the Web API self-host framework or if I should leave it as a Windows service and wrap a Web API application around it.
Is there really a difference? Was the Web API designed to combine the concept of a service layer and a web interface into a single framework? I'm not sure how scalable/robust a self-hosted application can be compared to a Windows service. Will the Web API self-host method limit me in any way that the service method won't? What about a Web API application hosted inside IIS such that my base application will be running inside IIS? I'm not sure of the specifics of performance that I need (such as memory or CPU) at this point so would it be easier to start with IIS and then if needed, convert it into a self-hosted/windows service if the need be? I hope these questions make sense (although I'm not sure if they do).
I'm new to Web API so I'm just trying to wrap my head around these concepts.
How to create a restful service and a web form application under the same solution? I want to use the same port number for both of them, something like a sub folder for one application. I have created restful using visual studio 2012 wcf and also I've created another project for calling the web service. But I feel that there are two separate application and difficult to maintain.
You can use ASP.NET Web API: http://www.asp.net/web-api. But there will be still small difficulty with combining web forms and MVC.
I'm just starting a project where I would like to use Kendo UI (based on jquery) with C#. A few weeks ago I was successful in handling requests using Web Services (asmx), was pleased with the results and performance, and was able to create forms quickly.
Since this is a new project, I thought I could look into different concepts such as MVC and WebApi. I found MVC to be the most complicaded so I went for WebApi and started playing with controllers and requests. So far what I'm finding (don't judge me, I'm new to these new concepts), is that Web Service seems to be simpler and more flexible.
So I guess what I'm looking for is... what are the main advantages of using MVC vs WebApi and even vs Web Services. Are there any downsides to Web Services? Would it be a bad practice to have my data layer controlled by Entity Framework, all models defined, and my requests handled by Web Services?
Any clarifications are welcome. Thank you.
In a broader sense, Web API is used to create Web Services ! It uses HTTP as its standard for creating services (instead of SOAP like in asmx) as its more open and any type of client like a mobile app, desktop app, web app etc will understand HTTP protocol. Another advantage is that u can easily use JavaScript/jQuery to communicate with your Web API. With SOAP web services, its a nightmare!
Kendo UI and Web API is a great combination. We have recently created a mobile iPad app using this combination and it worked like a charm. We also used Entity Framework with oracle as back end DB and it never gave any issues.
Webservices are nice if you have the need for it. A need as in needing that logic/data in more than one different type of application (such as web, and a mobile app, and a desktop app). (Or if you want to sell the service you're providing)
Using a webservice for ONLY a website which you don't except to expand to other things is complete overkill.
Furthermore, the MVC framework and the Web Api framework are pretty similar except web api is used exclusively for webservices. Coding in both of them will be the difference between white bread and wheat bread.
I'm building a simple .NET 3.5 Web Application that uses ExtJS 4
I've created ASP.NET Application, added ExtJS to it and did all client-server communication with asmx services.
But I would like to convert them into REST services.
I was looking over the net but didn't found any example.
I have tried to add svc service to my solution, but I don't know which one should I use? Ajax-enabled or WCF Service.
I need only 4 simple operations (for now) in my service:
Get all records,
Create new record
Update record
Delete record
Standard CRUD, but I would like to create it using REST.
How to create a REST service inside ASP.NET Web Application.
How should I name my methods and how to create uri templates for them so
they will work with ExtJS?
How to configure Web.config so that it all will work.
I found this question: REST from asp.net 2.0
but I would like to know how to connect REST with ExtJS.
My questions:How should I add WCF Service (svc) to ASP.NET Application (VS2005, .NET 3.5), how to create methods and configure Web.config to allow communication between ExtJS rest store and webservice.