Showing posts with label Web Development. Show all posts
Showing posts with label Web Development. Show all posts

Wednesday, 21 January 2026

ERR_SSL_PROTOCOL_ERROR in spfx workbench

Issue error on local workbaench:


This site can’t provide a secure connection localhost sent an invalid response.
Try running Windows Network Diagnostics.
ERR_SSL_PROTOCOL_ERROR

Solution:

1.Open package.json file
2. go to below section

before

  "scripts": {
    "build": "gulp bundle",
    "clean": "gulp clean",
    "test": "gulp test"
  }

and add "dev" : "set NODE_NO_HTTP2=1&& gulp serve",

after

  "scripts": {
    "build": "gulp bundle",
    "clean": "gulp clean",
    "test": "gulp test",
    "dev" : "set NODE_NO_HTTP2=1&& gulp serve"
  }

3.  Run "npm run dev" command in terminal or command window
4. if you  still face the issue then run command "gulp trust-dev-cert" then run "npm run dev" command

React version not specified in eslint-plugin-react settings. See https://github.com/jsx-eslint/eslint-plugin-react#configuration

When we  build the PCF project and  receive below warning  

Error:

Warning: React version not specified in eslint-plugin-react settings. See https://github.com/jsx-eslint/eslint-plugin-react#configuration .

[4:47:40 PM] [start]  Compiling and bundling control...



Solution : Open the ".eslintrc.json" and add below configuration 


"settings": {

      "react": {

        "version": "detect"

      }

    }



Monday, 19 January 2026

How to Get User Detail Programatically on ListItem Field

How to Get SPUser Detail Programatically on ListItem Field




 using (SPSite site = new SPSite("http://servername/"))
            {
                using (SPWeb web = site.OpenWeb())
                {
                    SPList List=web.Lists["Voucher"];
                   foreach(SPListItem ListItem in List.Items)
                   {
                       SPFieldUser ownerField =ListItem.Fields.GetField("ColumnName") as SPFieldUser;
                       SPFieldUserValue ownerValue = ownerField.GetFieldValue(ListItem[ownerField.Id].ToString()) as SPFieldUserValue;
                       SPUser owner = ownerValue.User;
                       string ownersEmail = owner.Email;
                       Console.WriteLine("user Name"+ListItem["ColumnName"].ToString());
                       Console.WriteLine("Users Email Id....."+ownersEmail.ToString());
                       Console.WriteLine("User Name .........." + owner.Name);
                       Console.WriteLine("User Id ............." + owner.ID);
                       Console.WriteLine("User Login........." + owner.LoginName);
                   
                       Console.Read();
                   }
                }
            }