I have developed a WCF service using .NET 3.5, VS 2010 on Win 7 64. This will be hosted in a Windows Service.
I created a Windows Service project to which an Installer is added by rt-clicking. The WCF dll is also added.
For testing purpose I have installed this service by running the InstallUtill.exe passing in the service exe from the Windows Service project release folder. All works fine I can see the service in Services.msc and they can be accessed by clients.
The client does not want an MSI so I have to give him the release folder of the Windows Service project.
Here are my questions:
Is it required to add the .NET framework requirement, which gets added by default for MSI projeccts, to the Windows Service project. If yes then how do I go about doing it?
Can the client use the InstallUtil.exe from the framework or is there another way to install on machines that don't have VS?
Does the service need to be built for both 32 and 64 bit systems?
I know that InstallUtil.exe is part of the framework and any machine that has one is good to go but just out of curiosity is there any other way to install the Windows service without an MSI?
Regards.
I don't know about InstallUtil.exe, but I do know that in order to install a WCF service manually, you need to:
Give the client the requirements (.NET framework, WCF installed)
Create a folder in IIS for the service
Create a bin folder in that folder
Copy the .svc and the web.config in the first folder, and copy the .dll in the bin folder
In IIS, right-click on the folders and Convert to application (the two folders)
Be sure that the folders have the appropriate rights
I had to do this for test purposes on several machines at my job. But in the end, we did an MSI for the client.
Hope that helps you!
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'm an asp.net developer and recently trying to archive asp.net-core.
Since it's quite new, I would like to ask, how do you launch a asp.net-core project in a Windows machine?
For normal asp.net, my approach is publishing the project using Visual Studio, bring everything to a Windows machine, use IIS to create a website and point the directory to my physical file.
How about a website that created by asp.net-core?
Do I need to install asp.net-core in server machine? (i don't prefer this)
What should I do with the published file? There are two folders generated after publishing the project:
netcoreapp1.0
PublishOutput
Well, you still can use the file system mechanism to publish an ASP.NET Core project from Visual Studio. But VS uses the dotnet CLI under the hood to do the same stuff. Usually you configure your deployment depending upon your hosting environment such as Windows Server and Linux Server.
For Windows Server
You have to install ASP.NET Core Module in order to publish on IIS successfully. This will also install .NET Core SDK. You can than have the advantages of SSL Terminations and others provided by IIS on Windows Server.
For Linux
You have to use the .NET Core SDK here as well for a published app to acquire the .NET Core runtime (This is why you get those 2 folders). You use Nginx or HAProxy to get all SSL Terminations, Port-Forwarding etc.
I have made a WCF data service and a test client which both run fine on my local machine. The service is hosted on the local IIS on my machine.
Now I'm trying to setup a remote win 2008 R2 server to host the wcf data service, and this is where I run into trouble.
I have first tried to install "WCF Data Services 5.0 for OData V3" from http://www.microsoft.com/en-us/download/details.aspx?id=29306
But I get a "0x80070643 Fatal error during installation"-during installation. I have the log file if that helps.
Now I'm thinking, is it because I need to install "http://www.nuget.org/packages/Microsoft.Data.Services" on the server? I know I did this on my local machine. However this would require me to install Powershell, Visual Studio and NuGet on the server. Is this necessary to get things to work?
If you're using the NuGet packages in your project, then the easiest way is to bin-deploy the WCF DS runtime assemblies. More details here: http://blogs.msdn.com/b/astoriateam/archive/2012/08/29/odata-101-bin-deploying-wcf-data-services.aspx
I am trying to deploy a WCF service to AppFabric however there is no Deploy option when I right click on the default web site in IIS manager.
Yes this is a new install.
Anybody got any ideas on how to activate this
Actually I just found that I had to reinstall (did a complete install) MSDeploy and it worked fine.
Windows Server AppFabric requires .NET/CLR 4.0 - my guess is that the default website has a CLR 2.0/.NET 3.5 application pool backing it up (which is the default.) Rather than use the default web site, you'd be better of to create a new web site with its own application pool, set to use v4.0. This should enable the import/export application contenxt menus.
I have developed a Web service using WCF Service Application. This service application is a part of multiple projects. we have data access , services(business logic) , testing(to test class) and WCF Service application.Where WCF Service application is just like an infterface and all the request are sent to the services project. so all the projects communicate with each other. I am new to hosting WCF application. Now to host this on IIS do i have to put the whole project in the IIS virtual directory?
Right-click the WCF Service project in Visual Studio and choose Publish.
You can manually copy the needed files or setup a script or other automated process to do it for you. Perhaps a Visual Studio post build event. I create my WCF services in their own website project under my solution. Then when it is time to deploy/update the production site, I copy the *.svc file(s) and the *.dll file(s) in the bin directory to the production folders. I keep a seperated web.config for my production and development environments.