I need to iterate through the nodes in Umbraco 6.2 in the external web application.
But dont know how to make a connection in the code behind to Umbrao cms.
Thanks
Easiest way would be to use umbraco web api.
Umbraco Web api would allow you to set up a restful web service that would call via a url with querystring parameters if required.
In the web api controller, you would have access to all of the Umbraco nodes and you could return results in xml or json format as required.
This is a good reference - https://our.umbraco.org/documentation/Reference/WebApi/
Wing
Related
I have a client that's converting from a PHP system to a .NET system. One requirement is that certain legacy system URLs ending in ".php" are still accessible in the new .NET environment.
Essentially I need to map arbitrary string paths to specific Controllers/Actions.
Can anyone tell me what the recommended and most performant approach is in ASP.NET Core 2.0 to handle this scenario? Custom middleware? Introduce a Web.Config? Action attributes in the controller?
Are there any "gotchas" I should be on the lookout for?
The site is hosted in Azure, if that makes a difference.
Thanks in advance!
Can anyone tell me what the recommended and most performant approach is in ASP.NET Core 2.0 to handle this scenario? Custom middleware? Introduce a Web.Config? Action attributes in the controller?
I assume that you could leverage URL Rewrite and read the related tutorials. I just checked it and added the URL rewrite rule under my azure web app via the Azure App Service Editor as follows:
TEST:
Additionally, you could also write the URL rewrite rules in your code, details you could follow URL Rewriting Middleware in ASP.NET Core.
I am trying to write a client program for consuming a SOAP web service using ksoap2.
I don't know how to find out if a WSDL is .NET based. In a video tutorial I watched, they said that since the URL contains the term "asmx" (this one), which stands for ASP.NET, so it is a .Net based web service.
But if I have any other web service and its WSDL, all I see is an XML schema (and I have seen URL's of WSDL's which do not contain "asmx"), how do I get to know if it is a .NET based webservice or not? Is it generally possible to detect?
.svc extension can be some pointer for WCF service. You can also browse service url (something like http://demos.telerik.com/aspnet-ajax/combobox/examples/loadondemand/wcf/ComboBoxWcfService.svc), WCF services display information page.
I'm looking to make a RESTful API on ASP.NET for a website. My problem is that I need it to be integrated into the website and not as a separate project.
I understand that WCF makes this really easy and its the ideal way to do it, but I don't think you can combine a WCF Service Project and a ASP.Net Website, Is this correct?
Is there a way we can do this using a webservice (asmx) file (since I know that asmx services use SOAP no?)
The reason I need this to be in the same project is that the customer will be able to purchase ssl for their domain (which the website is going to use) and I need to make the API secure as well, but the customer should not be asked to purchase two ssl or even a wildcard one.
Knowing this, is there a better easier way of doing this using WCF?
Take a look at the new MVC4 Beta, it's set to go live sometime between March and April this year and should be able to accommodate your requirement to build a RESTful web service alongside a web application. I haven't spent too much time with MVC4 to go into the details, but it's definitely worth a look. Links: Get MVC4; MVC4 and WebAPI blog.
Hope this helps!
You can use ASPNET MVC to build an API along with your website.
See How can I implement a site with ASP.NET MVC without using Visual Studio? for some details on building a basic MVC site.
ASPNET MVC services can respond in JSON or XML, or both.
There will be no special requirement for two SSL certs.
I have an ASP.NET MVC 3 application that exposes both WCF REST services. I'm using .NET 4. You'll have to pay attention to how you configure your routing. For example, my WCF services are prefixed with something like "api/v1/" while all other requests are handled by ASP.NET MVC 3.
I had a problem because IIS refused to serve some "localhost" requests (like when your MVC 3 controllers try to consume your WCF rest services). That was solved by adding an entry to my hosts file. Also be aware of this when implementing an OAuth 2.0 Resource Server or Authorization Server.
Using WCF for REST services works ok in .NET 4, but the JSON serialization sucks big time. There are issues with default dates and it is rather slow. You may want to look at using a different serializer. With WCF you sacrifice some flexibility for some features you get for free.
ASP.NET MVC 4 (and the WEBAPI) is still in BETA, so I'd avoid that for a project with a short term release date.
I'd actually use NancyFX. Setting up routes is super-easy, and it comes with built in XML and JSON serializers that act based on the data in the headers.
I have several asp.net website projects for various sites.
Currently I want to add REST API's to these projects so I can start developing mobile apps (using HTML5/JavaScript/CSS3 and PhoneGap) that make use of these webservices.
Since WCF is far more powerful than regular asp.net webservices (among others with control over the service and authentication/authorization), I'd love to add these to my existing website project.
I did a Google search but cant find anywhere a step-by-step tutorial how this can be done. And also if there's any functionality I'd possibly loose when adding WCF functionality
I was also thinking of creating a new project specifically for WCF, but think I'd rather add it to an existing website project.
Can anyone help me with this?
Depending on exactly what your needs are and how your current web site is configured, there are two approaches.
If you are using a Web Site Project, then you should create your WCF service in a different application:
1) Create a new ASP.Net Web Application Project.
2) Add a new item to the project and select the type of WCF Service or WCF Data Service.
When you deploy this project, you will deploy it to your web server, but not as part of your web site since configuring the web.config will be a large manual effort.
If you are using a Web Application Project, then you could add the WCF Service directly to your existing project. However, I only recommend this approach if you are Silverlight applets within the web site that rely on the user's authenticated credentials.
WCF can be configured with a lot of bindings and it can be configured to return xml or json(.net 4.0). Try to create a wcf service configured to use basichttpbinding or wsHttpBinding and to format the response as json and use jquery to interact with the wcf service. This article might help you http://www.codeproject.com/KB/aspnet/Cross_Domain_Call.aspx
How to retrieve data from database using Web services on VB?
Does it have to be a web service? Have you considered WCF? (Windows Communication Foundation)
http://msdn.microsoft.com/en-us/netframework/aa663324.aspx
If I understand you correctly, you are asking how to setup a web service using vb.net to communicate with the database and return the results.
If that is correct, then there are 2 parts:
How to write a web service
How to communicate with a database
Here are three pages that will help you create a web service:
vbdotnetheaven
codeguru
techrepublic
As for the database, if you are talking about SQL Server, then see this page here and this page here
Your question isn't clear enough. Are you trying to access a web service run by ASP.NET using VB? If yes, you can make SOAP request to your web service easily using VB, your web service will then fetch the data from database and return to you. You can have a look at this tutorial on how to make a SOAP request using VB -
http://www.aspfree.com/c/a/VB.NET/Calling-a-Web-Service-using-VB6-with-SOAP-30/1/
Hope that helps.
Create a proxy class from the web service's WSDL, using Visual Studio's "Add Web Reference" feature
Configure the proxy, such as for security, if needed (the details depend on the API)
Call the proxy from your code