Posts

Showing posts from 2020

Visual Studio 2019: SharePoint 2010 Visual Webpart issue

Now days I have to use the modern Visual Studio 2019 to update the old SharePoint 2010 web site to meet the AODA accessibility standard.  Issue 1: ScriptManager and UpdatePanel not found in namespace System.Web.UI Solution:  Firstly locate the project where <asp:ScriptManager> is used. Usually it's used in the master page (in the branding project). Then add a reference to the assembly  System.Web.Extensions . Select Project-> Add Reference and then select the assembly name.  https://stackoverflow.com/questions/19122286/scriptmanager-and-updatepanel-not-found-in-namespace-system-web-ui Issue 2 The auto-generated webart.ascx.g.cs is missing 1. The “Site URL” property of your project The “Site URL” property of your project should be correct. 2. Click on the *.ascx and see its property The “Custom Tool” property should be set to “SharePointWebPartCodeGenerator” value. Configure properties, save *.ascx, make any temporary changes to *.ascx file, save again and PUFFFF !!!! the *

SameSite Cookies

 https://devblogs.microsoft.com/aspnet/upcoming-samesite-cookie-changes-in-asp-net-and-asp-net-core/ https://www.thinktecture.com/en/identity/samesite/prepare-your-identityserver/ https://brockallen.com/2019/01/11/same-site-cookies-asp-net-core-and-external-authentication-providers/ For debugging purpose Go to chrome://flags and disable #same-site-by-default-cookies. If needed, also disable #cookies-without-same-site-must-be-secure . Restart Chrome for the changes to take effect. https://support.google.com/chrome/thread/34237768?hl=en

Visual Studio 2019: https://localhost:xxxx does't work on IIS Express

VS 2019 version 16.4, Net Core 3.1 SDK https://stackoverflow.com/questions/58175973/visual-studio-2019-this-site-can-t-provide-a-secure-connection-on-localhost/58209538#58209538 Try 1: dotnet dev-certs https --clean dotnet dev-certs https --trust didn't work Try 2: Repairing Visual Studio 2019: didn't work! Solution: Uninstall IIS 10.0 Express and then reinstall it!

Common Net Core Issues when debugging a web app using IIS Express

Remote Access to Local ASP.NET Core Applications from Mobile Devices - Kloud Blog https://marketplace.visualstudio.com/items?itemName=vs-publisher-1448185.ConveyorbyKeyoti Error: unable to connect to web server 'IIS Express' Solution: restart Visual Studio as Administrator Error: Bad host name when starting using http://localhost:xxx Solution:  Delete .vs folder (requires to close Visual Studio 2017) The ssl port is used. Please check launchSettings.json, set  "sslPort" to 0.  Error: This site can’t be reached when starting a SSL site Solution:  To fix self-signed certificate on the local machine you need to:  Delete .vs folder (requires to close Visual Studio 2017) Run these commands in cmd As Administrator: cd "C:\Program Files (x86)\IIS Express" IisExpressAdminCmd.exe setupsslUrl -url:https://localhost:12345/ -UseSelfSigned Make sure you run VS2017 As Administrator and check if the issue addressed Note: https://lo

Visual Studio 2019: Attached to Process not hitting break points for Net Core

Image
Cagri (Charlie) Aslan [MSFT] Aug 30, 2019 at 06:32 PM Can you check if you’ve used the correct debugger? i.e. Managed (CoreCLR) vs Managed (4.6)? You want the CoreCLR one to debug a coreclr app. https://developercommunity.visualstudio.com/content/problem/717375/debug-attached-to-process-not-hitting-break-points.html

Failed to Login Visual Studio 2019 with my Microsoft Account

Open Visual Studio Click Help > Send Feedback > Report a problem An instance of Visual Studio Feedback will open Attempt to sign in using your MS account If sign in is successful, check if you are signed into Visual Studio https://developercommunity.visualstudio.com/content/problem/70622/unable-to-login-into-visual-studio-2017-with-micro.html

Visual Studio 2019: Net Core Deployment Mode and Target Runtime

To avoid the weird 502.3 or other errors, please follow these rules: Deployment Mode Always select Self-contained except for Net Core 3.1 unless Net core 3.1 is installed on Windows Server  2012 R2+ (Net Core 3.1 requires 2012 R2+) Target Runtime Always select Win-x64. Though the "portable" option should work for all platforms, but it contains too many DLLs. Please check the publish profiles to make sure the profile is correct, e.g. no <_IsPortable>true</_IsPortable>. Sometimes the generated publish profile may not correct, please delete and re-create the profile. The recreation of publish profile is also suggested when Deployment Mode or Target Runtime is changed. Publish Mode Always use \\share instead of FTP. A lot of times using FTP can't correctly complete the deployment.