iFrame related tests failing on azure devops - iframe

I'm running Selenium UI Tests on azure devops build pipeline. the tests have iFrame invocation. They pass locally when running on visual studio but when running in the pipeline, the iframe is not being detected. iFrame not detected and they are failing. can someone please help me?

iFrame related tests failing on azure devops
If you are using hosted agent, there will be many factors that cause this problem, such as network speed, browser version, Selenium Web Drivers version, and some other browser settings, etc.
You could check this agent info from the Microsoft-hosted agents.
To resolve this issue, we need create a self-hosted agent. You could check this document to create your private agent so that you have an agent closer to your local environment:
How to Set Up a Private Agent in Visual Studio Team Services
Hope this helps.

Related

Unable to attach Debugger from VS 2017 to Azure app service for ASP.NET CORE 2.2.1 app

I am new to azure, I have hosted a asp.net core web api in Azure App services. I am able to browse the azure link. However I am getting some internal error while accessing the service.
To find out the error I want to debug the application by attaching to visual studio. But while attaching the debugger I am getting below error as shown in the image.
ERROR POPUP WHILE ATTACHING DEBUGGER
Error: "Unable to find a process called dotnet with arguments .\APICore.dll. The process may still be starting, please try again."
APICore is my Web api project.
I have verified that REMOTE Debugging is enabled.
Application is ASP.NET Core.
Visual Studio is VS 2017 community
edition.
I've had the same problem today, and this is what worked out for me:
1) Instead of attaching the debugger via Server Explorer, go to Debug > Attach to Process...
2) Set the Connection Target to your App Service url without http and with port 4022.
So, http://myappservice.azurewebsites.net would become myappservice.azurewebsites.net:4022
3) Hit the Refresh button. You will be prompted for credentials to access your App Service. Those can be found on the MSDeploy publish profile of your publish profile file:
<publishData>
<publishProfile profileName="myappservice - Web Deploy" publishMethod="MSDeploy"
publishUrl="myappservice.azurewebsites.net:443"
userName="{USERNAME}" userPWD="{PASSWORD}" ...>
<databases />
</publishProfile>
<publishProfile profileName="myappservice - FTP" publishMethod="FTP" ...>
<databases />
</publishProfile>
</publishData>
4) After the available process show up, select w3wp.exe and hit Attach
Had the exact same issue, tried several things (open in Admin mode, open outbound port 4022, 'Attach debugger', 'Attach to process') but nothing worked.
Just switched from VS 2017 Community edition to Visual Studio 2019 - Enterprise edition and now it instantly works flawless:
Published my Azure App Service in Debug configuration
Attach debugger via the Cloud Explorer
Set the breakpoints and hit them when sending requests to the API
So perhaps switching to 2019 will solve it for you as well.
There are few options that you can try out and see if that helps.
Ensure Visual Studio is opened in Administrator Mode and follow the
same steps.
Open the Outbound ports 4022 for VS 2017 on corporate firewall.
You can also go through the below links in order to Remote debug the
application
https://learn.microsoft.com/en-us/visualstudio/debugger/remote-debugging-azure?view=vs-2017#remote_debug_azure_app_service
The answer above using a regular
"Attach to Process" using creds from a publish profile downloaded from the portal worked for me.
VS2019 (community and professional, multiple azure accounts, multiple machines, physical and virtual) here, and the cloud explorer "AttachDebugger" never worked. In fact it hung vstudio at "attaching to process" and had to kill VStudio from task manager to stop it.
Strange because at other companies/projects I didn't have this problem. For years I relied on debugging azure from desktop for a variety of projects. This particular software I inherited, and I expect that something in its origination or construction (there are several ..."sub optimal"... aspects to it).

Missing Web Management Service on IIS (WIN8)

I have seen this asked here before, but none of the other posts solved my issue, so here goes nothing.
We are attempting to use Web Deploy on IIS to automatically deploy our application to a test environment. The idea, besides bettering our deployment process, is to allow Jenkins to deploy our application to IIS and run a few automated tests.
For this we are attempting to use MSBuild along with a deployment profile on our web app. The IIS lies on a Win8 virtual machine, where we try to run MSBuild and it fails because the Web Management Service is not up, and it doesn't show anywhere on the IIS management software.
I have the Web Deploy feature installed, as I have seen from Web Platform Installer, but the Web Management Service icon is nowhere to be found. I have found and started the service manually on the Windows Services configuration, but that doesn't seem to have helped either.
A few other observations:
"IIS: Management Services" item doesn't seem to show up on my Web Platform Installer;
I tried changing my installation (under Windows' Add an remove programs) to include web management, id didn't help
I enabled IIS' Web Management on Windows' "Add and remove features" settings. Also nothing shows up on my manager.
My Windows language is set to Portuguese. I may have missed the config due to bad translation, but that's unlikely.
So, how do I get the service to run so I can configure it on my IIS and finally deploy my application?
Client OSs doesn't come with Web Management Service. You cannot set up remote publishing using Web Deploy for a site that is hosted in IIS on Windows 8.0 or 8.1. You need server OS for same.

Deploy to an Azure WebRole without Visual Studio

Is there a way I can deploy my entire website/webapp to an Azure WebRole without the need of Visual Studio?
Context: We have a test environment where there's an IIS hosted web app where our testers test (of course). The thing is, we want to grab that exact tested web app folder and deploy it "as is" to a WebRole.
Please avoid commenting on our procedure, we have been looking at it and we will eventually change it if we have to, I just need a 'simple' yes(how)/no answer.
IIS Web Deploy can be used to package/migrate/restore IIS applications. It can be enabled while deploying a web role as described in this article and allows to update the web role with the application as deployed in your test environment.
Be aware that only single instance cloud services are supported and that in case of a maintenance operation by the fabric controller, your service will be rolled back to the state created by the initial azure package deployment. (There once was a tool for syncing between multi-instance web deployments but sadly that did not work out too well and is no longer supported. Do not attempt to use or rebuild it.)
Installing and Configuring Web Deploy shows the steps to get web deploy for your local testing IIS while articles on using web deploy like this one show examples for calling the tool.
Another option to evaluate are azure websites and git deployment. This could provide you with a documented and reproducible form of deployment that is not prone to unwanted rollbacks while allowing the service to scale to multiple instances. This option might not work out if the application it too tied to the web roles infrastructure or contains code not suitable for the more restricted web sites environment.
A third option to look at is using CSPack as presented in this article. You basically create a service definition and package up the webapp manually without building it in Visual Studio or TFS.
Yes - make sure you have enabled Remote Access on your webrole. Then copy your web app from your local IIS folder to F:\sitesroot\0 (NOTE - may be E:\sitesroot\0 on same web roles).
Yes, you can write a programmatic interface against Web Deploy from your C# code. If you're deploying to Azure Web Sites, you could also use the Windows Azure Management Libraries to spin up new web sites or clouand deploy them.

Windows Azure version backward

Today, I checked my windows azure website (built with a web service) And the version was not the same as yesterday. It's very strange, it seems that ther version went backward.
So I took my project in VS and reuploaded it. Then it was good
I am quite scared, is it a normal behaviour, I think not. But how to stop this behaviour. If I remember well it's not the first time it happens to my project.
Thanks a lot for your help.
Internally if there is any problem within Azure, It is the nature of Azure to Remove the troublesome VMs and Deploy a new VM with the "cspkg" File that we upload during application deployment either through Azure portal or through Visual studio directly.
In case You make any changes through RDP to the deployed application, there is no guarantee that the application will retain the Changes.
Further more if you face this again, it is better to contact Microsoft Support, They should help you out.
Here is the explanation of the Microsoft Support :
Any changes made with Web Deploy are temporary. It can only be used for development and testing and not intended for updating applications in production. When the role instance is restarted, the changes will be gone. We would suggest that you upgrade the deployment by uploading package files from the management portal or disabling WebDeploy while deploying.
You can read more about Web Deploy here http://blogs.msdn.com/b/cloud/archive/2011/04/19/enabling-web-deploy-for-windows-azure-web-roles-with-visual-studio.aspx.

Tool to check if all website pages are working without error in ASP.Net?

Presently i am working on a website it has around 50 pages and links. I need to make sure that all the pages are running fine before deploying to production. Is there any tool so that i can check on local machine that no page is displaying an error message of any kind.
Note:- i am making website using ASP.Net, SQL Azure, Window Azure.
You can try this - http://www.relsoftware.com/wlv/
I'm not pretty sure what do you want to check. If it's related with your business logic you have to check by yourself, or by some unit test framework. For windows azure deployment verification, I would like to recommend you to do as below:
1, Since you said you are using Windows Azure and SQL Azure, please have two server for testing. One to simulate the windows azure environment, installed Win08 x64 (R2 if you are using Azure OS 2.x), .NET Fx 4.0 (or 3.5.1 if you are using 3.5 SP1), Windows Azure SDK, IIS with URL rewrite. Do NOT anything else on this machine, for example VS, Win SDK etc. On another machine to simulator SQL Azure, just install SQL Server 08 R2.
2, Deploy your azure application on the first machine using CSPack, CSRUN, etc. and connect to the SQL Server on the other machine, test your application. If you are using storage service, firstly using the local emulator on the first machine.
3, Change to use real azure storage and test.
4, Change to use real SQL Azure and test.
5, Deploy your application on azure staging slot and test.
6, Swap to production slot.
In SDK 1.5 and later the Azure VS Tool have a feature to help you to verify if there's any assemblies you referenced in your project are missing on azure VM. So you can set them as Copy Local = True. There's also a website help you to verify the assemblies http://gacviewer.cloudapp.net/
Not entirely sure on what errors you might want to check, but if you just only want to check for broken links then there is a tool called Xenu that could help you. It will traverse all of the links and send back nice HTML reports on the broken links.
Would ELMHA help here?
http://code.google.com/p/elmah/
Check out Wades post for Azure usage: http://www.wadewegner.com/2011/08/using-elmah-in-windows-azure-with-table-storage/

Resources