WatiN Compatibility with Windows - nunit

I am running tests successfully on Windows XP but not even got a single successful build while running through Windows 2003.
Any one knows whether it is compatible or not as I read on some site that WatiN is fully tested on XP and not on other Windows editions.

I'd ordinarily post this as a comment on Sam's answer, but I'm trying to make a stack trace searchable, so here goes...
WatiN.Core.Exceptions.IENotFoundException : Could not find an IE window matching constraint: Timeout while waiting to attach to newly created instance of IE.. Search expired after '30' seconds.
at WatiN.Core.IE.CreateIEPartiallyInitializedInNewProcess()
at WatiN.Core.IE.CreateNewIEAndGoToUri(Uri uri, IDialogHandler logonDialogHandler, Boolean createInNewProcess)
at WatiN.Core.IE..ctor(String url, Boolean createInNewProcess)
c:\...\WithVendorSite.cs(42,0): at WithVendorSite.VerifyCanLogIn(TargetSite target)
I developed my test on Windows 7 against WatiN 2.0.10.928 but the test was continually getting stuck with a blank browser with about:blank in the address bar when run on Windows Server 2008 with latest WUs, and Enhanced Security Configuration turned off and running the tests elevated (Run as Administrator).
The problem in my case (thanks Sam) was the absence of Microsoft.mshtml.dll in the bin directory (I had figured out Interop.shdocvw.dll was necessary from error messages I'd encountered on the Windows 7 side).
After adding Microsoft.mshtml.dll, things run happily with ESC turned back [but the test process needs to run elevated].

I run our WatiN integration test suite (hundreds of tests) on Windows 2003 with IE6. Works fine, no special tricks done. What is the exception you are getting? Are you sure mshtml.dll (the COM dll somewhere in the windows directory) is registered correctly on this machine? Do you have the Microsoft.mshtml.dll (interop assembly) and interop.shdocvw.dll in the same directory as WatiN.Core.dll?

Update: Its officially supported, from the faq
Which windows versions are supported?
Windows 2000, Windows XP, Windows 2003
and Windows 2008.
Original post:
I use it on vista all the time. I haven't used it on windows server 2003 though.

Have you tried logging on interactively into the server and trying to run the tests manually? It may be because of the account that your build server is running under or some particular security settings you have setup. Have you checked to see if IE is stopping you from viewing the page due to it not being in the trusted sites list?

I was using Watin 1.3 on Windows XP but the same on Win 7 having problem....
Officially Watin 1.3 works on O.S. Xp and earlier on Win XP
But Watin 2.1 works fine on Win 7 and XP.
Officially Watin 2.1 supports any Microsoft O.S.

Related

PowerShell 3.0 Installation Error on Windows 7 SP1

I have been trying for a couple days to get Windows Management Framework 3.0 to install on my Windows 7 Enterprise, SP1 desktop machine. The installation seems to go fine, and at the end it requests a reboot as it should. After the reboot, it says installation has failed and rolls everything back out.
In the System Setup Logs it shows the following error:
Package KB2506143 failed to be changed to the Installed state. Status: 0x80070005.
I definitely meet the pre-requisites. I have uninstalled .NET 4.5 and 4.0 and re-installed both, with reboots in between. It always comes back with that same error.
Any ideas?
Make sure you run the installation as Administrator. It's not sufficient to be logged on with an account that has local admin privileges; you need to select Run as administrator from the context menu, or run it from an elevated command prompt. I ran into that error the first time I tried to install Management Framework 3.0 by just double-clicking the downloaded .exe file. It worked when I launched it from an elevated prompt (Run as administrator would have the same effect).
For me the problem was the .Net Framework WoW64 features were missing. More specifically mscoree.dll couldn't be found. Installing the NetFx2-ServerCore-WoW64 & NetFx3-ServerCore-WoW64 features fixed the problem for me.
http://josheinstein.com/blog/2011/09/solved-this-program-cant-start-because-mscoree-dll-is-missing-from-your-computer/

Lightswitch Desktop Application Wont Run in XP SP3

I have developed an application in Lightswitch 2012, and now need to deploy it to a desktop PC running XP SP3.
I have already looked at two previous posts Can't run Lightswitch 2012 Programm under Windows XP and
Lightswitch Desktop Application Wont Install in XP SP3
The two posts both refer to executing [editbin vslshost.exe /SUBSYSTEM:WINDOWS,5.01 /OSVERSION:5.1] to modify the vslshost.exe file, though only the first post says it worked.
In my case, I have tried the above to update the vslshost.exe file, but when I publish my LS2012 project it reverts back to the default vslshost.exe file. And if I manually swap the file with the copy I modified, when I run the deployed app I get the following error:
System.Deployment.Application.InvalidDeploymentException (HashValidation)
- File, vslshost.exe, has a different computed hash than specified in manifest.
- Source: System.Deployment
So, the questions are
am I doing something wrong?
is there a master copy of vslshost.exe I need to update instead?
(BTW, I also ran the VS2012 (KB270250 from VS2012 Update 1 CTP 4))
Thanks for your help
As this is an internal company app, I have just convinced our IT guy to upgrade the machine, because the certain grief of trying the different possible solutions was just too much.
BUT if you MUST deploy to XP
To find out more, here are two pretty exhaustive posts with input directly from the Lightswitch team:
Progress on LS2012 desktop apps installing AND running on XP yet?
Windows XP 32 bit deployment
Enjoy....(???)

My app created on XP does not run on Windows 7

I am trying to run an app I created at work (I sent myself the .exe file) so that I could see how it looks on Windows 7.
My laptop (running 64-bit Windows 7) won't even open it, though. It opens some compatibility wizard to try to rectify whatever the problem is, but that doesn't work either.
Is there anything I need besides the .exe itself, that I should have copied over?
A team member using Windows 7 can run it (by checking it out of Subversion and running it in the VS IDE, anyway), but the display if "off" (The FlowLayoutPanel's controls are experiencing a kind of "wardrobe malfunction"). But I, as mentioned, can't even run it.
What might be the problem/solution?
If you are running the Professional edition of Windows 7 or higher then it will include the option to install the "Windows XP Virtual Machine". You can then run your app as normal under the virtual machine, quckest and easiest way to resolve these sort of issues in Windows 7.

how to run iis 7 express in windows xp in unattended mode

IIS 5.1 shipped with windows xp has 10 connection limit. Singll ASP .NET MVC application can use more connections even if HTTP 1.1 is disabled.
To fix this, Microsoft recommends to use IIS 7 Express in XP.
I tried
iisexpress /path:c:\myapp /port:80 /clr:v2.0
and it works in local computer.
This XP computer has number of users. User can log off antytime.
How to run iisexpress automatically if computer is turned on ? I googled but havent found a way like to run it as XP service ?
How to run IIS Express as a process started via a Windows Service describes how to run it from application. However I'm looking a way to use Windows XP as http server without application. Maybe srvany can help ?

Crystal Reports error when deployed..Could not load file or assembly 'log4net

Please help. I have a web application that was built in VS2010 and we are using the CR plugin for 2010 and everything works perfect on our local machines. When we go to deploy the web application to Server 2008 the application runs fine until we try to get to a report. When we get to a report we receive...
Could not load file or assembly 'log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=692fbea5521e1304' or one of its dependencies. The system cannot find the file specified.
We have installed the CR2010 runtimes and the file log4net.dll version 1.2.10.0 is in the GAC so we are not referencing it in the application. When we add it as a reference we get this error no matter where we are in the application, not just on the report pages. Please help!
I received the same error message after accidently installing the x86 version of the crystal reports redist on a x64 machine.
Installing the correct x64 redist fixed the problem - http://downloads.businessobjects.com/akdlm/cr4vs2010/CRforVS_redist_install_64bit_13_0.zip
We just ran into the same problem and it turned out to not (in our case) be the version of the Crystal Reports redist (we installed the 32 bit versions on our 64 bit machines. The way we were able to fix the problem was to
Navigate to your virtual directory Application Pool -> Advanced Settings -> Set Enable 32-Bit Applications to True
and changed the managed pipeline mode from Classic to Integrated. After that we no longer got errors of the missing log4net dll.
We also had the same issue with the 64-bit redistributable installed. In our case, we set the "Enable 32 Bit Applications" setting to FALSE in the advanced Application Pool properties and that resolved the issue.
If you have a x86 development machine and your web server is a 64-bit machine, you may be running into the problem discussed here:
http://social.msdn.microsoft.com/Forums/en-US/vscrystalreports/thread/546059a6-7179-4027-8f16-822ac6dc189a/
Visual Studio is automatically deploying a 32-bit log4net.dll into the 64-bit web server, even if you don't have it referenced in your project. Just delete the log4net.dll from your bin directory once deployment has finished because it's not actually required by the CR runtime to work.
For me I had a VB Application project and under Compile options, I had "Any CPU" selected for Target CPU and I also had the "Prefer 32-bit" checked. When the compiled app ran on a 64 bit machine, which only had the x64 runtime installed it could crash with this error, because it tried running as a 32 bit app and wanted the 32 bit runtime. Unchecking this option and recompiling made it work correctly.
Install Crystal Reports for Visual studio Runtime engine for .NET Framework 64 bit
Solved my problems.
I have 2 NLB 2008 R2 Servers, my IISs are configured to run in x32.
In one server I have installed x64 and x32 SAP redist and I have the error, in second server only the x32 and works.
To get the first server work I uninstalled all versions and reinstalled only x32, but the server start work only after a reboot.
Bye
In my case I had the error while developing with Visual Studio 2022. I did what the other answers here say, installed Runtime 64-bit, because my machine is 64 bit, and then:
(in Visual Studio) Project Debug Properties > Web > Servers > Change Bitness to x64 (using IIS Express)