Quantcast
Channel: Microsoft Techies
Viewing all 430 articles
Browse latest View live

IaaS PaaS SaaS

$
0
0
If you are working with Azure related projects, you will here....IaaS PaaS SaaS...
You will get confused about IaaS PaaS SaaS..
I will try to explain IaaS PaaS SaaS

IaaS : Infrastructure as a service
You will buy Infrastructure, mean you will buy Server, then you will install whatever you want. You can install Your Operating System, then you will install your software .Net, JAVA, SAP, SharePoint... any thing.  You cab deploy any application based on your OS and software installation.

PaaS :Platform as a service
You will buy one platform, mean you will get Server with pre installed operating system installed and pre installed software. No need to install any OS or any Software, you will get built in.
You can deploy your applications based on platform.

SaaS :Software as a Service
Everything will be service, if you want to use any software, you have to pay money for service based on usage and based on type service. You can't install any software. If you want to write a document, you need Office software, you have to take service of Office.

Example...



Disable IE Enhanced security configuration

$
0
0
First: It is not recommended to disable ie enhanced security configuration.
Second: Don’t use a web browser on a server.

Still if you want to use IE in server and disable ie enhanced security configuration.
Follow below steps..
Click on Server Manager. (You will find Server Manager icon after start icon)
Click on Local Server.
You will find : IE Enhanced Security Configuration
By default this one will be : On
Click On link: "On"
In the prompt, Select "Off" for admin and users.
Click Ok.


Windows Server 2012 Add new Administrator Account

$
0
0
Go to Control Panel
Click on User Accounts
Click on User Accounts
Click on Manage Another Account
Click on Add a user account
Enter Account name and password
Finish
Click on your new account.
Click on "Change the account type"
Select "Administrator"
Click on "Change account type"

K2 for SharePoint Tutorials: Expense Claim Approval Build

$
0
0

https://www.youtube.com/watch?v=wKDwTdaqF0A#t=13
https://www.youtube.com/watch?v=Osi0KZYaNvY
https://www.youtube.com/watch?v=svgcXXjXZeY
https://www.youtube.com/watch?v=veKKjJoUhuc
https://www.youtube.com/watch?v=y9uBxcZhVH8
https://www.youtube.com/watch?v=9bT6vpDO02M
https://www.youtube.com/watch?v=KhKhyX7WYAI

https://www.youtube.com/channel/UCe_842WPzxlDKgxquIa-eKg

Bulk File name change using powershell

$
0
0
First create ps.ps1 file and add below code.
Get-ChildItem -Filter "*New*" -Recurse | Rename-Item -NewName {$_.name -replace 'New','ooo' }
Now create a filenamechange.bat
add below code.
Powershell.exe -executionpolicy remotesigned -File  C:\Users\Admin\Documents\Test\ps.ps1
Now place 2 above files and your source files under C:\Users\Admin\Documents\Test
Run batch file.

C# XML Serialization and Deserialization

$
0
0
1.Create a Asp.Net web application.
2.Add a web page.
3.Add new xml file.
<?xml version="1.0" encoding="utf-8"?>
<CarCollection>
<Cars>
<Car>
<StockNumber>1020</StockNumber>
<Make>Nissan</Make>
<Model>Sentra</Model>
</Car>
<Car>
<StockNumber>1010</StockNumber>
<Make>Toyota</Make>
<Model>Corolla</Model>
</Car>
<Car>
<StockNumber>1111</StockNumber>
<Make>Honda</Make>
<Model>Accord</Model>
</Car>
</Cars>
</CarCollection>
Add above code in xml.
Now generate methods and properties for xml file using XML Schema Definition Tool (Xsd.exe)
Now open Visual Studio Command Prompt 2010 Administration mode.
Type xsd
you should get all help..
Generate the xsd file from xml, using below command.
C:\WINDOWS\system32>xsd C:\Users\Admin\Documents\Test\MyCars.xml
Generate the C# class file using below command.
C:\WINDOWS\system32>xsd C:\Users\Admin\Documents\Test\MyCars.xsd /c /out:C:\Users\Admin\Documents\Test
You will get MyCars.cs file under C:\Users\Admin\Documents\Test
Add MyCars.cs to your solution.
Build..should be no errors
In the webpage add button under button click write below code..
protected void btnCar_Click(object sender, EventArgs e)
{
CarCollection cars = null;
string path = "C:\\Users\\Admin\\Documents\\Visual Studio 2013\\Projects\\Testxml\\Testxml\\MyCars.xml";
XmlSerializer serializer = new XmlSerializer(typeof(CarCollection));
StreamReader reader = new StreamReader(path);
cars = (CarCollection)serializer.Deserialize(reader);
string strModel = cars.Items[0].Car[0].Model;
//You can read all properties....using for loop
//Start
CarCollection myCars = null;
using (XmlReader myReader = XmlReader.Create(path))
{
myCars = (CarCollection)serializer.Deserialize(myReader);
}
//End
}

Full code.....


Outlook Backup

$
0
0
  • Click the File tab.
  • In the Outlook Options window, click Advanced.
  • Click Export.
  • In the Import and Export Wizard, click Export to a file, and then click Next.
  • Click Outlook Data File (.pst), and then click Next.
  • Select the folder to export, and then click Next.
  • Click Browse, and then select the location where you want the new .pst file to be saved.
  • In the File Name box, type the name that you want to use for the new .pst file, and then click OK.
  • Click Finish

XML Schema Definition Tool (Xsd.exe)

$
0
0
Create any XML
Generate xsd using xml. Rfe: http://www.freeformatter.com/xsd-generator.html#ad-output
Now open Visual Studio Command Prompt 2010 Administration mode.
Type xsd
you should get all help..
C:\WINDOWS\system32>xsd C:\Users\Admin\Documents\Test\My.xsd /c /out:C:\Users\Admin\Documents\Test

Get selected checkbox using jquery

Difference between properties and attributes

$
0
0
The Difference between an Attribute and a Property To add or provide an additional perspective;
An Attribute is a descriptor of the Class (Class as opposed to instances or objects of the class) and are common/exists in, and of, all created instances of the class
whereas
A Property offers variance among instances/objects of the class.
For example, use an automobile as the class and think of different instances of an automobile:
Attributes: (these exist in all instances/cars)
1. 4 Wheels (hopefully!)
2. Headlights
3. Engine
4. Seats
Properties: (these allow variances in each instance/object)
1. Color [ Blue | Red | Grey ]
2. Rear Spoiler [ True | False ]
3. Engine Bore [ 5.7L | 5.0L ]
4. Seat Style: [ Leather | Cloth | Vinyl ]

C# string replace with escape characters

$
0
0


Input argumenets
#to=test@gmail.com #subject="Welcome to" #server=mail.gmail.com #port=8080 #from=from@gmail.com

#to="test@gmail.com" #subject="Welcome" #server="mail.gmail.com" #port="8080" #from="from@gmail.com"

#to=\"test@gmail.com\" #subject=\"Welcome\" #server=\"mail.gmail.com\" #port=\"8080\" #from=\"from@gmail.com\"

Expected input string to application.
#to=\"test@gmail.com\" #subject=\"Welcome\" #server=\"mail.gmail.com\" #port=\"8080\" #from=\"from@gmail.com\"

Application will get Input argumenets in any format of give 3 type, but business will work for only one type of format, so we have to manipulate rest of the 2 types to 3rd type.

Solution:
I am going to write one exe, to manipulate input args.
Open Visual studio
Create new console project: StringEscapeCharacters
Open: Program.cs file

Please find my code...


Now i have to pass arguments to my exe, i can to multiple ways..
1st way: Open solution explorer, right click on project.
Click on: Properties
Click on: Debug
Under Start Options:
Command line arguments: <Enter arguments>
Ex:
#to=test@gmail.com #subject="Welcome to exe" #server=mail.gmail.com #port=8080 #from=from@gmail.com


You will get out put as in the log file:C:\Temp\mylog.log
#to="test@gmail.com" #subject="Welcome to exe" #server="mail.gmail.com" #port="8080" #from="from@gmail.com"

2nd way passing args:
Build the application.
now go to bin/debug folder,
you will see: StringEscapeCharacters.exe
execute this exe from cmd and pass args.
ex: StringEscapeCharacters.exe #to=test@gmail.com #subject="Welcome to exe" #server=mail.gmail.com #port=8080 #from=from@gmail.com

C# switch statement string contains

Visual studio run as administrator shortcut prompting for password

$
0
0
Solution:
First make sure you have added the user as administrator, who is trying to open visual studio as administrator.
It should resolve the issue.
If still you are getting the prompting for password
Login to your system as local administrator.
Go to Control Panel
Click on User Accounts
Click on User Accounts
Click on Change User Account Control Settings
You will get a prompt
Scroll down the bar up to Never notify
Ok
Restart the system
Now try, your problem should resolve.

Generate xml files based on c# classes

Aras Innovator call C# dll

$
0
0
Create a class library from C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MyClass
{
    publicclassDemoClass
    {

        publicstring strMy = "";
        publicDemoClass(string s)
        {
            this.strMy = s;
        }

        publicstring GetMethod()
        {
            return"Hell world" + strMy;
        }

    }
}
Note: your class should be public.
Build
Copy the dll.
Go to Aras Server.
Paste your dll in this path: C:\Program Files (x86)\Aras\Innovator\Innovator\Server\bin
Now go to this path and open method-config.xml file.
C:\Program Files (x86)\Aras\Innovator\Innovator\Server\method-config.xml
In the xml file, go to this tag:
<MethodConfig> <ReferencedAssemblies>
Add new tag similar to : <name>$(binpath)/Conversion.Base.dll</name>
Now change dll name: ex: <name>$(binpath)/MyClass.dll</name>
Now in the same file, scroll down.
You will see name space section, where all .net name spaces are added.
Add your dll name space.
Ex: usingMyClass;
Do for all references.
Save.
Now Open Aras Innovator from web UI.
Go to Administration
Methods
Right click: New Method
Enter method name,
Select Server-side
Select C#















Now use below IOM code.
IOM Code.
MyClassobj=new MyClass ("Welcome from aras");
Innovator innovator = this.getInnovator();
return innovator.newResult( obj.GetMethod());
Check the syntax.








Run the code using.
ActionsàRun Server Method.
You will get output.

How to set above code to a Item?
First create an Action.
In the action àIt will ask name, enter name.
It will ask method, Enter method name which you have created in earlier.
Save.
Now go to item.
Search for any item ex: “Parts”
Now open part.
Unlock
Under actions, add new action.
Search for your action which you have created.
Save.
Now go to Design
Parts
Search for any part.
Right click on the part you will see your action name.

Click it.

Aras Innovator create a item using IOM (Innovator Object Model)

How to prevent XDocument from adding XML version and encoding information C#

A project with an Output type of Class Library cannot be started directly

$
0
0


Root cause: Your project Output type is : Class Library.
Solution: Your project Output Type either Console Application or Windows Application 

Steps:
Right click on project in Solution Explorer -> Properties.
In opened tab with properties, click on Application
You will find a comboBox marked with Output Type label.
Select either: Console Application or Windows Application

Converting a console application to a dll in c#

$
0
0
Right-click project -> Properties -> Output Type: 'Class Library'

Add SSIS to existing SQL Server 2014

$
0
0
Click on SQL server setup (Please note SSIS is not available in SQL server express edition. You need to have SQL server standard edition or higher)
Next Click on ‘New SQL server stand alone installation or add features to an existing installation”
Click Next
Again Click Next
Click on Add Feature to an existing instance of SQL server 2014 and click next
In next page scroll down and click the check box in front of ‘Integration services’ under Shared features
Click next
You will see the account under which SSIS will run, you can change it the service account you With which you run the SSIS later
Click Next
Features summary of SSIS installation will appear
Click Install
The last screen will show status as ‘Succeeded’
You can go to SQL server configuration manager to check that the Integration services are running
Open SQL server configuration manager
Click on SQL Server Services
You should see the SQL Server Integration services Running in the right panel
Viewing all 430 articles
Browse latest View live