I'm trying to run some service and I'm getting this message
Method not found: 'Void System.GC.Collect(Int32,
System.GCCollectionMode)'
I suspect the server because this service runs on other servers.
I really want to know what the source of this problem because I came across this problem on other servers.
I try to take of code from my service and finally I realized that even I run a console application with only one static main and call the GC I get this error,
I'm using Windows Server 2003 with Framework 2.0 and 3.5
When you create your console application make sure your target framework is not set to Client Profile FrameWork 3.5.
The above setting is in Application tab of your project properties
If you want to use GCCollectionMode and Framework 2.0 you will have to install .NET 2.0 Service Pack 1
Related
I have attempting to upgrade a web application that uses .NET Framework 4.5 to 4.8.
The application runs on a server that both compiles and runs the application, so I installed the .NET Framework 4.8 Developer Pack. I restarted the server and it has booted up successfully.
TeamCity successfully built and compiled the application and Octopus successfully deployed as per usual. However, when I now attempt to access the website, I get a 404 at the login page.
Looking at the folder structure, the file is definitely there. The code builds and runs successfully on my local machine, allowing me to login and perform any function on the system.
Is there something that I have missed running or doing on the server to get this to work?
Edit: Request for IIS Configuration
The configuration of this hasn't changed since I've upgrade the .NET Framework but here is what I have. If this isn't the configuration that is being asked about, please let me know.
Bindings
Everything else has been left as the default values.
I have created a DLL [made available as a NuGet package (.NetStandard 2.0/2.1)].
When a particular class in this DLL is instantiated, we fire an synchronous GET call to a .Net Core WebAPI installed on IIS on my local machine (localhost) to load some configuration data.
This DLL makes use of a singleton HttpClient (we've following Microsoft's 'best practices' here)
Factory.SingletonHttpClient().GetAsync(args.Uri).GetAwaiter().GetResult();
I've consumed this NuGet package in a whole series of applications, all built using .Net Framework 4.7.2 and they work just fine - the data is successfully retrieved from the WebAPI.
However....I have one particular application (again, 4.7.2) where the GET consistently fails with the error message:
System.Net.Sockets.SocketException HResult=0x80004005 Message=An
existing connection was forcibly closed by the remote host
This exception was originally thrown at this call stack:
System.Net.Sockets.Socket.BeginReceive(byte[], int, int, System.Net.Sockets.SocketFlags, System.AsyncCallback, object)
So this has to be something specific to my application that consumes this NuGet package since it works for all other consuming applications. However, I can't see how to figure out what the problem might be.
So I found the answer, but I'm confused by it.
I'm using the latest version of Windows 10 (version 1909).
All my applications are using .Net 4.7.2
So when I debug all these .NET 4.7.2 applications on my machine, they all make the call to the WebAPI on my IIS LocalHost, except this one application.
When I look at the ServicePointManager.SecurityProtocol in this failing application, I see it's running with the obsolete values of SSL and TLS. Why would this be the case for this application but not the others? It's not stipulated anywhere to use these obsolete protocols, so why is this using them but not the other applications?
I fixed this by amending my NuGet DLL to add TLS1.2 to whatever TLS versions are being used:
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12 | ServicePointManager.SecurityProtocol;
I am trying to deploy an application created using Breezejs and EntityFramework using the Breeze WebAPI. When I run it in my development environment it runs perfectly, but the minute I upload it to our server I get the following error "Error: Metadata query failed for: ../api/Entity/Metadata; Not Found" when I try and make a call.
In my development environment if I go to "localhost:59510/api/Entity/Metadata" I can see the xml displayed, but if I go to "www.example.com/api/Entity/Metadata" I get the error.
Am I missing a dll somewhere? Is it an error with my configuration in breezejs, web api's or with EntityFramework?
Thanks
Jeff
Sounds like you are missing something. Check the event viewer on the deployment machine. Could also be missing the breeze controller dlls
Using Websitepanel ver1.1 on my hosting provider and trying to adjust a website (ASP.NET MVC2) to run under .NET 4 integrated pipeline mode.
Every time i apply this setting i get the following error (to be correct: it doesn't matter if i choose 4.0 or 4.0 integrated pipeline):
System.Web.Services.Protocols.SoapException:
Server was unable to process request.
---> Error executing 'UPDATE' task on 'my_website.com' WEB_SITE
---> Server was unable to process request.
---> Object reference not set to an instance of an object.
at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
at WebsitePanel.EnterpriseServer.esWebServers.UpdateWebSite(WebSite site)
at WebsitePanel.Portal.WebSitesEditSite.SaveWebSite()
Is there something I can do about this? Is there something I'm doing wrong? Setting back to .NET 2.0 or 2.0 pipeline works like a charm!
If you are having a VPS, log into the server Try changing the application pool to 4.0 classic instead of 4.0 integrated from IIS manager >> sites >> basic settings. Also make sure that MVC2 is compatible with asp.net 4.
You can edit the corresponding web.config page to change the asp version by changing the corresponding version line to 4 instead of 2.
Please let us know by changing the application pool to 4.0 classic. If you are not having administrator password, Ask your hosting provider support to do this.
Also ask them to check the event viewer logs to know further about the issue.
The main problem is Websitepanel version 1.1
To solve this error, you need to request your hosting provider to upgrade the websitepanel version to 2.0
.NET 4.0 provides better support for aplications, also .NET 2.0 has been deprecated by several web hosting providers.
We developed an web application using visual studio 2008. In my development PC, the application is working fine. In production server I am getting the following exception "ASP.NET AJAX CLIENT FRAMEWORK FAILED TO LOAD". What should I do to make it work?
Thanks,
P.Gopalakrishnan.
I'd start with making sure all of the appropriate service packs are applied and that the 3.5 framework is actually installed on the box.
Also, make sure any assembly you reference that isn't part of your deployment is gac'd on the machine. Check version numbers.
All else being equal, I'd guess the server is just way out of date on it's updates.