DNS error when trying to connect to Windows Azure Service Bus - c#

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.

Related

HttpListener "Connection Closed" in Browser when using SSL

We have some custom http webservice build on HttpListener in .net 4.8.
This thing works fine on different customer systems, however on one of our new customers system, we have trouble getting SSL to work.
The problem is, that accessing a simple echo page (that just dumps the request into the output), modern browsers like firefox, chrome and edge get a connection reset, once the listener starts writing into the output stream.
Internet Explorer and WebRequests work without any issues.
Im pulling my hair out, all I could find is recommendations to reinstall IIS since this seems to be a known problem in old ASP.net Solutions. However we do not use IIS.
The next problem is, the customers IT is really restrictive and does not allow us to install tools like WireShark or Fiddler.
I dont know if there is any other possible combination of netsh commands to add the ssslcert, im certain by now that i treid everything.
We even used one of our own certificates, but no success.
EDIT It seems to be related to the fact, that the customer is using a Windows Server 2022.
Turns out this is a known problem in Server 2022
https://borncity.com/win/2022/10/22/fix-des-ssl-tls-verbindungsproblems-stand-der-sonderupdates-und-betroffene-anwendungen-21-10-2022/
Disabling TLS 1.3 via registry did the trick for us, as a workaround.

IIS Express 'The specified port is in use' Visual Studio 2015

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.

Windows Service Start Failure for self hosted SignalR

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.

Can't open https://graph.facebook.com/

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

DotNetOpenAuth OnLoggedIn event never fired

I am a fresher to use the DotNetOpenAuth. And I have download the latest version V3.4.6 from your website which includes samples.
But when I try to test the “OpenIdRelyingPartyWebForms” project, it seems that the “OnLoggedIn=OpenIdLogin1_LoggedIn” event never been fired, so the friendly user name can never be displayed. And I also test the “OpenIdRelyingPartyMvc” project, after I logged in with Yahoo opened, it always give the following information “This message has already been processed. This could indicate a replay attack in progress.” It seems that I can always get this error message.
Further information: I test it in my company then got the above information; but when I go back home, I can successfully use all the DotNetOpenAuth examples and even my own codes with it can work well.
My computer OS in company is: Windows 7
My computer OS in home is: Windows Vista
Maybe the company network environment is different from the network environment at home??? Or maybe it is caused by different OS???
I have seen others to raise a similiar question which is also about "OnLoggedIn" event can not fire, but seems no one reply it.
Can you give any help about this?
Thanks.
I have resolved my problems. I finally found out that it is due to the configuration issue. I just add maxAuthenticationTime="0:10" in the openid section, that is:
"openid maxAuthenticationTime="0:10"",
then I can get the examples run normally. Maybe the default maxAuthenticationTime is less than 10? Maybe in some network environment, it needs more authentication time.
Anyway, thanks for your reply and your excellent work for openid.
It could very well be that your company network has a firewall that blocks something that OpenID needs if your site is on the internal network. Impossible to say what for sure though, being on the outside.
The OS version shouldn't have anything to do with it, however.

Categories

Resources