Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 4 years ago.
Improve this question
I have a Windows service running on Azure VM. The service constantly accesses KeyVaults and Web APIs to run some tasks.
The logs in my service show this message sometimes while accessing keyvault. Most of the times service can access keyvault, but sometimes I get this error:
System.Net.WebException: The remote name could not be resolved:
'keyvault.vault.azure.net'.
When I connect to VM through RDP, sometimes I get disconnected with the following message and immediately connects after few seconds.
But when I see System Logs in Control panel, it shows no error message at that time.
I also have another issue while making an HTTP request to Web API as explained in this question.
So my question is, can all these be related to one another? Is it possible that VM is getting disconnected very often from the network and due to this, all the above-mentioned things are happening? How can I test and conclude this?
The times i have seen issue like this it is due to OS performance issue. It could be memory, CPU or even network throttling but almost certain performance issue.
Make sure the VM sku you are on is able to handle application performance.
https://learn.microsoft.com/en-us/azure/virtual-machines/windows/sizes
Hope this helps.
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 2 years ago.
Improve this question
I have a C# service that requires to write a certain text to a SQL Server database before shutting down after OS restart. So the service MSSQL$SQLEXPRESS should not stop before my service and in order to achieve this, I have added a dependency of MSSQL$SQLEXPRESS using the command
sc.exe config MyService depend= MSSQL$SQLEXPRESS
However, it does not seem to work as I am still getting error
SHUTDOWN is in progress.
Login failed for user 'user'.
Cannot continue the execution because the session is in the kill state
when trying to write to the database in OnShutdown(). Sometimes the error is an "invalid handle" error..
What am I missing? Also, sc.exe qc MyService shows the dependency, but dependencies under services.msc shows nothing. Why?
From the docs:
Note that during service shutdown, by default, the SCM does not take
dependencies into consideration. The SCM enumerates the list of
running services and sends the SERVICE_CONTROL_SHUTDOWN command.
Therefore, a service may fail because another service it depends on
has already stopped.
To set the shutdown order of services manually, create a multistring
registry value that contains the service names in the order in which
they should be shut down and assign it to the Control key's
PreshutdownOrder value, as follows:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\PreshutdownOrder="Shutdown Order"
Service Control Handler Function
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 8 years ago.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Improve this question
My customer has issue that, he can't use 2 functions on my system because the operation is timeout.
So i ask him for DB backup to restore on my dev machine for test. On dev machine it run very quickly, no timeout.
My system is using EF to connect to DB.
First function run on my dev machine is less than 1 second, but on customer's server is timeout(for this function, timeout is set to 30 seconds).
Second function run on my dev machine is about 60 seconds, but on customer's server is timeout(for this function, timeout is set to 300 seconds).
I have test by using 'SQL Server Profiler' to capture statement that sent to SQL Server, then i send the captured statement by using SqlCommand instead, it's not slow, time usage is nearly to my dev machine.
I don't know why, is there any mistake configuration can make this thing happen.
Any ideas, Thanks
Three things I can think of to try:
If you are restoring to a newer version of SQL then your statistics are being updated when you restore. Have the customer run UPDATE STATISTICS on the tables that are being hit.
Take a look at the server specs, and task manager -> Resource Monitor see if anything jumps out at you.
It may be something environmental on their network. Check the network throughput between the client and server.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
Closed 9 years ago.
Improve this question
I wrote a small program for downloading files for my client.
The program uses HttpWebRequest to send a POST request and a GET request.
I tested the program on my laptop and on my manager's desktop and it worked well.
However, when I deployed the program to my client's desktop, it gave me this error:
"System.Net.WebException: The Operation has timed out."
What might be the possible reasons for this?
The deployment was very simple, I just changed the App.config to set the target folder's path.
My client's desktop is a server. Is it possible that firewall blocked my request?
But I was able to accomplish the downloading process through browser on my client's desktop.
Please give me some suggestions if you have related experience.
Thanks
Firewall, Antivirus and insufficient timeout are very possible reasons (in my experience).
Probably the windows firewall is blocking your application from connecting to the server. Try to add an exception for your app by running wf.msc. You will need to add an outbound rule.
In order to test quickly whether this is the real reason for your problem, you can try to disable the firewall completely for a short time if it isn't a big security risk.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions concerning problems with code you've written must describe the specific problem — and include valid code to reproduce it — in the question itself. See SSCCE.org for guidance.
Closed 9 years ago.
Improve this question
I am a web service applications beginner.
I wrote a web service application and a simple web client application in order to test the service.
It works fine, but i found out that even when the service application (that runs another application) is off, i can get the result at the client side.
Is it ok? If not, what could be the problem?
I can only think of two possible explanations -
Either pages are cached somewhere (client, proxy servers, web servers) or the client does find a server (as in - it isn't off, or it doesn't go to the server you think it is)
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
Closed 8 years ago.
Improve this question
I am trying to test a web service for a web app. written in asp.net c#, WCF
i am facing this exception:
The HTTP request to 'http://localhost:36162/Services/Service1.svc' has exceeded the allotted timeout. The time allotted to this operation may have been a portion of a longer timeout.
I'm looking at how to resolve this. It's now taking more than 10 minutes.
Debug the service by putting a breakpoint in the service and verify its returning data in a timely fashion from a call from the client.
If it is returning data in a timely fashion you have a configuration problem with the client (maybe the buffer overflow then set size).
Or use Fiddler to look at the traffic to see if data is returning in a timely fashion.
Regardless that will give you an indication of where the problem lies.
EDIT: Also use the WCF test client to remove the caller from the equation. That is a great tool to use.