I've created a project of type "gRPC Service C#" in Visual Studio 2019. Can I add (and host) web pages to that project? or should I create another one (and what type of project)?
I want to use these web pages as interface with gRPC services (not call them directly from a web browser). Thank you in advance for your help.
Looks like it's possible by using a Worker but it's a lot of pain. Good practice is having a worker or IIS to host gRPC service and a web application on another project.
Related
Any help would be greatly appreciated!! I have scoured the web trying to find an answer. I am writing a UWP app that will be deployed to the Xbox platform. I need to access a web service written in .Net 2.0. In earlier versions of .Net / Visual Studio the Add Web Reference Button was hidden in a panel accessed through ->Add Service Reference ->Advanced ->Add Web Reference. With latest build of VS2015 the Add Web Reference Button is missing. Did this completely go away or is it hidden even deeper in the environment somewhere?
XML Web Services, also known as ASMX services, were the predecessor of Windows Communication Foundation (WCF). You can access Web Services by adding a service reference just as you would for any other WCF service.
A service reference enables a project to access one or more Windows Communication Foundation (WCF) services. Use the Add Service Reference dialog box to search for WCF services in the current solution, locally, on a local area network, or on the Internet.
For more info, please How to: Add, Update, or Remove a Service Reference.
I have a full installation of Visual Studio 2010 with .Net framework 4. I want create my first web service. but not exist web service template.
In visual studio 2010 I go to File -> New Web Site menu , but in the New Web Site dialog box not exist ASP.NET Web Service template.
How to create a Web Service?
Use File->New Project->WCF Service Application.
"ASP.NET Web Services" (aka ASMX) is a legacy technology. It exists only to support existing ASMX services. Do not use it for new development.
create ASP.net Empty Web Site and add asmx file. that's it.
Or You can Target the .Net Framework to 3.5 when you create the project and web service template available for .net 3.5, create the project and re target it to 4.0 or 4.5
But You better move to Windows Communication Foundation (WCF)
Go to File --> New -->Asp.Net Empty Web application.
on that Right click --> Add New item - >webservice template
File > New Project > Visual C# > Web Service Application
You can create multiple projects under one solution..
create a web service,build and run it.
Then create another webapplication under the same solution file.
Add reference..
Thats it..
I am new to WCF and I don't really understand the puropose of a WCF class library. (it does not look like a library to me it launches a program when I run my application) I have created a WPF application with a reference to my WCF service library. Everything works great under development. When I launch my application from visual studio the service get's hosted automatically by visual studio.
Now let's say I am ready to deploy. If I launch the application from outside visual studio then the service will not run. How do I start the service?
WCF service class cannot exist in a void. You need to host and there are a couple of option for Hosting.
In Visual Studio, there was two main template for WCF, WCF Service Application and WCF Service Library. Depend on your need, choose which template will be good for your project. If you want Self Hosting, better choose WCF Service Library template. (You need to write Hosting Service/Application). If you want to Host in IIS, better choose WCF Service Application.
And check this Tutorial for self hosting.
http://wcftutorial.net/WCF-Self-Hosting.aspx
I am new to wcf. I have developped a wcf service application(not a library). Can someone tell me how to deploy it other than iis. And how to access the service as a webservice. is this possible and how?
This link has an example that shows how to deploy a WCF-service as a servicehost application.
This means it runs as a service and does not need to be deployed to an IIS-instance.
There is an automatic WCF deploy tool in Visual Studio or copy the code to the server.
The server will be access like through a website like http://localhost:2342342432342/YourWebService.Svc.
You have to get the references from the WS using a tool that generates all the classes for you and you use that service's classes to write your code.
If your intention is to deploy to to a server that does not use IIS for hosting, you could look at an alternative hosting application like Cassini.
I have a Web Service Project and a Web Site Project both within the same solution. I have a simple link on a web page within the Web Site Project that needs to point to a web services WSDL (example: Webservice.asmx?WSDL) within the Web Service Project. Is this possible?
Would I be better off using a hardcopy of the WSDL document and just putting that in my web site project?
I don't believe so. You will need to have the webservice run, in either IIS, or through visual studio.
Why not add a Web reference to the Webservice (Browse for "Web services in this solution") ?
That's what adding the reference does, basically... along with creation of the class mapping. Then you could always update references without having to worry about hard coded wsdl links.