WCF services stop working in IIS6 - wcf

I have a Windows 2003 SP2 server, and I have an ASP.NET web application published on it's IIS6.
That web application consumes a bunch of WCF services published in the same server.
The application is running OK, but a couple of times in the day I have to use the "iisreset /restart" command because the app stops working, and the users get this message:
El cliente encontró el tipo de contenido de respuesta '', pero se esperaba 'text/xml'.
Error de la solicitud con una respuesta vacía.
I've detected that the services are failing, but when I restart the service they work again.
I am looking at the event viewer and I get an error:
System.ServiceModel.ServiceHostingEnvironment+HostingManager/39277698
Exception: System.ServiceModel.ServiceActivationException: El servicio >'/saceserv/GuiaMadreService/GuiaMadre.svc' no se puede activar debido a una excepción >producida durante la compilación. El mensaje de excepción es: No se puede encontrar el >punto de entrada denominado 'FreeCredentialsHandle' en el archivo DLL 'security.Dll'.. ---> System.EntryPointNotFoundException: No se puede encontrar el punto de entrada denominado >'FreeCredentialsHandle' en el archivo DLL 'security.Dll'.
I hope you can help me with this issue.
Thanks in advance!

You must close 'WCF ServiceClients', with Close() method.

Related

Firefox File upload through Selenium scripts "Unable to determine type from: H. Last 1 characters read: H"

While trying to upload file in selenium scripts am getting the error "Unable to determine type from: H. Last 1 characters read: H" on execution through Firefox. But in chrome it works fine.
Hence i tried with Robo class
StringSelection stringSelection = new StringSelection(filePath);
Toolkit.getDefaultToolkit().getSystemClipboard().setContents(stringSelection, null);
Robot robot = new Robot();
robot.keyPress(KeyEvent.VK_CONTROL);
robot.keyPress(KeyEvent.VK_V);
robot.keyRelease(KeyEvent.VK_V);
waitABit(4000);
robot.keyRelease(KeyEvent.VK_CONTROL);
robot.keyPress(KeyEvent.VK_ENTER);
robot.keyRelease(KeyEvent.VK_ENTER);
waitABit(6000);
This is not supporting on execution through Browser Stack.
Can anyone help on providing a sample code that support file upload in all browsers and all platforms?

Appium Unknown server-side error occurred - did not start application

I am trying to test a mobile app in appium but its throwing the following error
org.openqa.selenium.WebDriverException: An unknown server-side error occurred while processing the command.
Original error: Cannot start the 'com.example.abc' application.
Original error: 'com.example.abc.ui.splash.SplashActivity' or 'com.example.abc.ui.splash.SplashActivity' never started.
Visit https://github.com/appium/appium/blob/master/docs/en/writing-running-appium/android/activity-startup.md for troubleshooting
(WARNING: The server did not provide any stacktrace information)
Follwing are my capabilities setup
#Before
public void setUp() {
File f = new File( "src" );
//App Name
File fs = new File( f, "app-sandbox-debug.apk" );
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability( "deviceName", "Samsung SM-A305F/DS Android 10, API 29" );
capabilities.setCapability( "platformName", "Android" );
capabilities.setCapability( CapabilityType.BROWSER_NAME, "Android" );
capabilities.setCapability("normalizeTagNames","true");
capabilities.setCapability( MobileCapabilityType.APP, fs.getAbsolutePath() );
try {
driver = new AndroidDriver<MobileElement>( new URL( "http://127.0.0.1:4723/wd/hub" ), capabilities );
driver.manage().timeouts().implicitlyWait( 1000, TimeUnit.SECONDS );
System.out.println("Application running");
} catch (MalformedURLException e) {
e.printStackTrace();
}
}
I am unable to find the error cause nor unable to find what's missing at my end.
You can use adb shell dumpsys window windows command to see the launch activity
Launch the app on the device
connect the device to PC/Laptop with adb enabled
In terminal enter the following command adb shell "dumpsys window windows | grep -E 'mCurrentFocus|mFocusedApp'"
Use the correct activity which can be launched properly

Microsoft Edge V18363 freezes immediately after opening in a C# Selenium project

I am trying to run MS Edge using the Microsoft webdriver with Selenium. The browser starts and get stuck before opening the URL.
I have created a C# MSTest Project and added Selenium.Microsoft.Webdriver.
Afterwards, I installed Selenium.WebDriver.MicrosoftDriver.
When I now run the test, Edge starts and get stuck immediately.
The error is:
An exception with a null response was thrown sending an HTTP request to the remote WebDriver server for URL http://localhost:49681/session. The status of the exception was ReceiveFailure, and the message was: Die zugrunde liegende Verbindung wurde geschlossen: Unbekannter Fehler beim Empfangen.
I also tried using Selenium.Microsoft.Webdriver2 and installing the Microsoft driver using DISM.exe /Online /Add-Capability /CapabilityName:Microsoft.WebDriver~~~~0.0.1.0
Windows 10 and Edge are v18363. The zoom is at 100%
Have you installed the Microsoft WebDriver in an elevated command prompt? You should run the cmd as Administrator when you using DISM.exe /Online /Add-Capability /CapabilityName:Microsoft.WebDriver~~~~0.0.1.0.
Besides I installed the following NuGet Packages in my project:
Then run the following code to start a test:
using OpenQA.Selenium;
using OpenQA.Selenium.Edge;
namespace ecwebdriver
{
public class webdriver
{
static void Main(string[] args)
{
var driver = new EdgeDriver();
driver.Navigate().GoToUrl("https://www.bing.com/");
var element = driver.FindElementById("sb_form_q");
element.SendKeys("webdriver");
element.SendKeys(Keys.Enter);
System.Threading.Thread.Sleep(5000);
driver.Quit();
}
}
}

Unable to do file upload functionality in Jenkins using Robot & AutoIT scripts

Here it is the AutoIT script
ControlFocus("File Upload","","Edit1")
ControlSetText("File Upload","","Edit1", "file path")
ControlClick("File Upload","","Button1")
And Robot script is:
StringSelection stringSelection = new StringSelection(string);
Toolkit.getDefaultToolkit().getSystemClipboard().setContents(stringSelection, null);
Robot robot = new Robot();
robot.keyPress(KeyEvent.VK_CONTROL);
robot.keyPress(KeyEvent.VK_V);
robot.keyRelease(KeyEvent.VK_V);
robot.keyRelease(KeyEvent.VK_CONTROL);
robot.keyPress(KeyEvent.VK_ENTER);
robot.keyRelease(KeyEvent.VK_ENTER);
I just tried with the above scripts in jenkins execution but it is not working.
Can anyone please suggest me with the proper execution script.
If your using Selenium as you've tagged the question, the proper way to upload a file is using sendKeys, here's an example:
string File = "SomeTextFile.txt";
string FilePath = #"C:\Whatever\" + File;
driver.get("http://the-internet.herokuapp.com/upload");
driver.findElement(By.id("file-upload")).sendKeys(FilePath);
driver.findElement(By.id("file-submit")).click();
Your script for Jenkins could be failing for multiple reasons you have to watch it when it happens. Could be your clicking a wrong button, or you don't have an active desktop in your slave etc...

I cannot create a new SHDocVw.InternetExplorer

Consider the following peice of code :
If (ias.WebBrowser Is Nothing) Then
ias.WebBrowser = New SHDocVw.InternetExplorer
End If
waitTing(1)
It produces the following error :
"Retrieving the COM class factory for component with CLSID
{0002DF01-0000-0000-C000-000000000046} failed due to the following
error: 80080005 Server execution failed (Exception from HRESULT:
0x80080005 (CO_E_SERVER_EXEC_FAILURE))." String
Where is the problem?
Interesting: I can't open internet explorer at all. How do I reinstall it?