I have a session variable that is set to 60 days.
But it is dropping each day.
What I have been using for code has been working for years. I have moved to a new virtual server. And my CF Administrator settings seem to all be the same. Could it be a Windows Server 2016 issue? Using ColdFusion 2016 and Windows Server 2016.
As related this code has worked forever. Still works in older server. But now on new virtual server it will not work. Thoughts?
At the login page. After successful login.
<cfset session.allowin = "True">
<cfset session.user_id = log.uid>
On the Application.cfm page.
<cfapplication name="MyApp" clientmanagement="Yes"
sessionmanagement="Yes"
sessiontimeout="#CreateTimeSpan(61,0,0,0)#"
applicationtimeout="#CreateTimeSpan(61,0,0,0)#">
This was my bad. I had cloned a Virtual Server that rebooted every day at 2am.
So that reboot would clear all the session variable.
This is resolved now.
Thank you all for posting this and that, it led to good server setup reviews.
Related
The following code runs just fine on my development workstation (Windows 10 Pro), running in Visual Studio. As you can probably guess from the naming convention, I am using WebClient to post to a remote https:// endpoint.
ServicePointManager.Expect100Continue = true;
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
resp = m_WebClient.UploadValues(m_WebClient.BaseAddress, "POST", postParams);
However, when I deploy it to my production server (Windows Server 2012 R2 Datacenter - it's an Azure VM), I am trapping the following exception:
The request was aborted: Could not create SSL/TLS secure channel.
at System.Net.WebClient.UploadValues(Uri address, String method, NameValueCollection data)
at System.Net.WebClient.UploadValues(String address, String method, NameValueCollection data)
at rater8.ReviewShake.Request.Processor.TryGetRESTApi(Int32 CompanyId, String ScrapeString, String LastJobId, String& Response)
I know that I am capable of communicating from my production server to the remote server because I've executed the call in Postman from the production server. I receive a 200 - OK. I know the remote server insists on TLS1.2, because if I disable that protocol in Postman, the call fails.
This is production code which has been running until just a couple of days ago. I will contact the vendor, but support can be spotty. In the meantime, does anyone have any ideas? Is there something which I need to configure at the OS level in order to enable this on Windows Server 2012? (I do have Windows Update running.) Thanks!
Since posting, I've accumulated two additional facts:
Switching over to HttpWebRequest did not have any positive effect.
Moving the executable over to another Windows 10 Pro machine did have a positive effect, the connection was successfully established.
So the critical combination of factors here which cause this to break is the combination of Windows Server 2012 R2 and my C# code (WebClient or HttpWebRequest). Recall that Postman was able to establish communication from the Windows Server so that, in and of itself is not the issue. Must be some esoteric handshake issue, but I'm running out of ideas. Thanks for any advice which you can provide!
Currently dealing with the same thing. We were running a web api call on a 2012 R2 server, it was working but all of a sudden, it stopped working around the time of your post.
I would assume that this is a bug with Microsoft, however here are the current solutions that I am testing that make sense.
Try another server install version, we noticed it was working with a 2016 server
I've noticed that this issue generally came to fruition when microsoft released a new VS 2019 Update, maybe try another editor or downgrade your vs2019 ide?
Maybe try downgrading your .NET framework version to something a bit more stable.
These are things I am currently testing, but the most definite one that is working is getting an install of 2016 server or 2019. Spinning up a new server install for short term period until the issue is fixed, might just be up your alley.
Edit:
At this time, the move to a updated server seems to have fixed the issue.
I'm currently trying to access a remote server using VS Code's Remote SSH extension. I haven't had a problem when using it before (that was around a month ago) but today when I tried to access the server I ran into some trouble.
I have the hostname and everything configured in a config file, and so I just click on that option and type in the password. However, VS Code seems to be stuck on "Opening Remote..." for the past hour or so. The dialogue I get in the terminal is as follows:
username#host's password:
Running remote connection script
Acquiring lock on /home/username/.vscode-server/bin/abcdefghijklmnop1234567989/
vscode-remote-lock.abcdefghijklmnop1234567989
Installing to /home/username/.vscode-server/bin/abcdefghijklmnop1234567989...
Downloading with wget
Does anybody know what the problem might be? Is this normal?
EDIT
As soon as I posted this the connection was successfully made. However, I would also like to still know what the problem was and if it normally takes around an hour, and what this process might be doing. I also believe it would be helpful to the community overall.
Thank you.
I've faced the same issue just now and realized that firewall protection has something to do with it.
As soon as I disabled it, the remote connection was established and I managed to see my code again.
I have a BizTalk 2013r2 Standard Edition application server with CU7 installed. The BizTalk databases are hosted on a separate Sql Server 2014 server. This setup has been working fine for many months - until today! A colleague used the BizTalk admin console to make a change to the address BizTalk uses to the reach the SMTP server, by selecting Platform Settings\Adapters\SMTP\\properties.
After making this change, on attempting to refresh the BizTalk Admin Console, the following error is displayed:
From what I've googled, it seems this may be due to some corruption in the SSO database. I have a backup of the SSO database, and a backup of the SSO key along with the password. Before restoring the backup of the SSO database, I wanted to check that I would be able to restore the key, so I ran ssoconfig -restoreSecret from the command line. I was prompted to enter the password. If I intentionally enter the wrong password then it tells me the password is incorrect. However, if I enter the correct password then it displays the message "BAD DATA".
Although the BizTalk admin console is currently unusable, thankfully the BizTalk host instance continue to run and messages are being processed as expected.
Can anyone please suggest why I'm getting the "BAD DATA" message, or perhaps a work-around in order to solve the problem?
I had this problem again and blogged about it at BizTalk WinMgt error solution. As Colin says the hard part is identifying the corrupt handler. It is probably the SMTP send handler but you should check this using WBEMTEST first. I found this link helpful on using WBEMTest. The parameter is incorrect (WinMgt)" error when refreshing the BizTalk Group in BizTalk Administration Console
In my case a quick fix to bring the BizTalk Administration Console back to life was to hack the database. N.B. This probably won't be supported by MS. In my case it was the FTP send handler that screwed up. So I ran
USE [BizTalkMgmtDb]
GO
DECLARE #return_value int
EXEC #return_value = [dbo].[adm_SendHandler2_Delete]
#AdapterName = N'FTP',
#HostName = N'Sending32'
SELECT 'Return Value' = #return_value
GO
At this point the BizTalk Administration console came back to life. In my case it worked because I was creating a new handler but in your case you just edited it. It will take all your SMTP handling out.
I then fixed the corruption using the BizTalk Administration console.
In my case I had to set every FTP receive and send adapter temporarily to a FILE adapter.
I then deleted the FTP adapter and then re-added it. Finally I reset the all the change receive and send location from FILE back to FTP.
This was all very scary on a live system.
Finally I believe that this is bug in BizTalk 2013 R2 because I've seen it happen on 2 systems and now I have heard that the same thing happened to you.
The WinMgt error happens when one of the Adapters setting has gotten itself corrupted. See WinMgt error when refreshing Group Hub
Removing and re-adding the adapter to the host usually fixes it. The trick of course is identifying which Adapter / Host, I would start with the SMTP adapter in your case.
I have an application that I run in Visual Studio 2013 under IIS Express server. The problem is that session data is not kept between pages and I find with null objects that weren't null the page before. If I compile the application and deploy it on a web server with IIS it works normally, so it must be something with IIS Express. I searched the config files in the document folders, but really don't know what it is.
Thanks,
Luke
Edit 25/11: I'm debugging the code on the same machine witn VS 2013 and VS 2010 and I found where the code behaves differently. After the code behind has been executed and the page has been built, in VS 2010 the execution ends. In VS 2013 after the page has been built I get another call to the method context_BeginRequest(object sender, EventArgs e), which redirects the application to the starting page, where the instruction Session.Clear() clears the session. The problem now is: why is there this additional call to context_BeginRequest method? Why does it redirect to the starting page and not to the page it is currently in? Thanks, Luke.
I was having a similar problem. My code was running fine on a production server, but when I debugged it on my test machine, the session would be null between saving and redirects.
When I set the session state to cookieless, <sessionState cookieless="true", the session variable would be retained. This was undesireable though because it adds the session name to the url.
Upon further review, I noticed a line in my system.web <httpCookies requireSSL="true" /> When I commented it out, everything worked as usual.
The problem was that my production IIS server was hosting the code using https://, while my test IIS Express server was only using http. So my unsecure cookies were getting discarded.
This morning my Production server (Windows 2008 R2) went offline for 10 mins and also RDP connection was lost for the given duration. During this period the IIS 7 hosted production web site also stopped responding.
Luckily though, after the 10 mins the server was up by its own and RDP session was restored to previous state.
Now the question is how do I find out what went wrong in the server and is there any logs which I can go through verify my findings.
If you goto the run prompt and type eventvwr it will open Event Viewer. From within here expand the Windows Logs tree and look through the System logs. Something will have caused the reboot and you should be able to find it through here.
A good old chesnut is Windows Updates. They aren't on auto install and reboot are they? :]