Monday, October 31, 2022

Difference between database and schema

 https://blog.devart.com/difference-between-schema-database.html

Encryption in Stored procedure - SQL Server

 create procedure

use encryption 

as

begin

select * from table name;

end

How to auto create syntax for triggers, table, functions in SQL Server - How to Create Snippet in SQL server Management Studio

> Right click on SQL Server management studio

> Click on 'Insert  snippet'

> Create a file in "Documents\SQL Server Management Studio\Code Snippets\SQL\My Code Snippets\Create View.snippet" 

Create the below code for select query

===================

<?xml version="1.0" encoding="utf-8" ?>

<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">


<CodeSnippet Format="1.0.0">

<Header>

<Title>Select * From</Title>

        <Shortcut></Shortcut>

<Description>Select * From</Description>

<Author>India Corporation</Author>

<SnippetTypes>

<SnippetType>Expansion</SnippetType>

</SnippetTypes>

</Header>

<Snippet>

<Declarations>

<Literal>

<ID>SchemaName</ID>

<ToolTip>Name of the schema</ToolTip>

<Default>dbo</Default>

</Literal>

<Literal>

<ID>tablename</ID>

<ToolTip>Name of the table</ToolTip>

<Default>Sample_Table</Default>

</Literal>

</Declarations>

<Code Language="SQL">

<![CDATA[


    Select * from $SchemaName$.$tablename$

]]>

</Code>

</Snippet>

</CodeSnippet>

</CodeSnippets>


How to copy database from one server to another Microsoft SQL Server

> Open SQL server management studio

> Open the remote server

> Right Click on database and click on Task and click on Copy database.

>Enter source and destination server and database name.

> If it show error than 

Try below method

> Right click on database and click on task.

> Click on Generate script

and follow the below steps of URL

> After that run the command in window + run SQLCMD -d <database-name> -i filename.sql


reference:-https://www.stellarinfo.com/article/restore-sql-server-database-backup-to-older-version-of-sql-server.php


https://stackoverflow.com/questions/17918770/cannot-execute-script-insufficient-memory-to-continue-the-execution-of-the-prog


or if the script is not generating by generate script than you can use data only or schema only(type of data to script) or it is still not generating than it is encrypted.

Android Phone sensor etc in Developer option

 > Go to setting and developer option

> Go to Quick settings>Developer option

How to check the version in SQL Server

 Select @@VERSION

Difference between govt and private website

 Govt website have

header(In header logo and name of website)

menu


content and last is footer


Private Website has 


Header with menu (Logo)

Content


and footer

Friday, October 28, 2022

How to make website page template with border ASP.NET



Change it in master page

<head>

<style>

 #page {

width: 80%;

margin: 0 auto;

border:2px grey solid;

padding: 10px;

background-color: #fff;

}

</style>


<body>

    <form id="form1" runat="server">

        <div id="page">

        <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>

        <uc1:header runat="server" id="header" />

        <div class="pull-right hidden-print" style="clear: both">

            <asp:Label runat="server" ID="lblUsername"></asp:Label>

            <asp:LinkButton runat="server" ID="logout" OnClick="logout_Click" CssClass="btn btn-danger btn-xs">Logout</asp:LinkButton>

            <asp:LinkButton runat="server" ID="changePassword" PostBackUrl="~/changepassword.aspx" CssClass="btn btn-default btn-xs">Change Password</asp:LinkButton>

        </div>

        <div class="clear">

            <asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">

            </asp:ContentPlaceHolder>

        </div>

        <uc1:footer runat="server" id="footer" />

        </div>

    </form>

</body>

</head>

Thursday, October 27, 2022

How to change compilation debug temp directory web.config

Change web.config

from 

     <compilation debug="true" >

to

     <compilation debug="true" tempDirectory="F:\Inetpub\vhosts\pms.icar.gov.in\tmp">

Chart cannot save an item after 10 attempts. - Web.config

Because temporary folder is full


 Change in web.config


from 

<appSettings>

<add key="ChartImageHandler" value="storage=file;timeout=20;"/>

</appSettings>


to 

<appSettings>

<add key="ChartImageHandler" value="storage=file;timeout=20;dir=D:\PMSDev\PMS - Copy\chart\"/>

</appSettings>

Introduction PMS Personal Management System Cadrewise management system

 Web.config old

  <appSettings>

    <add key="ChartImageHandler" value="storage=file;timeout=20;dir=F:\Inetpub\vhosts\pms.icar.gov.in\httpdocs\chart\;" />

  </appSettings>


  <system.web>

    <compilation debug="true" tempDirectory="F:\Inetpub\vhosts\pms.icar.gov.in\tmp">

  </system.web>(These are the things I have changed)

----------------------------------------------------------

Wednesday, October 26, 2022

Difference between Eval and Bind function in ASP.Net

 https://www.c-sharpcorner.com/blogs/difference-between-eval-and-bind-functions-in-asp-net

Error Server Error in '/' Application. web.config - ASP.NET C# - Error to use a section registered as allowDefinition='MachineToApplication' beyond application level

 Error:- <sessionState timeout="40" mode="InProc"/>



Than go to that directory and roght click on it

> Click on convert to application.

reference:- www.tamilcodes.com/converting-virtual-directory-into-an-application-to-run-asp-net-in-iis/

or you can go to web.config and authentication section

reference:- https://stackoverflow.com/questions/10366874/net-configuration-error-allowdefinition-machinetoapplication-beyond-applicati

https://stackoverflow.com/questions/9300927/error-to-use-a-section-registered-as-allowdefinition-machinetoapplication-beyo


https://social.msdn.microsoft.com/forums/en-US/80937771-1bdd-4d24-83eb-c8bc011a7fa2/machinetoapplication-beyond-application-level?forum=aspconfiganddeploy

how to take backup of database from another server sql

 https://www.stellarinfo.com/blog/backup-and-restore-sql-database-from-one-server-to-another/


https://www.ubackup.com/enterprise-backup/backup-sql-server-database-to-another-server-1021.html


https://www.devart.com/dbforge/sql/studio/copy-database.html

IP Address range


 

How to add assembly reference in visual studio - ASP.NET C# -Web.config

>In visual studio

> Right click on bin folder

> Click on Add reference

>Click on Assemblies

>Select System.DirectoryServices

and it will be added

In web.config below code will be added:-

 <system.web>

    <assemblies>

    <add assembly="System.DirectoryServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>

</assemblies>

 </system.web>

Error The network path was not found - ASP.NET Website C# - Web.config

 There may be error in web.config connection string


Correct:-

<add key="PermisnetConn" value="Data Source=.\SQLEXPRESS;Initial Catalog=permisnet_new;User Id=sa;Password=Arms#2001"/>



Wrong:-

<add key="PermisnetConn" value="Data Source=SQLEXPRESS;Initial Catalog=permisnet_new;User Id=sa;Password=Arms#2001"/>

Tuesday, October 25, 2022

How to enable SSL Certificate in IIS Website - https

 https://techexpert.tips/iis/enable-https-iis/


https://onlinehelp.coveo.com/en/ces/7.0/administrator/enabling_ssl_in_iis.htm

Default document in web.config

  <defaultDocument>

      <files>

        <clear/>

                <add value="dgm.aspx"/>

        <add value="dgm.aspx.cs"/>

        <add value="DGM_BMaster_Page.master"/>

        <add value="Default.htm"/>

        <add value="Default.asp"/>

        <add value="index.htm"/>

        <add value="index.html"/>

        <add value="iisstart.htm"/>

      </files>

    </defaultDocument>


> Or Open IIS and click on Default document and Click on add button.

> you can add multiple pages. The page that is on First will redirect first.

Mime Type in web.config or in IIS server

 <staticContent>

      <mimeMap fileExtension=".tab" mimeType="text/plain"/>

    </staticContent>


> Or Open IIS server and click on Mime types and click on add.

> Right click to remove it.

Invalid temp images directory in chart handler configuration [F:\Inetpub\vhosts\pms.icar.gov.in\httpdocs\chart\]. Please edit the web.config file. The CharImageHandler key, Dir value must point to a valid directory. The directory is required for temporary image storage when storage mode equals file system. asp.net c#

<add key="ChartImageHandler" value="storage=file;timeout=20;dir=F:\Inetpub\vhosts\pms.icar.gov.in\httpdocs\chart\;" />


 Remove (dir=F:\Inetpub\vhosts\pms.icar.gov.in\httpdocs\chart\;" ) from web.config file.

HTTP Error 500.19 - Internal Server Error and HTTP Error - Error code - 8007000d

 If config error is blank

There may be some error in web.config file.

Some tag is missing.

Delete the tag below:-


<rewrite>

      <rules>

        <rule name="pms" stopProcessing="true">

          <match url="(.*)" />

          <conditions>

            <add input="{HTTPS}" pattern="^OFF$" />

          </conditions>

          <action type="Redirect" url="https://{HTTP_HOST}/{R:1}" />

        </rule>

      </rules>

    </rewrite>

Thursday, October 20, 2022

Website master page theme template basics

> First there should be Logo on top than on same row website name

>Than header(menu)

> Than content 

>Than Footer

HTTP Error 401.3 - Unauthorized in asp.net website

 >Open IIS server

> Click on website

> Open feature view

> Double click on Authentication

> Click on 'Anonymous Authentication'

> Click on Edit and apply radio box 'Application Pool Identity'

Wednesday, October 19, 2022

ASP.NET inbuilt website Login Register

 > Database is present under App_data folder

> We can open that database in SQL server with server name = (localdb)\MSSQLLocalDB authentication is windows authentication

How to use Jquery UI

 <head>  

  <link href="https://code.jquery.com/ui/1.10.4/themes/ui-lightness/jquery-ui.css" rel="stylesheet">  

  <script src="https://code.jquery.com/jquery-1.10.2.js"></script>  

  <script src="https://code.jquery.com/ui/1.10.4/jquery-ui.js"></script>  

</head>


reference:-https://www.javatpoint.com/jquery-ui-button

Software requirement specification (SRS)

 https://krazytech.com/projects/sample-software-requirements-specificationsrs-report-airline-database

iis http error 404.3 – not found (add a mime map)


https://superuser.com/questions/1218375/turn-windows-features-on-or-off-opens-server-manager

https://www.revelation.com/WebHelp/OpenInsight%2010%20O4W%202.0%20Quick%20Start%20Guide/O4W_008.jpg

https://www.webhosting.uk.com/kb/iis-http-error-404-3-not-found-add-a-mime-map/

https://stackoverflow.com/questions/6425442/http-error-404-3-not-found-in-iis-7-5

https://kb.blackbaud.com/knowledgebase/Article/52195

https://stackoverflow.com/questions/7083533/http-er


Error Image below:-


ror-404-17-not-found

Tuesday, October 18, 2022

Uncaught Error: Bootstrap's JavaScript requires jQuery in a bootstrap website

Change the sequence of Javascript code or reference:-

<!-- JQuery Core JavaScript -->
<script src="lib/js/jquery.min.js"></script>
<script src="lib/js/jquery-ui.min.js"></script>
<!-- Bootstrap Core JavaScript -->
<script src="lib/js/bootstrap.min.js"></script>


or

<script src="js/jquery-1.11.0.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/wow.min.js"></script>

reference:-


Wednesday, October 12, 2022

How to capture full size screenshot of webpage in chrome

> Open developer tool

> Click on icon with three dots

> Click on Run command

> Search for screenshot

> Click on full size screenshot

>It will be saved into downloads folder


or if this is not working than download chrome extention

https://chrome.google.com/webstore/detail/gofullpage-full-page-scre/fdpohaocaechififmbbbbbknoalclacl?hl=en


GoFullPage - Full Page Screen Capture

Download link after File Upload asp.net C#

 <td>

                Upload Bank Statement/Passbook Statement</td>

            <td>

                <div id="Div_BankStatement" runat="server"  Visible="false">

                <asp:FileUpload ID="fld_BankStatement" CssClass="form-control" runat="server" />

                <asp:CustomValidator ID="CustomValidator4" ForeColor="Red" runat="server"  

                    Display="Dynamic"  ValidationGroup="a" onservervalidate="CustomValidator4_ServerValidate">

                </asp:CustomValidator>

                    </div>

                 <asp:LinkButton runat="server" ID="lb_BankStatement" OnClick="lb_BankStatement_Click" Text="Bank Statement" Visible="false"></asp:LinkButton>

                <asp:Label ID="lbl_BankStatement_link" runat="server" Visible="false"></asp:Label>

               

            </td>


How to delete a blank page in MS Word

 > Open MS Word

>Click on Page you want to delete

> Press Crtl+ G

>Enter \page

>Press enter and close

> Delete the selected text> and click backspace


reference:- https://support.microsoft.com/en-us/office/delete-a-page-in-word-174fedd3-b4e5-42e4-a4d0-5e25127a1404

How to insert blank page in MS word - Shapes and textboxes (arrow and textbox)

 >Open MS word

>Click on Insert> Click on blank page


-------------------------


>Click on Insert> Click on shapes and arrow

> Click on Insert> Click on textbox and draw a textbox

How to change MS excel Background

 >Open MS excel

> Go to page layout

> Click on background and choose file (image will be shown in background)



--------------------

Note:- We cannot change background color in excel.

Where to find Triggers in SQL Server Management studio

In Sql server management studio

> Triggers are found under Table name > In triggers



Triggers are present under tables> Name of table > Under triggers > expand it

Window 10 apps - programs - For PC health checkup and windows memory - Task manager like tool

 3D viewer, 3d paint, Video editor


Click on start menu and search for - Windows memory diagnostics tools, PC health checkup, Network speed checkup, Calibrate Display colors

-----------------------------------------------

For Task Manager like tools

Resource Monitor, Performance monitor