Visual Studio 2022 .NET 5+ API stops debugging on image upload - visual-studio-2022

Whenever I start my .NET 5 API in debug mode and I try to upload an image with my browser, not associated in any way with the .NET project, VS 2022 stops the debug process.
For instance if I use https://www.w3schools.com/tags/tryit.asp?filename=tryhtml_input_accept and upload an image with the input field , the debug process stops.
It also stops whenever I:
Try to log in using FB/Google login button anywhere
Using Brave (browser) have two separate browser profiles open and close one of them
Any ideas on what it might be? Or a way to search out a cause

Okay, I found the solution
In Visual Studio 2022 you need to uncheck: Tools -> Options -> Project and Solutions -> Web Projects: "Stop debugger when browser window is closed".
Apparently Visual studio treated every image upload or every browser that is closed as closing the debug browser window and stopping the process. Weird.

Related

Locating CLI error logs when deploying an ASP.NET MVC5 app using web deploy fails

I am trying to deploy an ASP.NET MVC5 web app (web deploy deployment package) on my Windows Server using Command Prompt as I have done countless of times before with the same web app. When I try running the command
myproject.deploy.cmd /t
inside the correct folder the process starts but then abruptly stops and the CLI window closes.
Just before the window disappears I can see an error message in red, but I just do not have enough time to read what it says.
My question is where does one find the logs for commands that have failed? Alternatively is there a way to force the CLI to stay open in order to read the error displayed?
I managed to find the logs in the Event Viewer:
Event Viewer -> Applications and Services -> Microsoft -> Windows -> WebDeploy -> Errors

Using AutoIT to access windows security dialog

I have been using below code for a while to click on all non-web application based popups. ex windows security login popup in case my web app tries to upload a file. All worked fine so far all of sudden the same code stops working and hangs at the popup screen but works if i have break point in my visual studio code.
WinWaitActive("Windows Security",,7)
ControlClick("Windows Security",,"Button2")
I have crossed checked the OK button name nothing has change but the above code refuse to work any more. Using Visual studio 2010 vb.net.
Have you tried using the ImageSearchDLL? It allows you to take a screenshot of a button (or image, link, etc.) and use it as a reference for where to click. For more usage info and to download sample code look here: http://www.autoitscript.com/forum/topic/65748-image-search-library/page-4

How to disable WCF Test Client - VS 2012

I have a new WCF Service Application, when I hit F5 to debug, the WCF Test Client always comes up, but I would like to disable it since I am using soapUI to test instead.
I have tried the answer here - https://stackoverflow.com/a/8441887/903056 but this XML node is no longer in the project file for VS 2012. I have tried several other things myself as well, such as changing default start page and trying to force debug to start a browser session instead.
This is realy frustrated but you can try one of the followings to disable the WCF test client:
1.Open the requested project properties and select the Web tab. Select
the Current Page radio button (I believe that the Specific Page
button is selected), Save the project and run(F5).
2.You can modified the prject XML (.csproj) file and add
<EnableWcfTestClientForSVCDefaultValue>False</EnableWcfTestClientForSVCDefaultValue>
attribute to <WebProjectProperties> node. That should be done by the
followings:
2.1 Unload the requested project (right click -> Unload Project).
2.2 Edit <ProjectName>.csproj (right click again on the project)
2.3 Look for WebProjectProperties node and add <EnableWcfTestClientForSVCDefaultValue>False</EnableWcfTestClientForSVCDefaultValue> to it.
2.4 Reload the poject.
I hope you will find that unswer helpfull..
A simple option that works for me (at least in Visual Studio 2012 Update 4):
Open the WCF project properties and go to the Web section. Set the Start Action setting to Don't open a page. Wait for a request from an external application.
After choosing that option I no longer see the WCF Test Client.
I personally usually choose this start action anyway, since I much prefer hitting F5 in my browser than having yet another tab opened each time I hit F5 in VS.
I found a reasonable work around. All I did was add an empty html page to the project, then right clicked on the html file in Solution Explorer and chose Set As Start Page. A debug session starts but it doesn't go to the WCF TestClient. Not elegant but works.
Old thread but found it while I was suffering the same frustration with VS2013. If you run the project (F5) with the (yourProject)\svc.cs file open in the VS editor then the WCF Client starts. If you hit F5 with any other file as the selected and focused file in the VS editor then IIS and the normal first web page starts.
Very simple when one knows.
I had a similar problem, and found this to be caused by the default Start Options under
> Solution Properties
> Debug
>Start Options
>Command line arguemnts:
it was listing a command line argument of /client:"WcfTestClient.exe" which was launching the test client. Simply removing this argument solved my problem.
No need to extra thing just do thing below.
Tools-->Option -->project and solution-->Build and Run and finally
check Only startup project and Dependencies on Run

wcf : Service + Client in same solution, how to debug? I don't want to run 2 versions of VS 2010 at the same time

I have created an application which has a client (WPF) and the Server (WCF), the service is IIS hosted, currently I am having to have 2 versions of vs 2010. One loads the wcf service in IIS and the other in my windows application.
The problem with this is it takes so much resources.
It appears if the wcf service is "NOT" hosted in IIS then I can start two projects at the same time according to this http://msdn.microsoft.com/en-us/library/bb157685.aspx
But what are my other options?
I need to find the best way of being able to compile / run the 2 projects and able STEP INTO each when when in debug, without using too many resources or having more than one vs 2010 open at the same time.
You should be able to debug both from the same instance of Visual Studio if they are in the same solution. When you run your application from Visual Studio, open the Debug menu and choose Attach To Process, you need to attach the debugger to the ASP.NET worker process (aspnet_wp.exe), it should automatically attach to your client.
Open service and client code in VS. Open Debug menu. Attach to process. Hold the Ctrl key and select as many processes as you want to debug using Mouse click.
In your case, you can select the ASP NET worker process depending on the version of IIS and the client process.
The easiest way to debug your WCF service is to:
Right click on project containing svc file.
Select Set as Startup project.
Put a breakpoint on the methods you want to debug.
Breakpoint should be Red.
Make sure your app config file is pointing to the debug WCF service version that's currently running, ex:
http://localhost:12345/MyService.svc
Run your app.
When the app calls that WCF method, it should stop on breakpoint.

Problems with debugging in Silverlight 4 using Out of Browser and WCF RIA Services

With Visual stuido 2010, it's simple to set up SL4 to debug with an out-of-browser installed app. I followed the instructions from here and everything seems to set up fine. Debugging from the browser runs the program just fine, but running from the OOB program gives a different result. After starting, the screen will go blank and then hang forever. I have some concerns that it might be because of some of the technologies that we're using.
Firstly, there's a popup that happens because we're using WCF RIA Services (formerly .NET RIA Services).
"RIA Services will fail unless the silverlight project is hosted and launched from the same web project that contains the RIA Services."
This seems to just be a warning, but I have a suspicion that this warning might be telling me that RIA Services needs to have the .web project as its startup project.
We're also using prism and the error has an odor of a Prism error too. (something loading and then not ever appearing)
Has anyone else had any issues with OOB debugging in SL4? Is anyone else OOB debugging in SL4?
Sorry it's so vague. It's a complicated mess. The only message I see is the italicized popup warning. Then the window (which was previously showing the background of our application) just goes blank
There is currently a known issue with debugging an Out of Browser Silverlight 4 application when using F5 to launch the application from within VS 2010. The question I have is whether or not the application launches without debugging (-F5 or running it from the shortcut)? In the case of using F5, a dialog typically appears with the following error dialog “Unable to start debugging. A fatal error occured. For more details, please see the Microsoft Help and Support web site. HRESULT=0x80070018” and then the application appears to hang. In this case detaching allows the process to continue and then reattaching should allow you to debug the process.
If this is completely blocking or you’re trying to debug code running at startup (like the page startup event), one possible way to get around this would be to put in a call to System.Diagnostics.Debugger.Break, start the program and then attach when dialog pops.
This can be caused by the OOBA install being older than the version you are trying to debug. Remember, Silverlight OOBAs do not automatically update themselves to the latest version of the XAP file that may be available on the server. You have to update them yourself. If you get this error and you have included the auto-update logic in your app, just bounce out of VS, run the app so it auto-updates, then go back in and debug.
Alternately, you can uninstall the app and re-install it. That will ensure you are debugging against the latest VS build.
I ran into this same issue with VS 2008 and Silverlight 3. If I got it, I just jumped out and updated the app then re-ran it in VS and had full debugging.