Is it possible to host .svc file on ASP.NET Development Server? How?
Yes.
If your project type is regular library project then one way is to create a website project and copy the svc file + corresponding service dll's to the bin folder for that project.
Then, when you run the solution (F5), you will find that the website is hosted in cassini (asp.net development server)
The only catch is that the virtual port is different everytime you run the solution.
However, you can specify the project to run on a specific virtual port as well.
Refer this link on how you can do that
Related
I'm attempting to get IIS to serve our ASP.NET 6 web application, but every time it complains of needing a default document. If I run the exe (kestrel) one it will serve it, but we want it to be hosted by IIS with the other components of the site.
I installed the 6.0.10 runtime w/ hosting package and these are the results when listing runtimes:
When looking at the site modules, I think it should have what is needed (think the AspNetCoreModuleV2 one handles the compiled routing scenario?):
Have rebooted the server and the app pool specifically, set to No Managed Code, and whenever I attempt to load the page at the localhost level, I get:
The views are compiled so I don't think I even need IIS to open views locally in any capacity.
Everything you've posted ticks off the major deployment steps for hosting a .NET 6 project on IIS:
Installed the .NET Core 6.0 Runtime Windows Hosting Bundle
Set up the IIS app pool with "No Managed Code"
Rebooted the server: "Have you turned it off and on again?"
After our exchange in the comments, the only thing that appeared to be missing is to use the .NET publish command; not the build command.
When deploying to IIS, you'll want to run the dotnet publish command and then deploy those artifacts to your IIS server. From the docs:
The dotnet publish command's output is ready for deployment to a hosting system (for example, a server, PC, Mac, laptop) for execution. It's the only officially supported way to prepare the application for deployment. Depending on the type of deployment that the project specifies, the hosting system may or may not have the .NET shared runtime installed on it.
You also may want to review: Publish .NET apps with the .NET CLI.
I have a .NET Core application ready to deploy. I've already tested this application on my Linux (CentOS) server with the command:
dotnet run
and everything is running smothly. Now I want to publish this web application on my Apache server. So far I've runned the command
dotnet publish
which created a folder named netcoreapp1.0. I've moved that folder to the var/www/mywebsite folder and created the respective sites-enabled and sites-avaliable conf files. The problem is I cannot access application at all.
With this, I would like to know if there is anyone out there that had published a .NET Core application into an Apache server in order to give some tutorial on how they did it.
When trying to launch solution, I receive the following error:
error : The Web Application Project MyApp is configured to use IIS. The Web server 'http://localhost:64646/' could not be found.
How do I resolve this issue?
I opened IIS and set the TCP port on the Default Web Site to 64646 and the project loaded without error.
You need to install IIS on your development machine.
Using IIS you'll also need to run Visual Studio in Admin Mode as well.
It is recommended that you use IIS Express since it will allow you to run VS without Admin privileges.
You have to install IIS and create the web site in IIS with the matching port number. Someone else created the visual studio web project to use IIS and configured it on their computer. Each person who opens the solution has to have all the websites configured in IIS manually.
You might consider creating a script that auto-creates them in the source repository. You can do it using AppCmd.exe (ADD SITE, ADD APPPOOL, LIST APPPOOL, LIST SITE) (%windir%\system32\inetsrv\AppCmd.exe).
I have 2 virtual directory on my IIS (first for server developing and second for client devloping).
Each directory point to different folders:
c:\Server\ -> localhost/Server/service.svc
c:\Client\ -> localhost/Client/service.svc
(Whenever server "binaries" are stable I copy them to Client path)
My problem is that whenever I start debugger for server (where in VS I set "Use local IIS web server" to "localhost/Server/service.svc" ) the breakpoints are also hit form localhost/Client/service.svc (also when "binaries" are different).
I thing it is because debugger connect to w3wp.exe .
I tried to change AssemblyInfo.cs but that didn't help.
Thanks.
I assume that run both websites under the same IIS AppPool. This means that both websites run in the same process. You need to use different IIS AppPools if you want Visual Studio to debug only Server.
Also you probably have architectural issue. Usually there is no need to have the same service.svc in client and server.
Normaly you should have one Visual Studio solution with 3 projects configured as follows:
Project with Contracts (contains data and service contracts)
Server project with *.svc files
Client project that contains Server references generated for Server endpoint.
Both Client and Server reference Contracts.
I need to deploy a webapplication developed in my local system (used Eclipse) on a tomcat server running on a remote server. For this what all privilages are to be needed on the existing server.
What version of Tomcat are you using? You should just be able to go to manager screen and deploy your war file from there i.e. http://hostname:8080/manager
On Tomcat 7 you need to have a user entry in /conf/tomcat-users.xml for the role manager-gui.
If you can connect to the server hosting tomcat you could copy your war file to the webapps directory manually instead.
the easy way to deploy the application is to make a war file of your application and paste it in the webapps folder of tomcat installation folder. By default it catalina_home/webapps
or use the inbuilt hostmanager application.