Thursday, September 10, 2020

Sign out azure in vs code

 I was using an app service in Visual Studio Code to access a certain set of subscriptions I was working against and deploying to. This was prior to getting my pipelines ready, as that was my eventual deployment destination. In the meantime, I needed to sign out the account and noticed there wasn’t any GUI way to do this in the Azure extension (that I could find anyway). I did some looking and found the process:

Start by opening the Command Palette:


Find the sign-out command:

You can now sign back in:

Enjoy!



Thursday, July 30, 2020

Get an Invalid or Expired Token Error Response in postman for twitter api

The following error can occur if you have regenerated tokens or revoked access to your Twitter application.

Solution: Check the authorization for your application on the Twitter developer page and update the credentials for the adapter.

  1. Log in to the Twitter developer page and go to https://apps.twitter.com.

  2. If you have revoked access to the application, provide access by clicking Generate Access Token.

    
  1. Make a note of the following tokens in the Keys and Access Tokens tab:

    • Consumer key

    • Consumer secret

    • Access token

    • Access token secret

  2. Update the Twitter Adapter connection with these credentials.

Wednesday, June 17, 2020

How to Install NVM on Windows

If you want to use multiple Node version in you single system so you need to install the NVM (Node Version Manager) So in this post i have explain you how to install the NVM in window system.

Go to below URL.
https://github.com/coreybutler/nvm-windows

Click on Download Now 



Click on nvm-setup.zip than you download the zip file.



Extract the nvm-setup.zip file.


when you extract the file you will get nvm-setup.exe.So install this exe file in your system.
Go to start men type Git bash 


Thank you hope it is help you.



Tuesday, June 9, 2020

How to create an account on Azure DevOps?

Hello Friends in this post i will explain you how to create an account on Azure DevOps.


Azure DevOps can be accessed using following website-


click =>   Start free  =>  logged in  by using  you Microsoft username and Password.

On successful login you will get below screen.




Thank you


Thursday, April 30, 2020

How to open FTP dashboard from Azure App Service

If you want to deploy your app to Azure App Service using FTP/S so it is an important part you know the credential of FTP.So in this article, I will show you from which palace you get FTP details.


Open FTP dashboard

  1. In the Azure portal, search for and select App Services.

2. Select the web app you want to deploy.

3. Select Deployment Center > FTP > Dashboard.



Get FTP connection information

In the FTP dashboard, select Copy to copy the FTPS endpoint and app credentials.

It's recommended that you use App Credentials to deploy to your app because it's unique to each app. However, if you click User Credentials, you can set user-level credentials that you can use for FTP/S login to all App Service apps in your subscription.

Thank you,
Arjun Walmiki







Wednesday, April 29, 2020

How to set command timeout in asp.net core in entity framework

If you're using the DI container to manage the DbContext (i.e. you're adding the DbContext to the service collection), the command timeout can be specified in the options.
In Startup.cs  file ConfigureServices method.
services.AddDbContext<YourDbContext>(options => options.UseSqlServer(
    this.Configuration.GetConnectionString("YourConnectionString"),
    sqlServerOptions => sqlServerOptions.CommandTimeout(60))
);
 Same code are as below
public void ConfigureServices(IServiceCollection services)
        {
          services.AddDbContext<KLASSAKTContext>(option => option.UseSqlServer(Configuration.GetConnectionString("DbKlassakt"),
                sqlServerOptions => sqlServerOptions.CommandTimeout(60)));
}
Hope it is help you,
Arjun Walmiki


Sunday, April 19, 2020

Create A Stored Procedure In SQL Server

In this article you will learn about how to create a stored procedure in SQL without parameter and with parameter .This article  is useful for beginner who want to learn how to create SP.


What is a Stored Procedure?

A SQL stored procedure (SP) is a collection SQL statements and sql command logic, which is compiled and stored on the database. Stored procedues in SQL allows us to create SQL queries to be stored and executed on the server. Stored procedures can also be cached and reused. The main purpose of stored procedures to hide direct SQL queries from the code and improve performance of database operations such as select, update, and delete data.
You can create and execute stored procedures using the Object Explorer in SQL Server or using SQL Server Management Studio (SSMS).

So let's start with how to create a stored procedure without parameter.


  1. CREATE PROCEDURE stpGetAllUserDetail  
  2. AS  
  3. BEGIN   
  4.     -- Select statements for procedure here  
  5.     Select * from tblUserDetail  
  6. END  

What are parameters in stored procedures?

Parameters in SPs are used to pass input values and return output values. There are two types of parameters:
  1. Input parameters - Pass values to a stored procedure.
  2. Output parameters - Return values from a stored procedure.

How to create a SELECT query SP with parameters?

In the previous steps, we created a simple SP that returned all rows from a table. Now, let's create a new SP that will take a city name as an inpurt parameter and will return all rows where city name matches the input parameter value.
Here is the updated SP with a parameter @CityName.



  1. GO  
  2. -- =============================================  
  3. -- Author:      Arjun Walmiki  
  4. -- Create date: 19-April-2020  
  5. -- Description: Return specific city records  
  6. -- =============================================  
  1. CREATE PROCEDURE stpGetAllUserDetailByCityName  
  2.  -- Add the parameters for the stored procedure here  
  3.     @CityName nvarchar(30)  
  4. AS  
  5. BEGIN   
  6.     
  7. -- SET NOCOUNT ON added to prevent extra result sets from  
  8.     -- interfering with SELECT statements.  
  9.     SET NOCOUNT ON;  
  10.   
  11.     Select * From tblUserDetail  
  12.     where City like '%'+@CityName+'%'  
  13.  
  14. END  
  15. GO

How to create a INSERT query based stored procedure?

 
We can use an INSERT INTO SQL query to insert data into a table. The following SQL statement creates an INSERT SP with three parameters.

  1. SET ANSI_NULLS ON  
  2. GO  
  3. SET QUOTED_IDENTIFIER ON  
  4. GO  
  5. -- =============================================  
  6. -- Author:      Arjun Walmiki 
  7. -- Create date: 19-April-2020  
  8. -- Description: To create a new member  
  9. -- =============================================  
  10. CREATE PROCEDURE stpInsertUserDetail 
  11. @Name varchar(50),  
  12. @City varchar(25),  
  13. @Phone varchar(15)  
  14.   
  15. AS  
  16. BEGIN  
  17.     -- SET NOCOUNT ON added to prevent extra result sets from  
  18.     -- interfering with SELECT statements.  
  19.     SET NOCOUNT ON;  
  20.   
  21.     Insert into tblUserDetail (Name,City,Phone)   
  22.            Values (@Name,@City, @Phone)  
  23.   
  24. END  
  25. GO  
Thank you Hope it help to you !!!!


Arjun Walmiki