Really trying to figure out how to install a SignalR Self Host windows service. It's my first attempt with a windows service and it's driving me bonkers. After many failed attempts, I really could do with some help. I'm using cmd in a windows server 2012 environment.
The error in a traditional win popup:
Cannot start service from the command line or debugger. A windows
Service must first be installed(using installutil.exe) and then
started with the ServerExplorer, Windows Services Administrative tool
or the NET START command.
I know this has been raised a few times on SO but no other posts seems to help.
My command to install:
C:\Windows\Microsoft.NET\Framework\v4.0.30319 InstallUtil.exe
C:\SignalRService\bin\Debug\RW.WinServ.exe
This is not installing what so ever and I originally thought, it must of installed so I'll go an start the service but no service found.
I have two versions of the windows service I'm trying to install/start my own version and an example taken from Microsoft, neither work.
https://code.msdn.microsoft.com/windowsapps/SignalR-self-hosted-in-6ff7e6c3
I hope enough information has been supplied to help me diagnose the problem. If any code is required then please give me a shout. But again even with the source code from the above link, I cannot get this to work. So I'm leaning towards my environment not being properly configured.
Any help greatly appreciated!
Regards,
Although this is not a direct answer too the problem I was facing, I do believe it may help many in the future: https://damienbod.wordpress.com/2014/06/03/signalr-self-hosting-template-for-a-windows-service/
It solved my issue by me vigorously going through the link.
The link above is absolutely outstanding and gives great insight into Windows Services.
Related
Not sure where to ask this but figure someone might be able to shed some light on it. I am new to the whole .net core stuff and have been learning and taking some online classes. My question is this I am trying to self host a webapp/site what I am making in visual studios 2015 in C# using .net core 1.1. I have the app up and running locally when I run it in IIS Express everything works fine. What I cant seem to figure out is how to publish this to my windows 10 system. I have been digging around the web an came across a few articles but even following there steps it seems i cant get this thing to publish. Has anyone here run into the same situation and have gotten it working or know what i need/how to configure windows 10 and IIS to get this running ? Thanks in advance for any help given.
Here is the guide for configuring Kestrel to use IIS as a reverse proxy:
https://learn.microsoft.com/en-us/aspnet/core/fundamentals/servers/
Note that you do not want to use Kestrel by itself as it has not been hardened against attacks yet.
That said, what you are trying to do is not likely to work. For starters; IIS running on a desktop OS is limited to 10 concurrent connections, so having a real live website is just not going to happen. Furthermore, you need a static IP for the server to be consistently reachable via DNS. That service usually will cost you quite a bit (more than just using shared hosting).
The easiest way to host this would likely be in a free Azure Web App.
Apologies about the long message, but I thought I should let you know what I have already tried.
I've very recently started learning C# through Visual Studio and all was going OK until about three weeks ago. I clicked on the button with a green triangle which did the usual thing of launching the internet page, but the site never loads. I then noticed there was an ISS Express notification which brings up the following (can't figure out how to get my cropped screen shot on here):
'The Specified port is in use
Port 49665 is already being used by process "svchost.exe" (process ID "2112")
Recommendations
Try switching to port other than "49665" and higher than 1024
Stop the application that is using port "49665"'
I have managed to locate the svchost.exe on my computer and it is in the system 32 folder. There doesn't appear to be an option to stop it, and I am worried deleting it will break my operating system (I did click delete to see what happens and got an error saying I need permission from trusted installer to do this, but didn't go any further). When I open task manager and look through all tasks, including 'background tasks' and 'windows processes' and can't see it anywhere
I have tried to follow the advice in this discussion:
IIS Express Web Server Port Is In Use
But I cannot fully understand where the solution was- I don't think I have anything called ISS installed, however there is a Local ISS when I go to 'file', 'open website', which I found through the following:
Why and how to fix? IIS Express "The specified port is in use"
I did as the answer marked 21 (with the green tick) suggested and restarted my computer (as one of the comments suggested) however my problem persists. There is no longer anything under 'IIS Express Sites'
I have closed all browsers then tried, restarted and then tried, still no luck
The third answer (7) I really don’t know how to do this (I don’t know what solution they are referring to), so if this is a potential solution I’d be happy for further instructions
The answer marked with a 5 about netstat -aob helped me locate a task called ‘service host: local service (network restricted) (6)’. Trying to terminate this task brings up an error saying that by terminating this task Windows will become unusable- so I assume this is why I couldn’t delete the above. The final part of this answer about elevated access I don’t know what this means or how I would do this.
Closing visual studio and restarting as an administrator doesn’t fix the problem.
I only have Edge and Internet Explorer and I have ended these via task manager whenever I have tried to resolve this problem, but it persists
I tried the answer at the bottom, but was not able to locate the folder IISExpress, maybe this is part of the problem?
Any suggestions where I might be going wrong with the above, or any further advice on how to progress some of the things above, or any new ideas will be welcome.
Thanks for the suggestion Methodman. After much digging I found the solution you suggested here (change the port): How can i change IIS Express port for a site
The answer provided provides excellent instructions with a step by step guide on how to change the port
Just changed the port number until I got one that worked :)
Ed
It is an old post but just in case someone having the same issue recently; I tried many things including removing websites, running VS in administration mode. Nothing worked. Then I finally changed the port which finally worked. Right Click on project. Go to Web on the left menu. And change the port number at the end of the project url to whatever you want. I changed it to 50645.
I was trying to deploy a windows service on my machine, but when I was trying to start it I got following error.
"Windows could not start the 'myService' on Local Computer. Error 1053: The service did not respond to the start or control request in a timely fashion."
After a bit of research I found out that I was complining my project with Debug option, the moment I changed it to 'Release' mode all was good and working. I can not make sense of this behaviour so I searched the net and found this debug-vs-release-in-net but even this does not explain why my window service was failling to start if i was using debug mode's dll
If anyone can explain it that will help me lot to understand how this actually works thanks.
The remote name could not be resolved:
'x.servicebus.windows.net'.TrackingId:bbfe86f8-b5d3
Doing an nslookup works fine.
I can hit the url from the browser with no issues.
Usually rebooting resolves the issue. It seems to be the consistent thing, but sometimes even this doesn't work. Sometimes simply waiting until later fixes the issue.
I've tried closing IIS express, resetting my ip, closing visual studio, etc., but nothing immediately resolves it, other than rebooting, but like I said this doesn't always work, so not sure it's even related.
I've tried disabling my firewall. I uninstalled norton anti-virus, but no luck. I've also disabled Windows Defender.
This only seems to be happen on my Windows 8.1 machine. Even when I'm
experiencing the error, I can run the same code from my Windows 7
machine with no problems. I don't use my Windows 7 machine enough
though to know if it is really a Windows 8 specific issue.
Microsoft mentions possibly using Shared Access Signatures as an alternative for connecting to the service bus, but I'm not looking to rewrite my code over what appears to be a possible bug in Microsoft's SDK. Does anyone know how to diagnose this? I am wondering if there are trace logs that can be setup in web.config specifically for the servicebus perhaps that might give me some additional error information. Or if someone else has run into this and can provide some insight.
This does not seem anything specific to the Service Bus APIs, you can get more information on the IP configuration and reset it on you Windows 8.1 box as follows:
Open an administrator command prompt and type the following:
netsh int ip reset
netsh winsock reset
Check if any errors are listed? If not, go ahead and reboot the computer.
This ended up being a server issue on Microsoft's end which is why it was impossible to resolve through code and machine changes. It took awhile for them to get it figured out and resolved. If anyone has a similar issue they may want want to consider this possibility as well and get in touch with Microsoft.
Whatever I have tried I cannot navigate to "https://graph.facebook.com/..." neither from the web-browser, or from web-client.
Every time I try to debug, I receive an error related to the certificate on targeting domain!
I even tried:
http://dotnetslackers.com/articles/net/wFace-windows-phone-7-facebook-integration-part-1.aspx
and it doesn't work on my VS2010 debugger anymore.
But did worked before for a few weeks both with emulator and WP7 device.
At the same time, url's like "http://graph.facebook.com/..." are working without any problem.
Did someone experience this similar problem?
Or somebody with good idea to solve this particular problem?!
Check the list of supported SSL Certificates.
HowTo install SSL Cert to WP7 Emulator