Monday, April 6, 2020

How to get your Visual Studio 2017 product key.

Hi if you want product ket than you can easily get your Visual Studio product key. Just follow these simple steps.
1.) first of all open Open Registry. Click Start (windows icon) > regedit.

or type regedit inside Run window

HKEY_LOCAL_MACHINE > SOFTWARE > Wow6432Node > Microsoft > VisualStudio -> 14.0 > Registration > 2000.0×0000 > PIDKEY


This method worked for me, I hope this can help you guys :)


Thank you,
Arjun Walmiki








Friday, April 3, 2020

Web Application Project Option in Visual Studio 2005 Tutorial 2

Hi All,

This is continue Web Application Project Option in Visual Studio 2005 Tutorial 1 


Tutorial 2: Code-Behind with VS 2005 Web Application Projects

The below tutorial helps explain the code-behind model and project structure of pages built within VS 2005 Web Application Projects. Please make sure that you have already completed Tutorial 1: Building Your First Web Application Project before reviewing this one.

Some Background on the VS 2003 Code-behind Model for ASP.NET Applications


ASP.NET Pages in a VS 2003 web project have two files associated with them -- one is a .aspx file that contains the html and declarative server control markup, and the other is a .cs "code-behind" file that contains the UI logic for the page:


Control markup declarations are defined within the .aspx file itself.  For example:
<asp:Label  id="Label1" runat="server"></asp:Label>
And corresponding protected field declarations are added in the .cs code-behind class that match the name and type of controls defined within the .aspx file. For example:
protected System.Web.UI.WebControls.Label Label1:
ASP.NET does the work of wiring up a reference from this code-behind field declaration to point to the declared control in the .aspx file at runtime. Developers can then program directly against this control within their code-behind file. 

VS 2003 automatically adds/updates these protected control field declarations at the top of the code-behind file (these are updated everytime a developer switches into WYSIWYG design-view):
namespace Webapplication1
{
public class webform1:System.Web.UI.Page
{
protected System.Web.UI.WebControls.Button Button1:
protected System.Web.UI.WebControls.Label Label1:
}
private void page_Load (object sender ,System.EventArgs e)
{
}
VS 2003 also then maintains a hidden region block inside the code-behind of tool-generated code to register event-handlers and keep them in sync with the design-surface:
#region Web Form Designer generate code
overrride protected void OnInit (EventArgs e)
{
InitializeComponent();
base.OnInit(e);
}
private void InitializeComponent()
{
this.Button.Click +=new system.EventHandler(this.Button1_Click);
this.Load += new system.EventHandler(this.Load);
}
#endrigion
There are two common complaints/problems with this:
1) VS 2003 is adding/deleting code in the same file where the developer is authoring their own code -- and accidental conflicts/mistakes do end up happening (for example: some code that the developer writes can sometimes get modified or deleted by VS).  The tool-generated hidden block above is also a little "messy" for some people's tastes. 
2) The control-declarations are only updated when a develo#eper using VS 2003 activates the WYSIWYG page designer.  If a developer is only using the source-editor to customize the page, they will not get control updates, and will instead have to add these control declarations manually (which is a pain).

VS 2005 Code-behind Model for ASP.NET Applications

VS 2005 uses a code-behind model conceptually the same as VS 2003. Specifically, each .aspx page continues to inherit from a code-behind class that contains protected control field references for each control in the .aspx page:
What is different between VS 2003 and VS 2005 is that Visual Studio no longer injects its tool-specific wire-up code in the developer's code-behind file.  Instead, it takes advantage of a new language feature in C# and VB called "partial types" (or partial classes) to split the code-behind implementation across two files.  One of these partial class files is the developer-owned code-behind file that contains developer-written event-handlers and code for the page.  The other partial class file is then a tool-generated/maintained file that contains the protected control field declarations and the other design-time code that Visual Studio requires.  The benefit of splitting them out into two separate files at design-time is that it ensures that the code that VS creates and maintains never interferes (or deletes) code that a developer writes.  At compile-time, these files are compiled together and generate a single code-behind class. 
With the VS 2005 Web Application project model, the design-time partial class is generated and persisted on disk by VS 2005.  This new design-time partial-class file has the filename naming pattern: PageName.aspx.designer.cs.  If you expand any new page created within your VS 2005 Web Application project, you can see this file listed under the associated Page.aspx file along with the developer-owned code-behind file:
If you open up the code-behind file of the page (Default.aspx.cs), you'll then see the code-behind logic of the page -- which contains all of the code and event handlers that a developer writes (and no tool-generated "code-spit" content -- which means it stays very clean):
If you open the Default.aspx.designer.cs file, you'll then see the design-time code of the page -- which contains the field declarations for controls within the .aspx page:
Because the MyWebProject._Default class is marked as "partial" in both of the above two files, the compiler will merge them into a single generated class at compile-time. This means that any variable, method or field generated in the default.aspx.designer.cs file can be used from the default.aspx.cs code-behind file (just as if it was declared in the code-behind file itself). For example, within the Page_Load event handler we could easily add the below code that uses the "Label1" and "Calendar1" control:
This will compile clean and run just fine -- because the "Label1" and "Calendar1" field references have been defined within the default.aspx.designer.cs file.
When you do a build inside a VS 2005 Web Application project, all pages, user-controls, master pages (and their associated code-behind files+design-time generated files), along with all other standalone classes within the project are compiled into a single assembly. This is the same behavior as with VS 2003.
Click here to go to the next tutorial.



Creating ASP .NET Web Applications Using the SAP .NET Connector

The following example shows how to create a .NET project using Microsoft Visual Studio .NET. In the example, a client application reads and displays customer data from an SAP System using a search value and then displays it in a data grid.
The example uses the function module RFC_CUSTOMER_GET, which requires that customer data exist in the target SAP System, for example, in IDES. Although it is possible to rename all development objects and generated proxy classes, default names are used in this example. This example is provided as part of the connector sample code (DNCWebApp).

Procedure
...
       1.      Open Microsoft Visual Studio .NET.
       2.      To create a new C# Web form project choose New  New ProjectVisual C# Projects  ASP .NET Web Application.
 
You can also create a project in any other common programming language for .NET, for example, in Visual Basic .NET. In this case, you must add the SAP .NET proxy classes as a separate project in the Microsoft Visual Studio .NET solution.
 
       3.      Rename the form Webform1.aspx to Default.aspx.
       4.      Add Web controls to your Web form.
In our example, we add a TextBox, a Button and a DataGrid control.
       5.      Add proxy classes to connect the Web applications to your SAP server.
                            a.      In the Solution Explorer, right-click on your project.
                            b.      Choose Add  Add new item.
                            c.      Select Web Project Items  SAP Connector Class and choose Open.
The SAP .NET Connector Wizard opens.
                            d.      Decide from where you want to generate the proxy classes.
You can create proxies from:
         Web Services Description Language (WSDL) files that originate in an SAP interface repository (IFR)
         An SAP server
         Standard WSDL files
                            e.      Select the client proxy object type and select beautify names option.
                              f.      Select the Remote Function Modules (RFM) you want to use in your proxy object.
You can use search filters to look for the Remote Function Modules. In the example, enter the search argument RFC_CUST* in Name-Filter and select RFC_CUSTOMER_GET.
                            g.      Add the modules to your proxy object and choose Next.
The proxy classes for the referenced table and structure types are automatically created and added to the project.
       6.      Build the solution with Build  Build Solution.
       7.      Create an SAPLogin page to support user name and password authentication
                            a.      In the Solution Explorer, right-click on your project.
                            b.      Choose Add  Add New item.
                            c.      Select Web Project Items  SAP Login Form
Leave the name as SAPLogin1.aspx.
       8.      Set the system connection information in the destination object of the SAPLogin1.aspx page:
                            a.      In the Solution Explorer window find the item SAPLogin1.aspx and double-click on it to bring it up in the designer.
                            b.      Look for the component destination1 on the bottom of the form.
                            c.      Click on the destination component and set the properties for connecting to your SAP system (for example AppServerHost and SystemNumber). The other properties like client, Password and username will be set from the login page.
       9.      Databind the data grid to BRFCKNA1Table:
 
BRFCKNA1Table is the parameter of RFC_CUSTOMER_GET that contains the list of customers.
                            a.      Select SAP Table Wizard from the SAP proxy toolbox and Drag&Drop it to your working area. In the dialog box, select BRFCKNA1Table.
                            b.      Select the data grid, and under Properties change DataSource to BRFCKNA1Table using the drop down list.
                            c.      Customize the list of columns displayed on the data grid by modifying the Columns collection property.
   10.      On the default.aspx page, double-click the Button control you added earlier to create an event handler for the control.
   11.      Add the connect code to your project:
                            a.      SelectConnect code from the SAP proxy toolbox.
                            b.      Drag&Drop it in the source code of your event handler.
A fragment of sample code is then inserted. It connects to the SAP server using the authorization settings from the Proxy Wizard. Normally, you must change these settings.
The code should look something like this:
private void btnSearch_Click(object sender, System.EventArgs e)
      {
// Declare parameters here
SAPProxy1 proxy = new SAPProxy1();
try
{
proxy.Connection = SAP.Connector.SAPLoginProvider.GetSAPConnection(this);
// Call methods here
proxy.Rfc_Customer_Get("", txtCust.Text, ref brfcknA1Table1);
// Now update Data Bindings. On WinForms this will be automatic, on  // WebForms call the following line
this.DataBind();
}
catch(Exception ex)
 {
// If SAPLoginProvider.GetSAPConnection(this) cannot get a connection, // we might get an error.
// Normally this can be ignored as it will automatically will force a // relogon.
}
}
 
   12.      Build and run the application.
The browser window opens and you are redirected to your SAPLogin1.aspx login page.
   13.      Enter connection data (for example user, password and client).
 
If you select Save this login information will be stored as an encrypted cookie on your computer and will provide an alternative single sign-on capability the next time you wish to access the site. If you do not select Save, the login information will still be saved in the ASP .NET session state but will be lost once the browser is closed.
   14.      Enter a search argument, for example A* in the TextBox field and choose Search.
Your application connects to the SAP System and displays the requested data in the DataGrid.


Thank you 

Arjun Walmiki

Monday, March 30, 2020

How to deploy an ASP.NET Core app to a sub-folder inside Azure Web App (App Service).

If you don't know how to deploy application on azure app service kindly go refer this link 

By default Azure provides publish profiles for the Web App (To put files to the root of the domain). In our case, We wanted to deploy inside a sub-folder.

Suppose our web app name was demo-site and we want to web deploy the app under demo-site\sub-folder. To do that,

Download the publish profile.
Kindly refer this link

For upload the files we need filezilla or winscp i am using winscp  , you can install winscp from this link

follow this guide to get FTP credentials

when you installed winscp fill FTP details , Username and Password.

After successful login you have to upload the files in sub-folder. From source to target.

after upload successful Go to portal > demo-site App Service > Configuration > Path Mappings > Virtual applications and directories.

set sub-folder type = applications  Bowers the url.

Hope is work fine if facing any issue kindly send email to me.

Thank you,

Arjun Walmiki

How to deploy an ASP.NET Core app to Azure Web App (App Service)

Microsoft Azure app service is very famous recently i got task move my my azure VM host to app service.How to deploy an ASP.NET Core app to Azure Web App (App Service) or How to deploy an ASP.NET Core app to a sub-folder inside Azure Web App (App Service)pls refer this link

In this post i have show you "How to deploy an ASP.NET Core app to Azure Web App (App Service)".
I am using Visual code for web deploy.

 We want Azure App Service for Visual Studio Code (Preview)  Click here

when Azure App Service install and after login with your azure credential the screen are as below:-
In above screen i have already added my instance name.

We need to create workspace click in File => Add folder to workspace.
the screen are as below :-

Right click on folder select Deploy to web service option and select your app service rest of thing Azure will be take care.

Thank you

Arjun Walmiki





Saturday, March 21, 2020

How to determine the installed .NET Framework, .NET Core, and Functions Runtime versions in Azure App Services

 The Details for .NET Core and Functions, so I decided to write up a single post that covers all three.

First steps

The first thing we need to do is to open the Kudu Debug Console.
To do that, navigate to {yoursite}.scm.azurewebsites.net and then click on "Debug console" at the top. You can select either CMD or PowerShell.
Now that we have the console open...

.NET Framework

To find out the installed .NET Framework versions, type: ls "\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework"

ls -l and dir also work in place of ls, we're just listing the contents of the folder.
Or you can type: ls "\Program Files (x86)\dotnet\shared\Microsoft.NETCore.App"

Functions Runtime

For the installed Azure Functions Runtime versions, type: ls "\Program Files (x86)\SiteExtensions\Functions"

The Kudu console supports pasting via Control-V for the commands above.
You can also select the "System Drive" icon in the file browser section at the top of the page and then navigate to the respective folders by clicking the folder links. Using the file browser will automatically change the current working directory in the console.

Thank you

Understand what versions of .NET are supported on Azure App Service

So how do you check to see what version of the .NET Framework Azure App Services Supports?
One of the easiest ways that I know of it to use an existing website that you created that is hosted on Azure App Services and go to the Development Tools and Advanced Tools and open the Kudu Portal.


Then to go the Debug console and then CMD.

Type cd D:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework
Type dir
You'll see a list of the supported .NET Frameworks!
Thank you