Copy messages in messagequeues from Windows Server 2003 to Windows Server 2012 - .net-4.5

We are migrating from Windows Server 2003 to Windows Server 2012. There are messages in private messagequeues on Windows Server 2003 that we need to move to Windows Server 2012. It's a one-time task.
The following 3 steps corrupted messagequeues on server 2012, and I had to uninstall and reinstall Message Queuing on Server 2012.
mqbkup -b c:\msmq_backup -y (on 2003)
Copy c:\msmq_backup from 2003 to 2012.
mqbkup -r c:\msmq_backup -y (on 2012)
http://technet.microsoft.com/en-us/library/cc773213%28v=ws.10%29.aspx
http://technet.microsoft.com/en-us/library/hh875586.aspx
I access these messagequeues and messages from .NET console and ASP.NET applications using System.Messaging Namespace.
http://msdn.microsoft.com/en-us/library/system.messaging%28v=vs.110%29.aspx
Any ideas would be appreciated. Thank you.

MQBKUP is not for moving to upgraded systems as it restores the old MSMQ configuration which, as you've found, won't necessarily be compatible.
If the computername is the same, you could try straight copying the LQS and Storage folders. On startup, MSMQ checks the address in the messages. If the address matches the local computername, the message will be loaded, otherwise discarded.
Of course, this assumes the MQ file format is the same in 2012 and, unfortunately, I haven't had a chance to look.

Related

Getting "Could not create SSL/TLS secure channel." on Windows Server 2012 R2

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.

Will a PowerShell script developed for a Windows 7 run on Win Server 2008 R2?

I have developed a large PowerShell script that has been refined on a Windows 7 64bit box and now I intend to run it on a Windows server 2008 r2. Assuming the PowerShell versions are the same, will there be any major issues with syntax in-between Win 7 and WS 2008 R2?
The script checks a lot of WMI and registry keys like GWmi Win32_NetworkLoginProfile and Get-Itemproperty -Path Registry::HKLM\Software\Microsoft\"Windows NT"\CurrentVersion\winlogon\
Most PowerShell information is driven towards managing servers so I assume I will be safe, but I want to see if you all can help me learn some lessons before I start banging my head against the wall.
Thanks
There are no syntax differences between PowerShell on Windows 7 and PowerShell on Windows Server 2008 R2. You may encounter differences in existing services, WMI classes, and registry keys, though.
First you should test it on a virtual machine to see if it works or not. Then try it on the physical machine. If it doesn't work, modify the code to the specific registry keys.
The short answer is yes. I run PSv4 on both my desktop and one of my servers running 08. Be sure to import the correct modules (if any) and allow for RPC in your firewall (And winrm) if applicable. One note- depending on what you run with the server, commands and functions are only as good as the version you run against (even when invoked). I ran into this problem as I scripted in v4 and environmentally my firm is almost all v2. Enabled -verbose error output and test in virtual machines or a loner laptop. (This is what I did). Good luck!

Nservice bus installation on Winserver 2012

I am trying to install nservice bus on a fresh win server 2012 box and things are not working properly. Any help is appreciated..
I get setup failed prematurely and when I dumped into log file.. this is the error I get..
Calling custom action NServiceBus.Wix.CustomActions!NServiceBus.Wix.CustomActions.CustomActions.InstallMsmq
Installing/Starting MSMQ if necessary.
CustomAction InstallMsmqAction returned actual error code 1603 (note this may not be 100% accurate if translation happened inside sandbox)
Action ended 16:36:36: InstallFinalize. Return value 3.
Action 16:36:36: Rollback. Rolling back action:
Do I have to manually add MSMQ features.?
Yes you need to enable the MSMQ features first.
BTW, the MSI is really only to be installed on developers machines, to prepare a machine in production use the powershell cmdlets, see http://docs.particular.net/nservicebus/managing-nservicebus-using-powershell
Is your dev machine a WinServer 2012?

Finding out what went wrong with the Windows 2008 R2 Production server

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? :]

DDE print fails on Windows 2008

I have a Windows Service application (developed in C++) running under Local System account. Operating system is Windows Server 2008 Standard - Service Pack 2 - 32-bit - 4Gb RAM.
Also running Office 2003 with Service Pack 3.
This service takes a RTF file and using DDE prints it with Microsoft Word. However Word fails to perform the print issuing an error (I can see the error if I enable interaction with desktop). The error is
"Run-time error '1001':
There is insufficient memory. Save the document now.
C:...\file.rtf"
A screenshot can be seen here: http://img804.imageshack.us/img804/9550/worderror.png
It used to work on Windows 2003.
Any idea? Suggestions? Could be permission related?
This is actually not supported by Microsoft: http://support.microsoft.com/kb/257757