I am logging the connection status events with the wcf relay, and I'm seeing something like this in the logs.
1/26 06:47:12 ERROR Service Bus ConnectionStatus: 'Reconnecting' Event. [(null)][42]
LastError: System.ServiceModel.CommunicationException: Exception of type 'System.ServiceModel.CommunicationException' was thrown. ---> Microsoft.ServiceBus.Messaging.Amqp.AmqpException: An AMQP error occurred (condition='amqp:unauthorized-access').
--- End of inner exception stack trace ---
This exception doesn't show up in the list on this microsoft page, and the only other post I can find anywhere related to this error message is here. However, that post does not have any recent comments or a resolution or workaround for the issue. Also, the exception doesn't have any stacktrace, so how am I supposed to troubleshoot this error?
I guess as a follow-up, I would ask whether this is anything to actually worry about if the wcf connection is never faulting.
Apparently, the token that the relay keeps refreshing to stay active requires the time on the server to match the azure service that it is connecting with, and if not, this type of error will show up. We were able to fix it by correcting the server time.
Related
I am using Microsfot Lightswitch, running my deployed applications as Virtual Directory in IIS. So far it is working fine. Since yesterday I am getting the error message right after successful login.
The application has stopped responding due to an error and needs to be restarted.
Error details: [Arg_NullReferenceException]
Arguments:
Debugging resource strings are unavailable. Often the key and arguments provide sufficient information to diagnose the problem. See http://go.microsoft.com/fwlink/?linkid=106663&Version=5.1.30214.00&File=mscorlib.dll&Key=Arg_NullReferenceException
I also used fiddler to trace the actual error, but still could not find. Here is the fillder's screen shot:
Can any body suggest what could be actually going wrong, or how can I reach to the actual real error?
Edit: It seems there is some problem with the read-line in fiddler, but I am unable to dig down the real error, actually I am new to fiddler.
i have a question which is bothering me for a long time.
I am using Windows Phone 8 and c#.
From time to time I get this Excpetion while downloading a file from the web:
A first chance exception of type 'System.IO.FileNotFoundException' occurred in mscorlib.ni.dll
A first chance exception of type 'System.Net.WebException' occurred in System.Windows.ni.dll
A first chance exception of type 'System.Net.WebException' occurred in System.Windows.ni.dll
ExceptionMessage:The remote server returned an error: NotFound.
But then I run the programm again and it works fine. I don't know why it can't find the remote server sometimes, is the problem really with the server?
It think its something in my code, i use these functions:
WebRequest request = WebRequest.Create("http...);
IAsyncResult res = request.BeginGetResponse(new AsyncCallback(DownloadComplete), null);
I would be grateful for any advice, because this Exception keeps popping up and I couldn't solve it.
It doesn't say it can't find the remote server, but that the server balked at the file requested because it didn't exist on that remote server at that time. It's hard to know your exact scenario, but putting aside network issues, it could be something as simple as the file doesn't exist, at that point in time.
How often is this file being updated, if ever? Think of the possibility that, at the time you request the file, it has been deleted and will momentarily be rewritten.
The web isn't inherently reliable and is only made to look reliable; there are numerous techniques in this, but what I'm saying is that, in your case, it might be worse some 'recovery' logic to try again upon failure after a period.
Just a possibility.
I get this when I forget the phone is running in an emulator and change the web reference to localhost. Localhost will then be interpreted on the phone itself and obviously the web service isn't running on the phone. If you are doing local debugging, make sure to use your machine's IP address and not localhost or 127.0.0.1.
I've been battling with this for a few days now with no luck. I've setup a NServiceBus project by following the guidelines on the getting started guide.
My MVC site successfully pushed messages onto my queue, but the subscriber never reads them off. No error messages until after about a minute, where the following pops up on the console:
2012-06-26 13:05:43,648 [1] FATAL NServiceBus.Hosting.GenericHost [(null)] <(null)> - Autofac.Core.DependencyResolutionException: An exception was thrown while invoking the constructor 'Void .ctor(Raven.Client.IDocumentStore)' on type 'RavenTimeoutPersistence'. ---> System.Net.WebException: The operation has timed out at System.Net.HttpWebRequest.GetResponse()
at Raven.Client.Connection.HttpJsonRequest.ReadStringInternal(Func`1 getRespo
nse)
at Raven.Client.Connection.HttpJsonRequest.ReadResponseString()
at Raven.Client.Connection.HttpJsonRequest.ReadResponseJson()
I can successfully connect to Raven via the web portal, and I can see my queues listed there - so am at a loss as to why NServiceBus cannot read the messages on the queue. I've reinstalled MSMQ, rebooted machine, re-installed NServiceBus - nothing seems to work.
Does anyone have any idea as to whats going wrong here?
This turned out to be another victim of Kaspersky Anti Virus. Even though firewall was set to "Allow all network connections", turning it off solved the issue.
I'm working on an asp.net application which communicates with web services. However quite often of late, the services have been down. I don't want to throw a generic Exception but rather a very specific one. What is the Exception name that handles 'connection timed out'. Thank you!
The correct one to throw is TimeoutException. The default message is The operation has timed-out
From MSDN:
The exception that is thrown when the time allotted for a process or operation has expired.
I have the following WCF client code:
string add = String.Format("http://localhost:{0}/ServiceRequestRest",accessPort);
var cf = new ChannelFactory<IServiceRequestRest>(new WebHttpBinding(), add);
cf.Endpoint.Behaviors.Add(new WebHttpBehavior());
busService = cf.CreateChannel();
busService.DoMyStuff("hello",null);
When I have "first chance exception break" activated, that last line of code throws a series of exceptions. The first exception is this:
System.InvalidOperationException occurred
Message="Envelope Version 'EnvelopeNone (http://schemas.microsoft.com/ws/2005/05/envelope/none)' does not support adding Message Headers."
Source="System.ServiceModel"
StackTrace:
at System.ServiceModel.Channels.MessageHeaders.ValidateHeaderKind(HeaderKind headerKind)
I am not aware that I am trying to "add Message Headers", but I choose to continue execution and immediately get the next exception:
System.Net.WebException occurred
Message="The underlying connection was closed: The connection was closed unexpectedly."
Source="System"
StackTrace:
at System.Net.HttpWebRequest.GetResponse()
With all that said, I'm having difficulty understanding what the problem is. Any clues?
Update: The return type of my REST call could not be serialized, as I learned from another site. That alone could cause this problem, but after I fixed it I still had the same problem. When I use a regular catch block for the exception, all I get is "the connection was closed unexpectedly." What else could I be missing?
Update2: I think I found the final problem. I was getting interference from Skype. The code is working now. :)
The main problem that I see is that you are trying to use a WCF Channel to communicate using WebHttpBinding.
IMHO the entire purpose of WebHttpBinding was so that the client did not have to use the WCF stack to communicate with it. You simply use any HTTP stack to make the requests.