How to stop browserlink.js and aspnet-core-browser-refresh - visual-studio-2019

Why do I have all this junk in my console, only when using VS 2022?
I set Options -> Projects and Solutions -> ASP.NET Core -> Auto build and refresh options -> NONE
And also disabled 'browser link' here:
None of that stuff appears when running the same project in VS 2019, and I'm pretty sure its messing with my SignalR connections

For anyone using dotnet cli tool and want to disable the hot reload and console output whatever, and have no luck with dotnet watch --no-hot-reload, try put this at the very start of your js script:
function removeDotnetHotReload() {
const scriptInjectedSentinel = '_dotnet_watch_ws_injected'
// #ts-ignore
window[scriptInjectedSentinel] = true
}
removeDotnetHotReload()

For aspnet-core-browser-refresh, can you please file an issue at https://github.com/dotnet/sdk, as that's where that code lives?
For Browser Link, I can tell you that right now there's no way to disable those messages in a .NET 6 app without turning off CSS Hot Reload as well (you can turn verbose messages off in the console so they won't show, but they'll still be emitted). If you are ok turning off CSS Hot Reload, you can do that in Tools->Options->Projects and Solutions->ASP.NET Core. Please file feedback at Developer Community about this as well so we can potentially make this more discoverable.
That said, I'm curious why you think this might be interfering with your SignalR connections. If there is interference there, we definitely want to address that as well, but I'm not sure off the top of my head why that would be.

Per https://developercommunity.visualstudio.com/t/Browser-Link-cannot-be-disabled/1582653#T-N1608441, adding "hotReloadEnabled": false to your launchSettings.json profile(s) should suppress the injection of these scripts by Visual Studio. This does not actually turn off C# hot reloading - just turns off the scripts that MSFT injects.

Related

Vaadin: How do I get rid of vite?

The description of "Vite" was tempting and I was stupid enough to enable this new feature. Since then I am stuck with endless UI recompile loops! I.e. each time after I logged into my application the frontend gets recompiled AGAIN and the application restarts. ||-(
Disabling Vite in the lower right control-dialog is not accepted, it remains activated. How do I get rid of this unbaked feature again?
This is using Vaadin 23.1.7 and Java 17.
In Vaadin 23.1 you can remove the feature flag by deleting it from src/main/resources/vaadin-featureflags.properties.
Note that Vaadin 23.2 uses Vite by default. If you want to continue using Webpack going forward, you need to instead add this feature flag to the properties file:
com.vaadin.experimental.webpackForFrontendBuild=true

Today suddenly: Java live reload unavailable

I had been happily using Java live reload while debugging my Vaadin application over the past few months.
Today, after I started my browser and directed it to my locally running Vaadin application I got a popup in the lower right corner stating:
Java live reload unavailable. Live reload for Java changes is currently not set up. Find out how to make use of this functionality to boost your workflow. Read more
Clicking onto the read more link (pointing to 'https://vaadin.com/docs/v14/flow/workflow/workflow-overview') just brings me to a "404 Page Not Found" error page.
So - two or actually three questions:
what could cause my live-reload functionality go missing? I am using MS Edge and the Live-reload plugin is enabled (and it used to work until yesterday).
where has the page gone explaining how to set that up?
and finally: Any idea, what to check or fix to get this working again? I consider that pretty essential functionality for efficient UI development!
For question 2, you can find the documentation here: https://vaadin.com/docs/v14/guide/live-reload

How to avoid "automation server can't create object" without changing the browser security settings?

Recently I got the error "automation server can't create object", for which I know the solution is to add your website to trusted sites and enable the setting: "Initialize and script ActiveX controls not marked as safe for scripting". But since this is a security issue, I searched for an alternative workaround but came up with nothing.
So, I am wondering if there is any other work around for this?
Please look at this SO question. Check if you did everything that was discussed there.
The first thing is to implement IObjectSafety interface. Then sign the activex and installer and CAB. You might also want to look at this example how to implement an activex.

How to use breakpoints in F# files in C#/F# MVC4?

I am in the middle of a rather large project that uses the C#-F# MVC4 template. The template breaks up the solution into two projects: [ProjectName]Web and [ProjectName]WebApp. All of the F# code resides in the latter.
I cannot debug the solution unless I hit F5 from Global.asax in [ProjectName]Web. But this always misses the breakpoints I have set in my F# files in [ProjectName]WebApp.
Is there any way around this problem?
You will need to attach to an IIS process. Depending on what you are using this will be listed as either issexpress.exe or w3wp.exe in the debugger attach screen. To do this go to the menu Debug | Attach to process and select the process to attach. Once attached you can debug as per normal without going through F5.
Below is the screenshot of IIS express being listed in the debugger attach screen. Check 'Show processes from all users' if the said processes are not listed.
Hope this helps.

How to fix lost connection to Access Database after Deploying ASP website to IIS?

I am fairly new to ASP, so if anything doesn't make sense, or you think, "WHY WOULD YOU DO THAT?", it's becasue I really didn't know.
So the issue is that I created a Website using Visual Studio 2012 Express for Web. It was an ASP.NET MVC. I have spent over a week, working on this, doing testing and getting everything to work and look correctly. So I started the process of deploying it. I followed a couple guides, and felt like I did everything correctly.
Right now I am only trying to test my website on , and my first screen shows up. This screen is a "login" screen of sorts and is supposed to connect to my Access Database to check to see if a user should be admited to the next screen. But clicking the "Submit" button doesn't even open the Database. All of this works fine when I run it in Visual Studio.
What can I do to get this working?
Some steps I have tried and failed at:
-Redeploying
-Changing location of the Access DB
-I started to try to install configure and convert my Access Database to SQL Server, but I haven't been able to get that to work either.
If anyone has any suggestions, please let me know. If you need code examples or IIS settings, I will get them to you as fast as I can, but please help me because I don't want to have lost over a week of work.
Thanks,
D
Edit: After taking the suggestion from HansUp, it lead me to some other search terms that lead me to http://www.iis.net/learn/application-frameworks/running-classic-asp-applications-on-iis-7-and-iis-8/using-classic-asp-with-microsoft-access-databases-on-iis. I am using a 64-bit machine, and my application pool in IIS was not set to run 32-bit applicaions which when using Access ODBC drivers that are 32-bit casue a problem.
Set the IUSR account to Read/Write for the DB file and folder where the DB file is located.
Then, seeing as I was using a 64-bit machine, and the Access ODBC drivers that were being used were 32-bit, I had to set "Enable 32-bit Applications" to "true" in IIS, for the Application Pool that my site was using.
This is a link to where I found the 64-bit 32-bit solut
http://www.iis.net/learn/application-frameworks/running-classic-asp-applications-on-iis-7-and-iis-8/using-classic-asp-with-microsoft-access-databases-on-iis

Resources