WebService C# and HTML5 - c#

I want to realize an interface using HTML5 and bind it to an exisisting C# application. I saw that to realize this application i have to use a WebService , but I don't know how make comunication between the c# application and the page in HTML5. My questions are:
1) How create the webservice in Visual Studio 2010 Express Edition, and where it must be saved
2) How allow the comunication between application, web service and interface
I have already installed and running IIS.

Just make Restful services, whether in WCF or Asp.net MVC
Call those services using Ajax from jquery.

Actually you need to create the service and Access it with Ajax/jquery.
This Page will explain you step for step http://www.codeproject.com/Articles/37727/Prepare-a-JSON-Web-Service-and-access-it-with-JQue

Related

Running a Angular front-end written in TypeScript in a C# Web API project?

Let's say I have an existing ASP.NET Web API project, complete with all the API controllers I need for some service. Previously when using this API, clients just did their typical URI routing to use this API.
Now, with ASP.NET Web API, they provide a simple front end. I'd like to add AngularJS to this, and I see one obvious way to do that, and that's through Angular's JavaScript library. How can one do this with TypeScript? I understand that TypeScript is a language that compiles down into JavaScript, which to me implies that I need to get some step in the build process for Visual Studio (not Visual Studio Code) that builds the TypeScript for my front end.
How can this be done? I have done some tutorials for TypeScript where they have you pull something off NPM that gives you the foundation for your website and you go from there. However, in all of these tutorials, I've done this in Visual Studio Code where you have the Angular CLI and you can ng serve --open to run the web server and develop your website, but I have no clue how to translate this feature into Visual Studio 2017 where both the Web API and the Angular front end are both running at the same time.
I envision the product I'm working on running on IIS and when clients navigate to the page, they'd be served up the Angular front end and the Web API would exist in the back end doing what it does, but I don't know how to marry these two together. Do you need to have two web servers running, one for the Web API and the other for the front end? If you can do it on a single web server, how can it be done? Thanks.
If you have a working API you can run this as normal, say on localhost:8000.
Now you create your SPA (angular or whatever) and run that on localhost:8001.
They run independently, all you do is query your endpoints, obviously passing paramters (say localhost:8000/api/something/3) in order to retrieve the data you're looking for.
If the API is not public, you simply don't expose it as such.

Is there a way to use Metatrader4 C++ version dll with C# to connect to live server

My application is based on asp.net mvc , c# and my client want to connect this application with MT4 server.There is server api https://support.metaquotes.net/ru/docs/mt4/api/server_api
which is in c++.This api help to login at MT4.My application is in Asp.net mvc c# and i want to call these c++ methods in c#.
Is it possible to work with c#.
tAHNKS
Server API is tend to be used to write server plugins, which will be loaded into server memory at runtime. You can use .NET code there, however it's not the best idea.
There is Manager API, I think, it's functionality is sufficient for web application. However officially it has only C++ API. But you can use my wrapper to access it from ASP.NET: https://github.com/Uriil/MetaTrader4.Manager.Wrapper
But both options requires manager credentials

How to show mysql database from java web service using c#

I've created a web service using Java (Netbeans IDE). The web service is a web service with MySQL database. and now I want to create a client application using C# Windows Form (Visual Studio IDE). I've added a web reference (wsdl link) on a client project. but I am confused about how to display the records from my database on my C# Windows Form.
Need help pleaseee,,, thx before...
You should add a service for get a value in your web service.for example GetData and in c# call the service.
Every service returns a specific type for example List<> or a class like Person.

Where's the ASP.Net WebService in Visual Studio 2010?

I am trying to create my first webservice. I've been googling for a tutorial or examples and most of what I find is from previous versions of Visual Studio and say to create a new ASP.Net Webservice...but that doesn't exist in 2010!
What I need to do is have the service receive 2 strings, an agency and a man number. Then run a query to get some information and return a string with a date and time back to the requestor. I need to have a web interface available to call the service as well.
Any guidance on what I need to do to create the service in Visual Studio 2010 in C# will be appreciated!
Update: I've just been told that this process needs to authenticate the users...can someone guide me to information on implementing certificate or digital signatures into my web service? I've looked but most of what I'm finding is for authenticating through Active Directory or some other maintained list with usernames and passwords.
This puzzled me too. There's another puzzle to be had when you try and add a reference to an ASP.NET Web Service too, but I'll let you have fun with that one.
Change the target framework version in the dropdown list to .NET framework 2 and choose Web on the left hand side when creating a new project and it will appear.
Actually, I'm not going to be mean. If you are going to reference the web service from an application built using.NET 3.0 or higher:
Go to Add Service Reference
Go to Advanced
Click Add Web Reference at the bottom of the dialog.
In VS 2010, you can't create web services because this is covered with WCF services.
To create ASP.NET Web Services, you need to select ASP.NET app with Framework 3.5.
Visual Studio 2010 SP1, .NET Framwework 4.0
You need to create ASP.NET web site, and then Add New Item and there select from Web tab template Web Service.
Consider creating a WCF service instead. This is the evolutionary successor of the 'bare' Webservice.
When you configure the WCF server with BasicHttpBinfing you have a (SOAP) Webservice. Other binding-types (including more advanced WS-* webservices) only require changes in the config.
But for an old-style ASMX based webservice you can follow fletchers answer.
It looks like Microsoft have removed the ability to create Web Services with Visual Studio 2010 Ultimate SP1.
It does not matter what framework you are using (2, 3, 3.5, 4) the option is not available. It is unknown at this time why Microsoft made such a move. They have been hush hush over it for a while now.
THE BELOW SIMPLE STEPS WORKED THE BEST FOR ME....
create an empty website
rightclick -> add New item
and select Web Service .
This will create a empty webservice.

How does calling a web service from a .net app work?

I added a web service as reference to a project and gave it name "days". But I don't actually understand how to work with it. Can someone show me the way how to get data from it?
In posh I get data from a web service this way:
$ws= New-WebServiceProxy -uri $xmld.Root.WebService.Address -credential $cred
$xml = $ws.getdays()
$xml
Have a look at
Walkthrough: Calling XML Web
Services from Windows Forms
Creating a .NET Web Service
Walkthrough: Accessing an XML Web
Service Using Visual Basic or Visual
C#
Fortunately, you don’t need to write a client application to test a web service because .NET includes a test web page that ASP.NET uses automatically when you request the URL of an .asmx file in a browser. This page uses reflection to read and show information about the web services, such as the names of the methods it provides.
To try the test page, request the xyz.asmx file of the web service in your browser. (In Visual Studio, you simply need to set this as the start page for your application and then run it.)

Categories