Learn some Centos/Redhat Linux: RHCE: MariaDB Administration on Redhat/Fedora/CentOS #nothing

The author is: the_authornRHCE: MariaDB Administration on Redhat/Fedora/CentOS
Check if mariaDB is installed or not
130 yum list installed | grep ^mariadb
mariaDB originated from MySQL – after MySQL Got Bought by Oracle
133 yum list installed | grep ^mariadb
I see – installed though not completely
Output:
mariadb-libs.x86_64 1:5.5.52-1.el7 @anaconda
There are two other components: mariaDB – client component. MariaDB-server: Server Component
The MariaDB packages:
138 mariadb-bench.x86_64 mariadb-devel.x86_64 mariadb-server.x86_64 mariadb-test.x86_64 mariadb.x86_64
Install all packages at once
139 yum install mariadb*
140 yum list installed | grep ^mariadb
Now, I see the following, after I have installed – all MariaDB packages available in my system
mariadb.x86_64 1:5.5.52-1.el7 @local
mariadb-bench.x86_64 1:5.5.52-1.el7 @local
mariadb-devel.x86_64 1:5.5.52-1.el7 @local
mariadb-libs.x86_64 1:5.5.52-1.el7 @anaconda
mariadb-server.x86_64 1:5.5.52-1.el7 @local
mariadb-test.x86_64 1:5.5.52-1.el7 @local
MariaDB Configuration Files
149 ls /etc/my.cnf
150 ls /etc/my.cnf.d/*
The files
/etc/my.cnf.d/client.cnf /etc/my.cnf.d/mysql-clients.cnf /etc/my.cnf.d/server.cnf
153 vim /etc/my.cnf
154 vim /etc/my.cnf.d/client.cnf
155 vim /etc/my.cnf.d/server.cnf
156 vim /etc/my.cnf.d/mysql-clients.cnf
157 main config file /etc/my.cnf
158 grep -v ^# /etc/my.cnf : will show lines that are not comments
159 grep -v ^# /etc/my.cnf
The content of my.cnf : some lines are self explanatory
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
symbolic-links=0
[mysqld_safe]
log-error=/var/log/mariadb/mariadb.log
pid-file=/var/run/mariadb/mariadb.pid
MariaDB messages are logged at: /var/log/mariadb/mariadb.log
MySQL Specific Selinux Contexts
171 ps -eZ | grep mysqld
I do not see anything as mysqld/maridb is not running
178 systemctl start mariadb.service
179 systemctl enable mariadb.service
180 ps -eZ | grep mysqld
now the output:
system_u:system_r:mysqld_safe_t:s0 4428 ? 00:00:00 mysqld_safe
system_u:system_r:mysqld_t:s0 4585 ? 00:00:00 mysqld
184 mysqld runs on it’s own domain mysqld_t
Related Selinux file type: mysql_exec_t
etc_t is for /etc/my.cnf.d
mysql_db_t is for /var/lib/mysql/
mysql_log_t is for /var/log/mariadb/
189 ll -dZ /usr/libexec/mysqld /etc/my.cnf.d /var/lib/mysql /var/log/mariadb
The output – please note the Selinux Contexts in the output
drwxr-xr-x. root root system_u:object_r:mysqld_etc_t:s0 /etc/my.cnf.d
-rwxr-xr-x. root root system_u:object_r:mysqld_exec_t:s0 /usr/libexec/mysqld
drwxr-xr-x. mysql mysql system_u:object_r:mysqld_db_t:s0 /var/lib/mysql
drwxr-x—. mysql mysql system_u:object_r:mysqld_log_t:s0 /var/log/mariadb
Corresponding Selinux Port Type: mysql_port_t
196 semanage port -l | grep mysqld
output:
mysqld_port_t tcp 1186, 3306, 63132-63164
Related Selinux Booleans: mysql_connect_any, selinuxuser_mysql_connect_enabled
200 getsebool -a | grep mysql
I see the output
mysql_connect_any –> off
selinuxuser_mysql_connect_enabled –> off
To install MariaDB-Server:
205 yum -y install mariadb-server
already installed. we installed with yum -y install mariadb* [installed everything together]
207 systemctl enable mariadb
We can run mysql_secure_installation – to secure our MariaDB installation

209 mysql_secure_installation

The Output: from mysql_secure_installation command
NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!
In order to log into MariaDB to secure it, we’ll need the current
password for the root user. If you’ve just installed MariaDB, and
you haven’t set the root password yet, the password will be blank,
so you should just press enter here.
Enter current password for root (enter for none):
OK, successfully used password, moving on…
Setting the root password ensures that nobody can log into the MariaDB
root user without the proper authorisation.
Set root password? [Y/n] y
New password:
Re-enter new password:
Password updated successfully!
Reloading privilege tables..
… Success!
By default, a MariaDB installation has an anonymous user, allowing anyone
to log into MariaDB without having to have a user account created for
them. This is intended only for testing, and to make the installation
go a bit smoother. You should remove them before moving into a
production environment.
Remove anonymous users? [Y/n] y
… Success!
Normally, root should only be allowed to connect from ‘localhost’. This
ensures that someone cannot guess at the root password from the network.
Disallow root login remotely? [Y/n] y
… Success!
By default, MariaDB comes with a database named ‘test’ that anyone can
access. This is also intended only for testing, and should be removed
before moving into a production environment.
Remove test database and access to it? [Y/n] y
– Dropping test database…
… Success!
– Removing privileges on test database…
… Success!
Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.
Reload privilege tables now? [Y/n] y
… Success!
Cleaning up…
All done! If you’ve completed all of the above steps, your MariaDB

installation should now be secure.
Thanks for using MariaDB!
Enable MariaDB through Firewall and Allow traffic on Port 3306 – default mysql port
218 firewall-cmd –add-service=mysql –perm
220 firewall-cmd –reload
221 systemctl start mariadb
222 systemctl status mariadb
223 start mysql/mariadb
Run MySQL
224 mysql -u root -p
mysqldump is used to backup a database
mysql command can be used to restore a database
you can even use IDEs such as MySQL Workbench to backup and restore MySQL Databases
228 mysql -u root -p
229 mysqldump -u root -p testsayed > testsayeddb.sql
to restore – you need to use < testsayeddb.sql
231 mysql -u root -p testsayed < testsayeddb.sql
Backup and Restore MySQL Database
You can backup multiple databases at once, you can even backup some tables or other database objects using mysqldump
similarly, you can restore multiple databases at the same time using mysql command
just use multiple datbase or database object names with NO comma – one after another
235 mysqldump -u root -p DB1 DB2 DB3 > alldb.sql
when you use restore and give the sql file – if you use db name or table name before < then only that part will be restored irrespective hiow much data is there on the file
example
238 mysql -u root -p DB1 tbl1 < alldb.sql ;
you can use –all-databases or –databases with mysqldump command
Share this: From: http://sitestree.com/learn-some-centos-redhat-linux-rhce-mariadb-administration-on-redhat-fedora-centos-2/
Categories:
Tags:
Post Data:2021-01-24 20:31:57

    Shop Online: <a href='https://www.ShopForSoul.com/' target='new' rel="noopener">https://www.ShopForSoul.com/</a>
    (Big Data, Cloud, Security, Machine Learning): Courses: <a href='http://Training.SitesTree.com' target='new' rel="noopener"> http://Training.SitesTree.com</a> 
    In Bengali: <a href='http://Bangla.SaLearningSchool.com' target='new' rel="noopener">http://Bangla.SaLearningSchool.com</a>
    <a href='http://SitesTree.com' target='new' rel="noopener">http://SitesTree.com</a>
    8112223 Canada Inc./JustEtc: <a href='http://JustEtc.net' target='new' rel="noopener">http://JustEtc.net (Software/Web/Mobile/Big-Data/Machine Learning) </a>
    Shop Online: <a href='https://www.ShopForSoul.com'> https://www.ShopForSoul.com/</a>
    Medium: <a href='https://medium.com/@SayedAhmedCanada' target='new' rel="noopener"> https://medium.com/@SayedAhmedCanada </a>

Learn some Centos/Redhat Linux: RHCE: MariaDB Administration on Redhat/Fedora/CentOS #nothing

RHCE: MariaDB Administration on Redhat/Fedora/CentOS
Check if mariaDB is installed or not
130 yum list installed | grep ^mariadb
mariaDB originated from MySQL – after MySQL Got Bought by Oracle
133 yum list installed | grep ^mariadb
I see – installed though not completely
Output:
mariadb-libs.x86_64 1:5.5.52-1.el7 @anaconda
There are two other components: mariaDB – client component. MariaDB-server: Server Component
The MariaDB packages:
138 mariadb-bench.x86_64 mariadb-devel.x86_64 mariadb-server.x86_64 mariadb-test.x86_64 mariadb.x86_64
Install all packages at once
139 yum install mariadb*
140 yum list installed | grep ^mariadb
Now, I see the following, after I have installed – all MariaDB packages available in my system
mariadb.x86_64 1:5.5.52-1.el7 @local
mariadb-bench.x86_64 1:5.5.52-1.el7 @local
mariadb-devel.x86_64 1:5.5.52-1.el7 @local
mariadb-libs.x86_64 1:5.5.52-1.el7 @anaconda
mariadb-server.x86_64 1:5.5.52-1.el7 @local
mariadb-test.x86_64 1:5.5.52-1.el7 @local
MariaDB Configuration Files
149 ls /etc/my.cnf
150 ls /etc/my.cnf.d/*
The files
/etc/my.cnf.d/client.cnf /etc/my.cnf.d/mysql-clients.cnf /etc/my.cnf.d/server.cnf
153 vim /etc/my.cnf
154 vim /etc/my.cnf.d/client.cnf
155 vim /etc/my.cnf.d/server.cnf
156 vim /etc/my.cnf.d/mysql-clients.cnf
157 main config file /etc/my.cnf
158 grep -v ^# /etc/my.cnf : will show lines that are not comments
159 grep -v ^# /etc/my.cnf
The content of my.cnf : some lines are self explanatory
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
symbolic-links=0
[mysqld_safe]
log-error=/var/log/mariadb/mariadb.log
pid-file=/var/run/mariadb/mariadb.pid
MariaDB messages are logged at: /var/log/mariadb/mariadb.log
MySQL Specific Selinux Contexts
171 ps -eZ | grep mysqld
I do not see anything as mysqld/maridb is not running
178 systemctl start mariadb.service
179 systemctl enable mariadb.service
180 ps -eZ | grep mysqld
now the output:
system_u:system_r:mysqld_safe_t:s0 4428 ? 00:00:00 mysqld_safe
system_u:system_r:mysqld_t:s0 4585 ? 00:00:00 mysqld
184 mysqld runs on it’s own domain mysqld_t
Related Selinux file type: mysql_exec_t
etc_t is for /etc/my.cnf.d
mysql_db_t is for /var/lib/mysql/
mysql_log_t is for /var/log/mariadb/
189 ll -dZ /usr/libexec/mysqld /etc/my.cnf.d /var/lib/mysql /var/log/mariadb
The output – please note the Selinux Contexts in the output
drwxr-xr-x. root root system_u:object_r:mysqld_etc_t:s0 /etc/my.cnf.d
-rwxr-xr-x. root root system_u:object_r:mysqld_exec_t:s0 /usr/libexec/mysqld
drwxr-xr-x. mysql mysql system_u:object_r:mysqld_db_t:s0 /var/lib/mysql
drwxr-x—. mysql mysql system_u:object_r:mysqld_log_t:s0 /var/log/mariadb
Corresponding Selinux Port Type: mysql_port_t
196 semanage port -l | grep mysqld
output:
mysqld_port_t tcp 1186, 3306, 63132-63164
Related Selinux Booleans: mysql_connect_any, selinuxuser_mysql_connect_enabled
200 getsebool -a | grep mysql
I see the output
mysql_connect_any –> off
selinuxuser_mysql_connect_enabled –> off
To install MariaDB-Server:
205 yum -y install mariadb-server
already installed. we installed with yum -y install mariadb* [installed everything together]
207 systemctl enable mariadb
We can run mysql_secure_installation – to secure our MariaDB installation

209 mysql_secure_installation

The Output: from mysql_secure_installation command
NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!
In order to log into MariaDB to secure it, we’ll need the current
password for the root user. If you’ve just installed MariaDB, and
you haven’t set the root password yet, the password will be blank,
so you should just press enter here.
Enter current password for root (enter for none):
OK, successfully used password, moving on…
Setting the root password ensures that nobody can log into the MariaDB
root user without the proper authorisation.
Set root password? [Y/n] y
New password:
Re-enter new password:
Password updated successfully!
Reloading privilege tables..
… Success!
By default, a MariaDB installation has an anonymous user, allowing anyone
to log into MariaDB without having to have a user account created for
them. This is intended only for testing, and to make the installation
go a bit smoother. You should remove them before moving into a
production environment.
Remove anonymous users? [Y/n] y
… Success!
Normally, root should only be allowed to connect from ‘localhost’. This
ensures that someone cannot guess at the root password from the network.
Disallow root login remotely? [Y/n] y
… Success!
By default, MariaDB comes with a database named ‘test’ that anyone can
access. This is also intended only for testing, and should be removed
before moving into a production environment.
Remove test database and access to it? [Y/n] y
– Dropping test database…
… Success!
– Removing privileges on test database…
… Success!
Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.
Reload privilege tables now? [Y/n] y
… Success!
Cleaning up…
All done! If you’ve completed all of the above steps, your MariaDB

installation should now be secure.
Thanks for using MariaDB!
Enable MariaDB through Firewall and Allow traffic on Port 3306 – default mysql port
218 firewall-cmd –add-service=mysql –perm
220 firewall-cmd –reload
221 systemctl start mariadb
222 systemctl status mariadb
223 start mysql/mariadb
Run MySQL
224 mysql -u root -p
mysqldump is used to backup a database
mysql command can be used to restore a database
you can even use IDEs such as MySQL Workbench to backup and restore MySQL Databases
228 mysql -u root -p
229 mysqldump -u root -p testsayed > testsayeddb.sql
to restore – you need to use < testsayeddb.sql
231 mysql -u root -p testsayed < testsayeddb.sql
Backup and Restore MySQL Database
You can backup multiple databases at once, you can even backup some tables or other database objects using mysqldump
similarly, you can restore multiple databases at the same time using mysql command
just use multiple datbase or database object names with NO comma – one after another
235 mysqldump -u root -p DB1 DB2 DB3 > alldb.sql
when you use restore and give the sql file – if you use db name or table name before < then only that part will be restored irrespective hiow much data is there on the file
example
238 mysql -u root -p DB1 tbl1 < alldb.sql ;
you can use –all-databases or –databases with mysqldump command
Share this: From: http://sitestree.com/learn-some-centos-redhat-linux-rhce-mariadb-administration-on-redhat-fedora-centos/
Categories:
Tags:
Post Data:2021-01-24 20:25:57

    Shop Online: <a href='https://www.ShopForSoul.com/' target='new' rel="noopener">https://www.ShopForSoul.com/</a>
    (Big Data, Cloud, Security, Machine Learning): Courses: <a href='http://Training.SitesTree.com' target='new' rel="noopener"> http://Training.SitesTree.com</a> 
    In Bengali: <a href='http://Bangla.SaLearningSchool.com' target='new' rel="noopener">http://Bangla.SaLearningSchool.com</a>
    <a href='http://SitesTree.com' target='new' rel="noopener">http://SitesTree.com</a>
    8112223 Canada Inc./JustEtc: <a href='http://JustEtc.net' target='new' rel="noopener">http://JustEtc.net (Software/Web/Mobile/Big-Data/Machine Learning) </a>
    Shop Online: <a href='https://www.ShopForSoul.com'> https://www.ShopForSoul.com/</a>
    Medium: <a href='https://medium.com/@SayedAhmedCanada' target='new' rel="noopener"> https://medium.com/@SayedAhmedCanada </a>

Basic Information on Exception Handling in .Net #.Net Web Applications

Brought from our old site: http://salearningschool.com/displayArticle.php?table=Articles&articleID=1356&title=Basics%20of%20Exception%20Handling%20in%20.Net

Basic Information on Exception Handling in .Net

Why exception handling? In your applications, unexpected error situations may occur that are out of your application scope and your application logic. These are actually external to your application. For example, while you are reading a file from hard drive, the file may not be there; or the remote server may be too busy or unavailable to get back to you with the result of your query. Exception handling addresses such situations.

How can you handle such situations:

  • Use try, catch, finally structure to address such situations
  • Put the code where, you are anticipating an exception inside a try{} block. Put the code to handle the error situation in catch (Exception ex) {} blocks. You can have multiple catch blocks where each one will address a specific type of exception situation.
  • One more note, the code block where exception may occur may need to execute some logic/code whether an exception occurs or or not such as closing a file, closing the database connection. To accomplish this, you can use a finally block. A finally block is always executed, regardless of whether an exception is thrown or not.
  • When an exception occurs, the events are thrown by the environment. You need to address that if you want to. Else, your users will see the errors and will cause a bad user experience.
  • You can even throw exceptions on your own in your code. But why? say if you anticipate that there will be some error situations that are not external but related to your application logic and you actually do not want to handle those situations (serve some services in those situations for example) in your application. You can just throw exceptions and think that these are the conditions; you do not want to support in your application. Throw exception and provide some generalized response to your visitors.
  • You can also handle exceptions throw the web objects’ built in error events such as Page_Error, Global_Error, Application_Error.
  • In certain situations, You can take advantage of the error pages of the webserver to provide useful information to your visitors. You can replace the default error pages of your web-server and provide customized error pages to your visitor
  • Finally, you can use tracing to log the error events. Monitor the tracing to understand which types of situations occur more frequently than others. And find out a solution and apply the solution
  • It is possible to turn on and off this tracing without modifying the application code. You can make use of the web.config file configurations

Regarding error pages, you can provide your custom error pages for the standard HTTP error codes. Some codes are given below:204:No Content, 301:Moved, Moved Permanently, 302: Found, Redirect, 400:bad request, 401:unauthorized, 403: forbidden, 404:not found, 408:request time out, 500:internal server error, 503:service unavailable, 505:Http version not supported.

You can also make use of the errorPage attribute of the Page object to define an error page for the exceptions of that particular page. Page level settings override the application level settings (as provided by web.config file)

  • How to enable application level tracing: use something similar as below in your web.config file
    { and } are used instead of < and > respectively.
        {configuration}
            {system.web}
                {trace enabled="true" requestLimit="40" localOnly="false"/}
            {/system.web}
        {/configuration}
    
  • to enable tracing for a particular page, use the trace property of the Document object
  • how to write tracing information to the trace log: Trace.Warn()

From: http://sitestree.com/?p=3744
Categories:.Net Web Applications
Tags:
Post Data:2016-07-16 12:23:19

    Shop Online: <a href='https://www.ShopForSoul.com/' target='new' rel="noopener">https://www.ShopForSoul.com/</a>
    (Big Data, Cloud, Security, Machine Learning): Courses: <a href='http://Training.SitesTree.com' target='new' rel="noopener"> http://Training.SitesTree.com</a> 
    In Bengali: <a href='http://Bangla.SaLearningSchool.com' target='new' rel="noopener">http://Bangla.SaLearningSchool.com</a>
    <a href='http://SitesTree.com' target='new' rel="noopener">http://SitesTree.com</a>
    8112223 Canada Inc./JustEtc: <a href='http://JustEtc.net' target='new' rel="noopener">http://JustEtc.net (Software/Web/Mobile/Big-Data/Machine Learning) </a>
    Shop Online: <a href='https://www.ShopForSoul.com'> https://www.ShopForSoul.com/</a>
    Medium: <a href='https://medium.com/@SayedAhmedCanada' target='new' rel="noopener"> https://medium.com/@SayedAhmedCanada </a>

Encryption and .Net #.Net Web Applications

Brought from our old site: http://salearningschool.com/displayArticle.php?table=Articles&articleID=1355&title=Encryption%20and%20.Net

Encryption and .Net

Dot net provides rich support for data encryption. the namespace System.Security.Cryptography includes the encryption features.

There are three primary concepts related to encryption such as Hashing, Symmetric Encryption, and Asymmetric encryption. A hash is a data fingerprint, a small data that represents the uniqueness of a large block of data. In Symmetric Encryption, a single key is used for both encryption and decryption. In Asymmetric encryption, two different keys are used, one for encryption and another one for decryption. In real world applications, a combination of all three methods are used to provide better security.

A digital transmission of a check can be as follows: create the hash of the check, encrypt the hash with the public key using asymmetric encryption, apply the encrypted hash on the document, encrypt the symmetric encryption key with asymmetric encryption method, encrypt the check with symmetric encryption, transmit the encrypted key and encrypted document to the receiver

Hash Example

   hash = New Encryption.Hash(Encryption.Hash.Provider.CRC32)
   data = New  Encryption.Data("Hash Browns")
   hash.Calculate(data)

Symmetric example:

    sym = New Encryption.Symmetric(Encryption.Symmetric.Provider.Rijndael)
    key = New Encryption.Data("Pass")
    Encryption.Data encryptedData;
    encryptedData = sym.Encrypt(New Encryption.Data("Secret"), key)
    string base64EncryptedString = encryptedData.ToBase64

Asymmetric Example

  
        asym = New Encryption.Asymmetric
    pubkey = New Encryption.Asymmetric.PublicKey
    privkey = New Encryption.Asymmetric.PrivateKey
    asym.GenerateNewKeyset(pubkey, privkey)

    secret = "ancient chinese"
    Encryption.Data encryptedData
    encryptedData = asym.Encrypt(New Encryption.Data(secret), pubkey)
    Encryption.Data decryptedData 
    asym2 = New Encryption.Asymmetric
    decryptedData = asym2.Decrypt(encryptedData, privkey)

From: http://sitestree.com/?p=3742
Categories:.Net Web Applications
Tags:
Post Data:2016-07-16 12:15:58

    Shop Online: <a href='https://www.ShopForSoul.com/' target='new' rel="noopener">https://www.ShopForSoul.com/</a>
    (Big Data, Cloud, Security, Machine Learning): Courses: <a href='http://Training.SitesTree.com' target='new' rel="noopener"> http://Training.SitesTree.com</a> 
    In Bengali: <a href='http://Bangla.SaLearningSchool.com' target='new' rel="noopener">http://Bangla.SaLearningSchool.com</a>
    <a href='http://SitesTree.com' target='new' rel="noopener">http://SitesTree.com</a>
    8112223 Canada Inc./JustEtc: <a href='http://JustEtc.net' target='new' rel="noopener">http://JustEtc.net (Software/Web/Mobile/Big-Data/Machine Learning) </a>
    Shop Online: <a href='https://www.ShopForSoul.com'> https://www.ShopForSoul.com/</a>
    Medium: <a href='https://medium.com/@SayedAhmedCanada' target='new' rel="noopener"> https://medium.com/@SayedAhmedCanada </a>

A Simple ASP.Net Form in C#. Payment Information Collection Form #.Net Web Applications

Brought from our old site: http://salearningschool.com/displayArticle.php?table=Articles&articleID=1350&title=A%20Simple%20ASP.Net%20Form%20in%20C#.%20Payment%20Information%20Collection%20Form.

A Simple ASP.Net Form in C#. Payment Information Collection Form.

Such forms can be used to test payment processing API/Service before actually integrating. The input fields are to send data to the payment gateway. The response fields are to display response from payment gateway. Here, the output fields represent the response fields as sent by Paymentech gateway.

The Form

The CSS

Front end form code
From: http://sitestree.com/?p=3740
Categories:.Net Web Applications
Tags:
Post Data:2016-07-16 12:10:40

    Shop Online: <a href='https://www.ShopForSoul.com/' target='new' rel="noopener">https://www.ShopForSoul.com/</a>
    (Big Data, Cloud, Security, Machine Learning): Courses: <a href='http://Training.SitesTree.com' target='new' rel="noopener"> http://Training.SitesTree.com</a> 
    In Bengali: <a href='http://Bangla.SaLearningSchool.com' target='new' rel="noopener">http://Bangla.SaLearningSchool.com</a>
    <a href='http://SitesTree.com' target='new' rel="noopener">http://SitesTree.com</a>
    8112223 Canada Inc./JustEtc: <a href='http://JustEtc.net' target='new' rel="noopener">http://JustEtc.net (Software/Web/Mobile/Big-Data/Machine Learning) </a>
    Shop Online: <a href='https://www.ShopForSoul.com'> https://www.ShopForSoul.com/</a>
    Medium: <a href='https://medium.com/@SayedAhmedCanada' target='new' rel="noopener"> https://medium.com/@SayedAhmedCanada </a>

Allow Page Access only to the Logged in Users #.Net Web Applications

Brought from our old site: http://salearningschool.com/displayArticle.php?table=Articles&articleID=1349&title=Allow%20Page%20Access%20only%20to%20the%20Logged%20in%20Users

Allow Page Access only to the Logged in Users

From: http://sitestree.com/?p=3736
Categories:.Net Web Applications
Tags:
Post Data:2016-07-16 12:02:56

    Shop Online: <a href='https://www.ShopForSoul.com/' target='new' rel="noopener">https://www.ShopForSoul.com/</a>
    (Big Data, Cloud, Security, Machine Learning): Courses: <a href='http://Training.SitesTree.com' target='new' rel="noopener"> http://Training.SitesTree.com</a> 
    In Bengali: <a href='http://Bangla.SaLearningSchool.com' target='new' rel="noopener">http://Bangla.SaLearningSchool.com</a>
    <a href='http://SitesTree.com' target='new' rel="noopener">http://SitesTree.com</a>
    8112223 Canada Inc./JustEtc: <a href='http://JustEtc.net' target='new' rel="noopener">http://JustEtc.net (Software/Web/Mobile/Big-Data/Machine Learning) </a>
    Shop Online: <a href='https://www.ShopForSoul.com'> https://www.ShopForSoul.com/</a>
    Medium: <a href='https://medium.com/@SayedAhmedCanada' target='new' rel="noopener"> https://medium.com/@SayedAhmedCanada </a>

Creating your own Classes in C# in ASP.net #.Net Web Applications

Brought from our old site: http://salearningschool.com/displayArticle.php?table=Articles&articleID=1348&title=Creating%20your%20own%20Class%20in%20C#%20in%20ASP.net

Creating your own Class in C# in ASP.net

  • It is kind of simple. You need to create a class library. The class library will create a dll file. From your project, you need to add reference to the dll file. Then you will be able to use the classes and methods of the class library.
  • Check the following code. One is a sample class library and another one is how to use the class. The class library implements two methods such as add and subtract (to add or subtract two numbers). The project uses the namespace [class library] and calls these methods
  • You can get the dll file in the bin/debug or bin/release folder under your class library project
  • You can right click on your project/website [in solution explorer], and click Add Reference, then click browse and select the dll file created
  • Check the class library below
  • Check the Form in picture. This form uses the class library.
  • Check the Form Code to use the Library
  • Check the Backend Form Code to use the Library

From: http://sitestree.com/?p=3733
Categories:.Net Web Applications
Tags:
Post Data:2016-07-16 11:56:21

    Shop Online: <a href='https://www.ShopForSoul.com/' target='new' rel="noopener">https://www.ShopForSoul.com/</a>
    (Big Data, Cloud, Security, Machine Learning): Courses: <a href='http://Training.SitesTree.com' target='new' rel="noopener"> http://Training.SitesTree.com</a> 
    In Bengali: <a href='http://Bangla.SaLearningSchool.com' target='new' rel="noopener">http://Bangla.SaLearningSchool.com</a>
    <a href='http://SitesTree.com' target='new' rel="noopener">http://SitesTree.com</a>
    8112223 Canada Inc./JustEtc: <a href='http://JustEtc.net' target='new' rel="noopener">http://JustEtc.net (Software/Web/Mobile/Big-Data/Machine Learning) </a>
    Shop Online: <a href='https://www.ShopForSoul.com'> https://www.ShopForSoul.com/</a>
    Medium: <a href='https://medium.com/@SayedAhmedCanada' target='new' rel="noopener"> https://medium.com/@SayedAhmedCanada </a>

Simple Ajax Applications in C# (ASP.Net) #.Net Web Applications

Brought from: http://salearningschool.com/displayArticle.php?table=Articles&articleID=1347&title=Simple%20Ajax%20Applications%20in%20C#%20(ASP.Net)

Simple Ajax Applications in C# (ASP.Net)

Note:asmx web-service might be more appropriate in some/many cases

  • If you are coming from PHP or Java Platform where you use JavaScript or jQuery to provide Ajax functionality, you still can use those strategies in ASP.net to provide Ajax functionality
  • Check our short note on Ajax using JavaScript. In .Net, you just have to call the JavaScript function (that implements Ajax functionality) on the event you want the Ajax functionality. However, you do not use runat=”server”.
  • Another approach is Using Ajax Server Controls such as ScriptManager, ScriptManagerProxy, UpdatePanel, ContentPanel, UpdateProxy
  • You can find these Ajax controls at the Toolbox under Ajax Extensions
  • You can grab them and place on your form, you can grab and place on the code, or you can write them in your code [whatever you are used to]
  • And yes, you could use JQuery as well. JQuery uses a wrapper on JavaScript functionality and makes the life of the developer way easier
  • In this short note, I will show a simple example of using Ajax Server Controls, also show you the code to invoke Ajax functionality using JavaScript
  • Now take a look at the simple application interface below. The application will calculate sum, difference, and multiplication of two numbers without refreshing the page. We will calculate immediately, also will show the situation when the calculation may take a little more time
  • The idea is simple, you need to add a ScriptManager control. If you use master pages, and the situation becomes that you need to place two ScriptManagers, just place one ScriptManager in the Master and use ScriptManagerProxy in the content page
  • use UpdatePanel around the controls that will be refreshed without the page being refreshed
  • Use UpdateProgress control, when you know that the operation will take some time. Use this control to inform the user that the operation is under progress
  • Now the sample application interface
  • Now the Form code
  • Now the backend code
  • Now an example on how to implement Ajax functionality in C# in ASP.net using JavaScript. It just displays current date time but using Ajax and without refreshing the page. Just go through the code

From: http://sitestree.com/?p=3731
Categories:.Net Web Applications
Tags:
Post Data:2016-07-16 11:28:51

    Shop Online: <a href='https://www.ShopForSoul.com/' target='new' rel="noopener">https://www.ShopForSoul.com/</a>
    (Big Data, Cloud, Security, Machine Learning): Courses: <a href='http://Training.SitesTree.com' target='new' rel="noopener"> http://Training.SitesTree.com</a> 
    In Bengali: <a href='http://Bangla.SaLearningSchool.com' target='new' rel="noopener">http://Bangla.SaLearningSchool.com</a>
    <a href='http://SitesTree.com' target='new' rel="noopener">http://SitesTree.com</a>
    8112223 Canada Inc./JustEtc: <a href='http://JustEtc.net' target='new' rel="noopener">http://JustEtc.net (Software/Web/Mobile/Big-Data/Machine Learning) </a>
    Shop Online: <a href='https://www.ShopForSoul.com'> https://www.ShopForSoul.com/</a>
    Medium: <a href='https://medium.com/@SayedAhmedCanada' target='new' rel="noopener"> https://medium.com/@SayedAhmedCanada </a>

ASP.Net Validation Control Examples in C# #.Net Web Applications

Brought from: http://salearningschool.com/displayArticle.php?table=Articles&articleID=1325&title=ASP.Net%20Validation%20Control%20Examples%20in%20C#.

ASP.Net Validation Control Examples. Just check the code below

Some notes

  • RequiredFieldValidator: is used to check that a field is filled up
  • CompareValidator: Compare the value of a field with another field or data
  • RangeValidator: Compares the data is within a given range
  • RegularExpressionValidator: Domain name syntax, email addtress syntax
  • ValidationSummary: Display all validation errors in a summary box
  • CompareValidator: Write your own custom validation rules and display the outcome
  • Remember
    • You can display error on the side of the control
    • You can display error under the control
    • The example used both just for example
    • The Text property is the output that comes just where the validation control is placed. ErrorMessage propert is for the ValidationSummary
    • If you just want the Validation Summary output, use Display=”none” for the validation control (not the summarycontrol) itself
  • the code can be seen at http://salearningschool.com/samples/validate.txt as well
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="validation.aspx.cs" 
Inherits="validation" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Validation Control</title>
</head>
<body>   


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


        <asp:ValidationSummary ID="ValidationSummary1"
            HeaderText="Form Validation Summary"
            DisplayMode="BulletList"
            EnableClientScript="true"
             ForeColor = "Red"
            runat="server"
        />

        <asp:Label ID="lblFirstName" runat="server" Text="First Name:" 
        Width="120"></asp:Label>
        <asp:TextBox ID="txtFirstName" runat="server"></asp:TextBox>

        <asp:RequiredFieldValidator ID="firstNameValidator"
             ControlToValidate="txtFirstName"
             ErrorMessage="First Name Required"
             InitialValue=""
             Text=""
             Display ="None"
             runat="server"/>

        <br />

        <asp:Label ID="lblLastName" runat="server" Text="Last Name" Width="120">
        </asp:Label>
        <asp:TextBox ID="txtLastName" runat="server"></asp:TextBox>
        <br/>
        <asp:RequiredFieldValidator ID="RequiredFieldValidator1"
             ControlToValidate="txtLastName"
             ErrorMessage="Last Name Required"
             InitialValue=""
             Text="Last Name Required"            
             ForeColor="Red"
             runat="server"/>

         <br />

        <asp:Label ID="lblEmail" runat="server" Text="Email:" Width="120">
        </asp:Label>
        <asp:TextBox ID="txtEmail" runat="server"></asp:TextBox>

        <asp:RegularExpressionValidator ID="emailValidation" 
            runat="server" 
            ControlToValidate="txtEmail" 
            ErrorMessage="Invalid Fformat"              
            ValidationExpression="^([a-zA-Z][w.-]*[a-zA-Z0-9]@[a-zA-Z0-9][w.-]*[a-zA-Z0-9]
            .[a-zA-Z][a-zA-Z.]*[a-zA-Z]){1,70}$"
            ForeColor ="Red"            
         />
             
        <br />

        <asp:Label ID="lblPassword" runat="server" Text="Password" Width="120">
        </asp:Label>
        <asp:TextBox ID="txtPassword" runat="server" TextMode="Password">
        </asp:TextBox>
        <br />

        <asp:Label ID="lblPassword2" runat="server" Text="Re Enter Password" Width="120">
        </asp:Label>
        <asp:TextBox ID="txtPassword2" runat="server" TextMode="Password">
        </asp:TextBox>
        <br />

         <asp:CompareValidator ID="compareV" ControlToValidate="txtPassword" 
         ControlToCompare="txtPassword2" runat="server" Text="mismatchmatch" 
         ForeColor="Red" />

        <br />

        <asp:Button ID="btnSubmit" runat="server" OnClick="Button1_Click" Text="Submit" />

    </div>        
    </form>
</body>
</html>

From: http://sitestree.com/?p=3729
Categories:.Net Web Applications
Tags:
Post Data:2016-07-16 11:12:48

    Shop Online: <a href='https://www.ShopForSoul.com/' target='new' rel="noopener">https://www.ShopForSoul.com/</a>
    (Big Data, Cloud, Security, Machine Learning): Courses: <a href='http://Training.SitesTree.com' target='new' rel="noopener"> http://Training.SitesTree.com</a> 
    In Bengali: <a href='http://Bangla.SaLearningSchool.com' target='new' rel="noopener">http://Bangla.SaLearningSchool.com</a>
    <a href='http://SitesTree.com' target='new' rel="noopener">http://SitesTree.com</a>
    8112223 Canada Inc./JustEtc: <a href='http://JustEtc.net' target='new' rel="noopener">http://JustEtc.net (Software/Web/Mobile/Big-Data/Machine Learning) </a>
    Shop Online: <a href='https://www.ShopForSoul.com'> https://www.ShopForSoul.com/</a>
    Medium: <a href='https://medium.com/@SayedAhmedCanada' target='new' rel="noopener"> https://medium.com/@SayedAhmedCanada </a>

#Engineering: #Canada: #Job/Contract/Project: Any #Engineering: #Computer, #Electrical, #Electronics, #Civil, #Chemical, #Mechanical, #Naval, #Biomedical, and misc Engineering

Date Posted:2021-09-01 .Apply yourself, or submit others as candidates; Build a recruitment team to submit others as candidates; submit RFP to be considered for projects in future; Try to become a vendor so that you are asked to submit consultants/resources in future. If these work for you. This list is posted in this blog everyday provided there are new projects under the criteria

  1. air-conditioning-and-refrigeration-equipment-10016
  2. MECHANICAL COOLING ADDITION
  3. Supply And Installation Of Heating, Ventilation And Air Conditioning (Hvac) System Replacement, Electrical Upgrades
  4. communications-detection-and-fibre-optics-10031
  5. Electrical Consulting Services
  6. Upgrade Electrical Panels – Tender Ready
  7. construction-products-10032
  8. Electrical Consulting Services
  9. Upgrade Electrical Panels – Tender Ready
  10. electrical-and-electronics-10006
  11. Electrical Consulting Services
  12. food-preparation-and-serving-equipment-10012
  13. Electrical Upgrade
  14. industrial-equipment-10014
  15. The Seasonal Lease of Mechanical Sweepers
  16. machinery-and-tools-10015
  17. Upgrade Electrical Panels – Tender Ready
  18. textiles-and-apparel-10028
  19. Electrical Consulting Services
  20. Upgrade Electrical Panels – Tender Ready
  21. transportation-equipment-and-spares-10029
  22. The Seasonal Lease of Mechanical Sweepers
  23. architect-and-engineering-services-10048
  24. Engineering Services for Gladstone Avenue and Dovercourt Street Sewer Separation – Community of Chatham
  25. Engineering Services for Detailed Design and Contract Administration of Queensway Trunk Sewer Rehabilitation, Project 20-2443
  26. Engineering Services for the PRFN Bridge Replacement and Associated Works
  27. Engineering Consultant Services for Upgrades to Wastewater Treatment System at Lac Des Iles
  28. Vendor of Record – Electrical Engineering Consulting Services
  29. Engineering Consulting Services for Tenant Renovation
  30. Sewer Separation Program- Bayers Road Pocket and Bayne Street Stormwater Study- Engineering Services
  31. Consultant Engineering Services – Water Systems Reinforcement
  32. Engineering Support Services (F7044-190233/C)
  33. communications-photographic-mapping-printing-and-publication-services-10042
  34. Electrical Consulting Services
  35. Upgrade Electrical Panels – Tender Ready
  36. custodial-operations-and-related-services-10037
  37. Electrical Consulting Services
  38. environmental-services-10050
  39. Electrical Consulting Services
  40. Engineering Services for the Design of Former Rossville School Site Remediation
  41. Upgrade Electrical Panels – Tender Ready
  42. information-processing-and-related-telecommunications-services-10049
  43. Electrical Consulting Services
  44. maintenance-repair-modification-rebuilding-and-installation-of-goods-equipment-10054
  45. Upgrades to Victory School Building Mechanical System
  46. research-and-development-r-d-10036
  47. Engineering Consulting Services for Detailed Dam Break Flood Inundation Mapping
  48. utilities-10041
  49. Electrical Consulting Services
  50. Upgrade Electrical Panels – Tender Ready
  51. Request for Proposal for Engineering Services – 2021/2022 Active Transportation Plan
  52. undefined-10055
  53. Upgrades to Victory School Building Mechanical System
  54. Keywords Used:engineer,civil,mechanical,electrical,electronics,mechatronics,naval,biomedical,computer engineer,software engineer,civil engineer,biomedical,electrical engineer,electronics engineer,mechanical engineer,metallurgical,chemical engineer,industrial engineer,communications engineer,quality assurance engineer,Aerospace engineer,aeronautical engineer,Engineering manager,Agricultural Engineer,Automotive Engineer,Environmental Engineer,Geological Engineer,Marine Engineer,Petroleum Engineer,Acoustic Engineer,Acoustic Engineer,Aerospace Engineer,Agricultural Engineer,Applied Engineer,Architectural Engineer,Audio Engineer,Automotive Engineer,Biomedical Engineer,Chemical Engineer,Civil Engineer,Computer Engineer,Electrical Engineer,Environmental Engineer,Industrial Engineer,Marine Engineer,Materials Science Engineer,Mechanical Engineer,Mechatronic Engineer,Mining and Geological Engineer,Molecular Engineer,Nanoengineering,Nuclear Engineer,Petroleum Engineer,Software Engineer,Structural Engineer,Telecommunications Engineer,Thermal Engineer,Transport Engineer,Vehicle Engineer,engineering