Quantcast
Channel: MSDN Blogs
Viewing all 35736 articles
Browse latest View live

Lesson Learned #41: Using VNET with Azure SQL Database

$
0
0

Recently, I had multiple questions about the implementation of VNET in Azure SQL Database.

In this Chapter number 17 of our Azure Support Academy, we are going to cover in Spanish and English how to configure it and how it works. Also, we are going to explain the 3 different options within Azure SQL Server Firewall to protect the access to the data.

 

Enjoy!


Buildnummern-Übersicht Microsoft Dynamics NAV 2015

$
0
0

Stand: 22.04.2018

Folgend finden Sie eine aktuelle Auflistung der verfügbaren Buildnummern, aufsteigend sortiert, mit der dazu gehörigen offiziellen Beschreibung, KB Artikelnummer und Inhalt.

Download Microsoft Dynamics NAV Buildliste

Buildnummer Beschreibung KB Nummer Inhalt
37874 RTM n.a. Release aus dem Partnersource

38457

Cumulative Update 1

3013215

Application Files
DVD-Build

38798 Cumulative Update 2 3020885

Application Files
DVD-Build

39368 Cumulative Update 3 3024901

Application Files
DVD-Build

39663 Cumulative Update 4 3035986

Application Files
DVD-Build

40262 Cumulative Update 5 3039824

Application Files
DVD-Build

40459 Cumulative Update 6 3052226

Application Files
DVD-Build

40938 Cumulative Update 7 3058000

Application Files
DVD-Build

41370 Cumulative Update 8 3069272

Application Files
DVD-Build

41779 Cumulative Update 9 3075726

Application Files
DVD-Build

42222 Cumulative Update 10 3086434

Application Files
DVD-Build

42603 Cumulative Update 11 3091812

Application Files
DVD-Build

42951 Cumulative Update 12 3097767

Application Files
DVD-Build

43389 Cumulative Update 13 3106088

Application Files
DVD-Build

43887 Cumulative Update 14 3121037

Application Files
DVD-Build

44363 Cumulative Update 15 3130292

Application Files
DVD-Build

44973 Cumulative Update 16 3138205

Application Files
DVD-Build

45244 Cumulative Update 17 3145854

Application Files
DVD-Build

45483 Cumulative Update 18 3151020

Application Files
DVD-Build

45813 Cumulative Update 19 3157490

Application Files
DVD-Build

46054 Cumulative Update 20 3166286

Application Files
DVD-Build

46293 Cumulative Update 21 3172546

Application Files
DVD-Build

46580 Cumulative Update 22 3182130

Application Files
DVD-Build

46765 Cumulative Update 23 3188239

Application Files
DVD-Build

47039 Cumulative Update 24 3193867

Application Files
DVD-Build

47254 Cumulative Update 25 3202890

Application Files
DVD-Build

47438 Cumulative Update 26 3209073

Application Files
DVD-Build

47665 Cumulative Update 27 3216192

Application Files
DVD-Build

47871 Cumulative Update 28 4011764

Application Files
DVD-Build

48062 Cumulative Update 29 4014099

Application Files
DVD-Build

48308 Cumulative Update 30 4018439

Application Files
DVD-Build

48467 Cumulative Update 31 4021394

Application Files
DVD-Build

48614 Cumulative Update 32 4024640

Application Files
DVD-Build

48838 Cumulative Update 33 4034490

Application Files
DVD-Build

49000 Cumulative Update 34 4037307

Application Files
DVD-Build

49144 Cumulative Update 35 4040569

Application Files
DVD-Build

49321 Cumulative Update 36 4045669

Application Files
DVD-Build

49425 Cumulative Update 37 4052193

Application Files
DVD-Build

49576 Cumulative Update 38 4055890

Application Files
DVD-Build

49736 Cumulative Update 39 4058598

Application Files
DVD-Build

49969 Cumulative Update 40 4078577

Application Files
DVD-Build

50086 Cumulative Update 41 4091304

Application Files
DVD-Build

50217 Cumulative Update 42 4100767

Application Files
DVD-Build

How to generate the ‘hotfix directories’ from Microsoft Dynamics NAV

* KBArtikel wird in kürze veröffentlicht. // KBArticle will be released soon.

Hotfixes without a released KBArticle can be requested via a support request!

These postings are provided "AS IS" with no warranties and confer no rights. You assume all risk for your use.

Mit freundlichen Grüßen

Sebastian Röttel

Microsoft Dynamics Germany

Buildnummern-Übersicht Microsoft Dynamics NAV 2016

$
0
0

Stand: 22.04.2018

Folgend finden Sie eine aktuelle Auflistung der verfügbaren Buildnummern, aufsteigend sortiert, mit der dazu gehörigen offiziellen Beschreibung, KB Artikelnummer und Inhalt.

Download Microsoft Dynamics NAV Buildliste

 

Buildnummer Beschreibung KB Nummer Inhalt
42815 RTM n.a. Release aus dem Partnersource

43402

Cumulative Update 1

3106089

Application Files
DVD-Build

43897

Cumulative Update 2

3121038

Application Files
DVD-Build

44365

Cumulative Update 3

3130298

Application Files
DVD-Build

44974

Cumulative Update 4

3139364

Application Files
DVD-Build

45243

Cumulative Update 5

3145855

Application Files
DVD-Build

45480

Cumulative Update 6

3151017

Application Files
DVD-Build

45834

Cumulative Update 7

3157492

Application Files
DVD-Build

46045

Cumulative Update 8

3166287

Application Files
DVD-Build

46290

Cumulative Update 9

3172549

Application Files
DVD-Build

46621

Cumulative Update 10

3182131

Application Files
DVD-Build

46773

Cumulative Update 11

3188240

Application Files
DVD-Build

47042

Cumulative Update 12

3193868

Application Files
DVD-Build

47256

Cumulative Update 13

3202891

Application Files
DVD-Build

47444

Cumulative Update 14

3209072

Application Files
DVD-Build

47838

Cumulative Update 15

3216191

Application Files
DVD-Build

47864

Cumulative Update 16

4011762

Application Files
DVD-Build

48067

Cumulative Update 17

4014100

Application Files
DVD-Build

48316

Cumulative Update 18

4018438

Application Files
DVD-Build

48466

Cumulative Update 19

4021395

Application Files
DVD-Build

48628

Cumulative Update 20

4024641

Application Files
DVD-Build

48822

Cumulative Update 21

4034491

Application Files
DVD-Build

48992

Cumulative Update 22

4037308

Application Files
DVD-Build

49146

Cumulative Update 23

4040571

Application Files
DVD-Build

49326

Cumulative Update 24

4045670

Application Files
DVD-Build

49424

Cumulative Update 25

4052194

Application Files
DVD-Build

49575

Cumulative Update 26

4055891

Application Files
DVD-Build

49741

Cumulative Update 27

4058599

Application Files
DVD-Build

49968

Cumulative Update 28

4078578

Application Files
DVD-Build

50087

Cumulative Update 29

4091305

Application Files
DVD-Build

50221

Cumulative Update 30

4100768

Application Files
DVD-Build

How to generate the ‘hotfix directories’ from Microsoft Dynamics NAV

* KBArtikel wird in kürze veröffentlicht. // KBArticle will be released soon.

Hotfixes without a released KBArticle can be requested via a support request!

These postings are provided "AS IS" with no warranties and confer no rights. You assume all risk for your use.

Mit freundlichen Grüßen

Sebastian Röttel

Microsoft Dynamics Germany

Buildnummern-Übersicht Microsoft Dynamics NAV 2017

$
0
0

Stand: 22.04.2018

Folgend finden Sie eine aktuelle Auflistung der verfügbaren Buildnummern, aufsteigend sortiert, mit der dazu gehörigen offiziellen Beschreibung, KB Artikelnummer und Inhalt.

Download Microsoft Dynamics NAV Buildliste

 

Buildnummer Beschreibung KB Nummer Inhalt
13682 RTM n.a. Release aus dem Partnersource
14199 Cumulative Update 1 3209071 Application Files
DVD-Build
14767 Cumulative Update 2 3216190 Application Files
DVD-Build
15140 Cumulative Update 3 4011763 Application Files
DVD-Build
15601 Cumulative Update 4 4014101 Application Files
DVD-Build
16177 Cumulative Update 5 4018437 Application Files
DVD-Build
16585 Cumulative Update 6 4021396 Application Files
DVD-Build
16996 Cumulative Update 7 4024642 Application Files
DVD-Build
17501 Cumulative Update 8 4034492 Application Files
DVD-Build
17972 Cumulative Update 9 4037309 Application Files
DVD-Build
18197 Cumulative Update 10 4040570 Application Files
DVD-Build
18609 Cumulative Update 11 4045671 Application Files
DVD-Build
18976 Cumulative Update 12 4052195 Application Files
DVD-Build
19421 Cumulative Update 13 4055892 Application Files
DVD-Build
19831 Cumulative Update 14 4058600 Application Files
DVD-Build
20333 Cumulative Update 15 4078579 Application Files
DVD-Build
20784 Cumulative Update 16 4091306 Application Files
DVD-Build
21440 Cumulative Update 17 4100769 Application Files
DVD-Build

How to generate the ‘hotfix directories’ from Microsoft Dynamics NAV

* KBArtikel wird in kürze veröffentlicht. // KBArticle will be released soon.

Hotfixes without a released KBArticle can be requested via a support request!

These postings are provided "AS IS" with no warranties and confer no rights. You assume all risk for your use.

Mit freundlichen Grüßen

Sebastian Röttel

Microsoft Dynamics Germany

Buildnummern-Übersicht Microsoft Dynamics NAV 2018

$
0
0

Stand: 22.04.2018

Folgend finden Sie eine aktuelle Auflistung der verfügbaren Buildnummern, aufsteigend sortiert, mit der dazu gehörigen offiziellen Beschreibung, KB Artikelnummer und Inhalt.

Download Microsoft Dynamics NAV Buildliste

Buildnummer Beschreibung KB Nummer Inhalt
19349 RTM n.a. Release aus dem Partnersource
19846 Cumulative Update 1 4058601 Application Files
DVD-Build
20348 Cumulative Update 2 4078580 Application Files
DVD-Build
20783 Cumulative Update 3 4091307 Application Files
DVD-Build
21441 Cumulative Update 4 4100770 Application Files
DVD-Build

How to generate the ‘hotfix directories’ from Microsoft Dynamics NAV

* KBArtikel wird in kürze veröffentlicht. // KBArticle will be released soon.

Hotfixes without a released KBArticle can be requested via a support request!

These postings are provided "AS IS" with no warranties and confer no rights. You assume all risk for your use.

Mit freundlichen Grüßen

Sebastian Röttel

Microsoft Dynamics Germany

HRESULT Facility – By Name

$
0
0

HRESULT Facility

A HRESULT Error Code is a 32bit number with bits representing different purposes.

Bits 16-26 are the Facility. The Facility is the originating API.

Refer to HRESULT Facility - By Value for a table sorted by value.

Facility by Name

FACILITY Decimal Hex
FACILITY_AAF 18 0x12
FACILITY_ACCELERATOR 1536 0x600
FACILITY_ACS 20 0x14
FACILITY_ACTION_QUEUE 44 0x2C
FACILITY_AUDCLNT 2185 0x889
FACILITY_AUDIO 102 0x66
FACILITY_AUDIOSTREAMING 1094 0x446
FACILITY_BACKGROUNDCOPY 32 0x20
FACILITY_BCD 57 0x39
FACILITY_BLB 120 0x78
FACILITY_BLB_CLI 121 0x79
FACILITY_BLBUI 128 0x80
FACILITY_BLUETOOTH_ATT 101 0x65
FACILITY_CERT 11 0xB
FACILITY_CMI 54 0x36
FACILITY_COMPLUS 17 0x11
FACILITY_CONFIGURATION 33 0x21
FACILITY_CONTROL 10 0xA
FACILITY_DAF 100 0x64
FACILITY_DEBUGGERS 176 0xB0
FACILITY_DEFRAG 2304 0x900
FACILITY_DEPLOYMENT_SERVICES_BINLSVC 261 0x105
FACILITY_DEPLOYMENT_SERVICES_CONTENT_PROVIDER 293 0x125
FACILITY_DEPLOYMENT_SERVICES_DRIVER_PROVISIONING 278 0x116
FACILITY_DEPLOYMENT_SERVICES_IMAGING 258 0x102
FACILITY_DEPLOYMENT_SERVICES_MANAGEMENT 259 0x103
FACILITY_DEPLOYMENT_SERVICES_MULTICAST_CLIENT 290 0x122
FACILITY_DEPLOYMENT_SERVICES_MULTICAST_SERVER 289 0x121
FACILITY_DEPLOYMENT_SERVICES_PXE 263 0x107
FACILITY_DEPLOYMENT_SERVICES_SERVER 257 0x101
FACILITY_DEPLOYMENT_SERVICES_TFTP 264 0x108
FACILITY_DEPLOYMENT_SERVICES_TRANSPORT_MANAGEMENT 272 0x110
FACILITY_DEPLOYMENT_SERVICES_UTIL 260 0x104
FACILITY_DIRECT2D 2201 0x899
FACILITY_DIRECT3D10 2169 0x879
FACILITY_DIRECT3D11 2172 0x87C
FACILITY_DIRECTMUSIC 2168 0x878
FACILITY_DIRECTORYSERVICE 37 0x25
FACILITY_DISPATCH 2 0x2
FACILITY_DLS 153 0x99
FACILITY_DMSERVER 256 0x100
FACILITY_DPLAY 21 0x15
FACILITY_DXGI 2170 0x87A
FACILITY_DXGI_DDI 2171 0x87B
FACILITY_EAP 66 0x42
FACILITY_EAS 85 0x55
FACILITY_FVE 49 0x31
FACILITY_FWP 50 0x32
FACILITY_GRAPHICS 38 0x26
FACILITY_HTTP 25 0x19
FACILITY_INPUT 64 0x40
FACILITY_INTERNET 12 0xC
FACILITY_ITF 4 0x4
FACILITY_JSCRIPT 2306 0x902
FACILITY_LEAP 2184 0x888
FACILITY_LINGUISTIC_SERVICES 305 0x131
FACILITY_MBN 84 0x54
FACILITY_MEDIASERVER 13 0xD
FACILITY_METADIRECTORY 35 0x23
FACILITY_MOBILE 1793 0x701
FACILITY_MSMQ 14 0xE
FACILITY_NAP 39 0x27
FACILITY_NDIS 52 0x34
FACILITY_NULL 0 0x0
FACILITY_ONLINE_ID 134 0x86
FACILITY_OPC 81 0x51
FACILITY_P2P 99 0x63
FACILITY_P2P_INT 98 0x62
FACILITY_PARSE 113 0x71
FACILITY_PIDGENX 2561 0xA01
FACILITY_PLA 48 0x30
FACILITY_POWERSHELL 84 0x54
FACILITY_RAS 83 0x53
FACILITY_RESTORE 256 0x100
FACILITY_RPC 1 0x1
FACILITY_SCARD 16 0x10
FACILITY_SCRIPT 112 0x70
FACILITY_SDIAG 60 0x3C
FACILITY_SECURITY 9 0x9
FACILITY_SETUPAPI 15 0xF
FACILITY_SHELL 39 0x27
FACILITY_SOS 160 0xA0
FACILITY_SPP 256 0x100
FACILITY_SSPI 9 0x9
FACILITY_STATE_MANAGEMENT 34 0x22
FACILITY_STORAGE 3 0x3
FACILITY_SXS 23 0x17
FACILITY_SYNCENGINE 2050 0x802
FACILITY_TIERING 131 0x83
FACILITY_TPM_SERVICES 40 0x28
FACILITY_TPM_SOFTWARE 41 0x29
FACILITY_UI 42 0x2A
FACILITY_UMI 22 0x16
FACILITY_URT 19 0x13
FACILITY_USERMODE_COMMONLOG 26 0x1A
FACILITY_USERMODE_FILTER_MANAGER 31 0x1F
FACILITY_USERMODE_HYPERVISOR 53 0x35
FACILITY_USERMODE_SDBUS 2305 0x901
FACILITY_USERMODE_SPACES 231 0xE7
FACILITY_USERMODE_VHD 58 0x3A
FACILITY_USERMODE_VIRTUALIZATION 55 0x37
FACILITY_USERMODE_VOLMGR 56 0x38
FACILITY_USERMODE_VOLSNAP 130 0x82
FACILITY_USN 129 0x81
FACILITY_VISUALCPP 109 0x6D
FACILITY_WEB 885 0x375
FACILITY_WEB_SOCKET 886 0x376
FACILITY_WEBSERVICES 61 0x3D
FACILITY_WEP 2049 0x801
FACILITY_WER 27 0x1B
FACILITY_WIA 33 0x21
FACILITY_WIN32 7 0x7
FACILITY_WINCODEC_DWRITE_DWM 2200 0x898
FACILITY_WINDOWS 8 0x8
FACILITY_WINDOWS_CE 24 0x18
FACILITY_WINDOWS_DEFENDER 80 0x50
FACILITY_WINDOWS_SETUP 48 0x30
FACILITY_WINDOWS_STORE 63 0x3F
FACILITY_WINDOWSUPDATE 36 0x24
FACILITY_WINPE 61 0x3D
FACILITY_WINRM 51 0x33
FACILITY_WMAAECMA 1996 0x7CC
FACILITY_WPN 62 0x3E
FACILITY_WSB_ONLINE 133 0x85
FACILITY_WSBAPP 122 0x7A
FACILITY_XAML 43 0x2B
FACILITY_XPS 82 0x52

 

 

 

 

HRESULT Facility – By Value

$
0
0

HRESULT Facility

A HRESULT Error Code is a 32bit number with bits representing different purposes.

Bits 16-26 are the Facility. The Facility is the originating API.

Refer to HRESULT Facility - By Name for a table sorted by name.

Facility by Value

FACILITY Decimal Hex
FACILITY_NULL 0 0x0
FACILITY_RPC 1 0x1
FACILITY_DISPATCH 2 0x2
FACILITY_STORAGE 3 0x3
FACILITY_ITF 4 0x4
FACILITY_WIN32 7 0x7
FACILITY_WINDOWS 8 0x8
FACILITY_SECURITY 9 0x9
FACILITY_SSPI 9 0x9
FACILITY_CONTROL 10 0xA
FACILITY_CERT 11 0xB
FACILITY_INTERNET 12 0xC
FACILITY_MEDIASERVER 13 0xD
FACILITY_MSMQ 14 0xE
FACILITY_SETUPAPI 15 0xF
FACILITY_SCARD 16 0x10
FACILITY_COMPLUS 17 0x11
FACILITY_AAF 18 0x12
FACILITY_URT 19 0x13
FACILITY_ACS 20 0x14
FACILITY_DPLAY 21 0x15
FACILITY_UMI 22 0x16
FACILITY_SXS 23 0x17
FACILITY_WINDOWS_CE 24 0x18
FACILITY_HTTP 25 0x19
FACILITY_USERMODE_COMMONLOG 26 0x1A
FACILITY_WER 27 0x1B
FACILITY_USERMODE_FILTER_MANAGER 31 0x1F
FACILITY_BACKGROUNDCOPY 32 0x20
FACILITY_CONFIGURATION 33 0x21
FACILITY_WIA 33 0x21
FACILITY_STATE_MANAGEMENT 34 0x22
FACILITY_METADIRECTORY 35 0x23
FACILITY_WINDOWSUPDATE 36 0x24
FACILITY_DIRECTORYSERVICE 37 0x25
FACILITY_GRAPHICS 38 0x26
FACILITY_NAP 39 0x27
FACILITY_SHELL 39 0x27
FACILITY_TPM_SERVICES 40 0x28
FACILITY_TPM_SOFTWARE 41 0x29
FACILITY_UI 42 0x2A
FACILITY_XAML 43 0x2B
FACILITY_ACTION_QUEUE 44 0x2C
FACILITY_PLA 48 0x30
FACILITY_WINDOWS_SETUP 48 0x30
FACILITY_FVE 49 0x31
FACILITY_FWP 50 0x32
FACILITY_WINRM 51 0x33
FACILITY_NDIS 52 0x34
FACILITY_USERMODE_HYPERVISOR 53 0x35
FACILITY_CMI 54 0x36
FACILITY_USERMODE_VIRTUALIZATION 55 0x37
FACILITY_USERMODE_VOLMGR 56 0x38
FACILITY_BCD 57 0x39
FACILITY_USERMODE_VHD 58 0x3A
FACILITY_SDIAG 60 0x3C
FACILITY_WEBSERVICES 61 0x3D
FACILITY_WINPE 61 0x3D
FACILITY_WPN 62 0x3E
FACILITY_WINDOWS_STORE 63 0x3F
FACILITY_INPUT 64 0x40
FACILITY_EAP 66 0x42
FACILITY_WINDOWS_DEFENDER 80 0x50
FACILITY_OPC 81 0x51
FACILITY_XPS 82 0x52
FACILITY_RAS 83 0x53
FACILITY_MBN 84 0x54
FACILITY_POWERSHELL 84 0x54
FACILITY_EAS 85 0x55
FACILITY_P2P_INT 98 0x62
FACILITY_P2P 99 0x63
FACILITY_DAF 100 0x64
FACILITY_BLUETOOTH_ATT 101 0x65
FACILITY_AUDIO 102 0x66
FACILITY_VISUALCPP 109 0x6D
FACILITY_SCRIPT 112 0x70
FACILITY_PARSE 113 0x71
FACILITY_BLB 120 0x78
FACILITY_BLB_CLI 121 0x79
FACILITY_WSBAPP 122 0x7A
FACILITY_BLBUI 128 0x80
FACILITY_USN 129 0x81
FACILITY_USERMODE_VOLSNAP 130 0x82
FACILITY_TIERING 131 0x83
FACILITY_WSB_ONLINE 133 0x85
FACILITY_ONLINE_ID 134 0x86
FACILITY_DLS 153 0x99
FACILITY_SOS 160 0xA0
FACILITY_DEBUGGERS 176 0xB0
FACILITY_USERMODE_SPACES 231 0xE7
FACILITY_DMSERVER 256 0x100
FACILITY_RESTORE 256 0x100
FACILITY_SPP 256 0x100
FACILITY_DEPLOYMENT_SERVICES_SERVER 257 0x101
FACILITY_DEPLOYMENT_SERVICES_IMAGING 258 0x102
FACILITY_DEPLOYMENT_SERVICES_MANAGEMENT 259 0x103
FACILITY_DEPLOYMENT_SERVICES_UTIL 260 0x104
FACILITY_DEPLOYMENT_SERVICES_BINLSVC 261 0x105
FACILITY_DEPLOYMENT_SERVICES_PXE 263 0x107
FACILITY_DEPLOYMENT_SERVICES_TFTP 264 0x108
FACILITY_DEPLOYMENT_SERVICES_TRANSPORT_MANAGEMENT 272 0x110
FACILITY_DEPLOYMENT_SERVICES_DRIVER_PROVISIONING 278 0x116
FACILITY_DEPLOYMENT_SERVICES_MULTICAST_SERVER 289 0x121
FACILITY_DEPLOYMENT_SERVICES_MULTICAST_CLIENT 290 0x122
FACILITY_DEPLOYMENT_SERVICES_CONTENT_PROVIDER 293 0x125
FACILITY_LINGUISTIC_SERVICES 305 0x131
FACILITY_WEB 885 0x375
FACILITY_WEB_SOCKET 886 0x376
FACILITY_AUDIOSTREAMING 1094 0x446
FACILITY_ACCELERATOR 1536 0x600
FACILITY_MOBILE 1793 0x701
FACILITY_WMAAECMA 1996 0x7CC
FACILITY_WEP 2049 0x801
FACILITY_SYNCENGINE 2050 0x802
FACILITY_DIRECTMUSIC 2168 0x878
FACILITY_DIRECT3D10 2169 0x879
FACILITY_DXGI 2170 0x87A
FACILITY_DXGI_DDI 2171 0x87B
FACILITY_DIRECT3D11 2172 0x87C
FACILITY_LEAP 2184 0x888
FACILITY_AUDCLNT 2185 0x889
FACILITY_WINCODEC_DWRITE_DWM 2200 0x898
FACILITY_DIRECT2D 2201 0x899
FACILITY_DEFRAG 2304 0x900
FACILITY_USERMODE_SDBUS 2305 0x901
FACILITY_JSCRIPT 2306 0x902
FACILITY_PIDGENX 2561 0xA01

Small Basic – Draw Circle Game

$
0
0

I made a game how accurate circle to draw with mouse.  The program ID is FGM527.

Screen shot of a program Draw Circle Game 0.1

Usage:

  1. Draw a circle with mouse.
  2. Push [OK] button.
  3. Check your score.
  4. Push [OK] button to continue.

Have fun with a Small Basic game!


Azure Bot Function

$
0
0

Here are the simplified steps to start developing Azure Bot Function. In this blog post we will create a test bot that talks to LUIS and QnA Maker. LUIS will help us understand user’s natural language. QnA Maker will help us answer user’s frequently asked questions.

In this sample Bot, we will convert temperature from Fahrenheit to Celsius. We will use LUIS to understand user intent and extract temperature value and unit information. We will use QnA Maker to answer user questions on temperature conversion.

Here is link to add this test Bot to your Skype and Microsoft Teams and play with web chat
https://wabacbotweb.azurewebsites.net/
Trying typing 80 f to c in the chat window

Here are high level steps :

  1. Create a Bot Function App
  2. Test Bot
  3. Add current time to this Bot App
  4. Create a LUIS App
  5. Add LUIS as Dialog in Bot Function App
  6. Test Bot for LUIS commands
  7. Add this Bot to a website
  8. Add this Bot to Skype
  9. Add this Bot to Microsoft Teams

 

Step 1 : Create a Bot Function App

  1. Log into Azure Portal
  2. Click on “Create a resource” on the top left navbar
  3. Type Bot in search box
  4. Click on the “Functions Bot”
  5. Click on Create button
    BotFunction_Create
  6. Click Create button

Step 2 : Test this Bot

  1. In the Azure Portal, click on the Bot Services from the left navbar
  2. If the Bot Service is missing , click on the All Services, search for Bot and click on the star icon as shown belowFavorites
  3. Now, click on the newly created Bot
  4. In the next blade, click on the Test in Web Chat
  5. Type Hello in the chat window as shown belowWebChat
  6. Our test bot will reply with text “1: You said hello
  7. 1” in the reply is count of messages it got from user in that session
  8. if you type hello again, you should see “2: You said hello” as shown below
    WebChat_Count

Step 3 : Lets add current time to Bot

  1. Click Build
  2. Click Open this bot in Azure Functions as shown belowBuild_OpenCode
  3. This will open Azure Function blade. Here you can edit your Bot code and settings
  4. Click on the messages Function, this should open your Bot source code
  5. Check line # 48, here we are calling EchoDialog if there is a message from userfunction_code
  6. Lets check EchoDialog class code
  7. Click on the View files on the right navbar and select EchoDialog.csx file as shownViewFiles
  8. Add below code
    
    
    else if (message.Text == "time")
    {
        await context.PostAsync($"{this.count++}: current time is {DateTime.Now}");
        context.Wait(MessageReceivedAsync);
    }
    else
    {
        await context.PostAsync($"{this.count++}: You said {message.Text}");
        context.Wait(MessageReceivedAsync);
    }
    
    
  9. Here is the complete function codecode_time
  10. Now we are going to test it in the Web Chat
  11. Open a new browser window, go to Azure Portal, click Bot Service, click on your Bot Function, click on Test in Web Chat
  12. In the chat window, type time . You should now see the current time as shown belowWebChat_time

 

Step 4 : Create LUIS App

  1. Open a new browse window and go to LUIS portal (luis.ai)
  2. Click on Login/Sign Up button, login using your Microsoft Account
  3. Now, click on the "Create New App” button as shown belowLuis_newapp
  4. Enter a app name and description as shown below and click on the done button
  5. Luis_newapp_dlg
  6. Next, we are going to add Entities to capture temperature data from user’s messages
  7. We have three variables to capture :
    1. Temperature Value
    2. Current Temperature Unit (Fahrenheit or Celsius)
    3. Temperature Unit to convert
  8. Lets create these three entities in LUIS
  9. Click on the Entities on the left navbar and click on Create new entity as shown belowentities_newmenu
  10. In the new Entity dialog box type a name and set the type to simple as shown below
  11. Luis
  12. Create two more, one for TemperatureUnitTo and TemperatureValue as shown
  13. Luis.1
  14. Next, we need to create Intents. At this time there will be only one intent : convert temperature between units
  15. Luis.2
  16. Now, let train LUIS by providing few sample sentences
    1. Convert 100 f to c
    2. Convert 100 c to f
    3. Change 100 f to c
    4. Change 100 c to f
    5. What is 100 c in f
    6. What is 100 f in c
    7. 100 f in c
    8. 100 c in f
  17. Here is the screenshot
  18. Luis.3
  19. For each of this sample sentences, tell LUIS which is TemperatureValue, TemperatureUnitFrom and TemperatureUnitTo
    1. Convert 100 f to c
    2. 100 is TemperatureValue
    3. f is TemperatureUnitFrom
    4. c is TemperatureUnitTo
  20. Here is the screenshot
  21. Luis.4
  22. Now, lets build LUIS and test it
  23. In the top menu, click on the Train button
  24. Next, click on the Test button. In the test textbox type “75 f to c” and hit enter, click on the inspect as shown
  25. check the entities values
  26. Luis.8
  27. Now lets publish this LUIS service, click on the publish menu item and click on “publish to production slot” as shown
  28. Luis.9
  29. Once published, you should see the keys available below as shown
  30. Luis.10
  31. Copy these keys, we need them in the next step

 

 

Step 5 : Add LUIS as Dialog to Bot

  1. Go back to Azure portal, navigate to Bot services, click on the Build and click on the “Open this bot in Azure Functions
  2. Add a new file and name it as TemperatureLuisDialog.csx
  3. Add this below code
  4. Add the LUIS key in Line # 10
  5. Note in line # 37,41 and 45, we are using LUIS API to get our temperature value and units
  6. using System;
    using System.Threading.Tasks;
    using Microsoft.Bot.Builder.Dialogs;
    using Microsoft.Bot.Builder.Luis;
    using Microsoft.Bot.Builder.Luis.Models;
    using Microsoft.Bot.Connector;
    using System.Threading;
    
    [Serializable]
    [LuisModel("54201f7e-4b88-4686-841c-5f47364eb875", "737bf507949b4bada390bf914b41176d")]
    public class TemperatureLuisDialog : LuisDialog<object>
    {
    
        // Name of  entity
        public const string Entity_TemperatureUnitTo = "TemperatureUnitTo"; // fahrenheit";
        public const string Entity_TemperatureUnitFrom = "TemperatureUnitFrom"; //celsius";
        public const string Entity_TemperatureValue = "TemperatureValue"; //100";
    
        // methods to handle LUIS intents
    
        [LuisIntent("")]
        public async Task None(IDialogContext context, LuisResult result)
        {
            string message = $"try 100 f to c";
            await context.PostAsync(message);
            context.Wait(MessageReceived);
        }
    
        [LuisIntent("Convert")]
        public async Task SerialNumber(IDialogContext context, LuisResult result)
        {
            string tempTo = "not found";
            string tempFrom = "not found";
            string tempValue = "not found";
    
            EntityRecommendation entity;
            if (result.TryFindEntity(Entity_TemperatureUnitTo, out entity))
            {
                tempTo = entity.Entity;
            }
            if (result.TryFindEntity(Entity_TemperatureUnitFrom, out entity))
            {
                tempFrom = entity.Entity;
            }
            if (result.TryFindEntity(Entity_TemperatureValue, out entity))
            {
                tempValue = entity.Entity;
            }
            /*
            [°C] = ([°F] - 32) × 5/9
            [°F] = [°C] × 9/5 + 32
            */
            double d = 0.0, t = 0.0;
    
            if (double.TryParse(tempValue, out d))
            {
                if (tempTo.Contains('f') || tempTo.Contains('F'))
                {
                    t = ((d * 9) / 5) + 32;
                }
                else
                {
                    t = ((d - 32) * 5) / 9;
                }
            }
            string answer = String.Format("{0:0.00}", t);
    
            //string message = $"{answer}";
            string message = $"answer={answer} ; tempTo={tempTo} ; tempFrom={tempFrom} ; tempValue={tempValue}";
            await context.PostAsync(message);
    
            context.Wait(this.MessageReceived);
        }
    } 
    

Step 6 : Test Bot for LUIS commands

  1. Go back to Azure portal, navigate to Bot Services, click on Test WebChat
  2. type 66 f to c
  3. you should see 18.89 as answer shown below
  4. Luis.11

 

 

Step 7 : Add this Bot to a website

  1. In the Azure portal, navigate to Bot Services, click on your Bot and click on Channels
  2. Add these three channels
    1. Web
    2. Skype
    3. Microsoft Teams
  3. bot.1
  4. Next click on the “Get bot embed codes” as shown below
  5. bot2
  6. Copy the embed codes for each one of them as shown
  7. bot.3
  8. Create a Azure Website and in the default.html page, add all three embed codes as shown
  9.  
    <a href='https://join.skype.com/bot/b485e689-665a-493b-8501-723c659c0826'>
    <img src='https://dev.botframework.com/Client/Images/Add-To-Skype-Buttons.png'/></a>
    
    
    <hr>
    
    
    <a href='https://teams.microsoft.com/l/chat/0/0?users=28:b485e689-665a-493b-8501-723c659c0826'>
    <img src='https://dev.botframework.com/Client/Images/Add-To-MSTeams-Buttons.png'/></a>
    
    
    <hr>
    
    
    <iframe src='https://webchat.botframework.com/embed/wabac?s=Y60jzKS3B8g.cwA.iIw.ijI4IqVhAKy_6DjJFoW31cz4sO_nPoswbyzrS_H6mf4' width="400" height="400">
    </iframe>
    
  10. Now browse to the test website, in the chat window type “100 f to c
  11. Should see the temperature value in Celsius as shown
  12. bot.4

 

Step 8 : Add this Bot to Skype

  1. At this above test website, click on the “Add to Skype”
  2. Wabac Bot will be added to your Skype account as shown
  3. type 100 f to c and check the return value
  4. bot.5

 

Step 9 : Add this Bot to Microsoft Team

  1. At this above test website, click on the “Add to Teams”
  2. Wabac Bot will be added to your Microsoft Teams
  3. type 100 f to c and check the return value
  4. bot.6

Deploying Linked ARM Templates with VSTS

$
0
0

Overview

When dealing with deploying a large number of components in Azure, a single ARM template might be challenging to manage and maintain.  ARM linked templates allow you to make your deployment more modular making the templates easier to manage.  When dealing with large deployments, it is highly recommended to consider breaking down your deployment into a main template and multiple linked templates representing different components of your deployment.

Deploying ARM templates can be performed using a number of methods such as using PowerShell, Azure CLI and Azure Portal.  A recommended approach however is to adopt one of DevOps practices, namely Continuous Deploy.  VSTS is an application lifecycle management tool hosted in the cloud and offered as a service.  One of the capabilities VSTS offers is Release Management.

In this blog I will detail how you can deploy linked ARM templates using Release Management feature of VSTS.  In order for the linked templates to be deployed properly, they will need to be stored in a location that can be reachable by Azure Resource Manager.   A location that fits the bill here is Azure Storage; so we will show how Azure Storage can be used to stage the ARM template files.  I will also show some recommended practices around keeping secrets protected leveraging Azure Key Vault.

The scenario I will walk through here is to deploy VNet with a Network Security Group (NSG) structured as linked templates.  We will use VSTS to show how Continuous Deployment can be setup to enable teams to continuously update Azure with new changes each time there is a modification to the template.

Creating Azure Storage Account

  • Login to Azure portal and create an Azure Storage account following the steps documented here. Specify the parameters as shown below.  Make sure the Name is unique.

  • Once deployment is done, go to the storage account and click on Shared access signature then click on Generate SAS and connection string. Copy the SAS token generated and keep it handy as we will use it later
  • Go to the storage account Overview page and then click on Blobs
  • Add a Container called “armartifacts” as shown below

  • Once the container is created, click on it and go to Container properties. Copy the URL field and keep it handy.  We will need it later as well

 

Protecting Secrets with Azure Key Vault

  • In the Azure portal, create an Azure Key Vault resource
  • Click on the Azure Key Vault you just created and click on Secrets
  • Click on Generate/Import to add the SAS Token
  • For name, enter “StorageSASToken” and enter the Azure Storage shared access signature key you copied in a previous step to the Value field
  • Click Create

 

Linking Azure Key Vault to VSTS

  • Login to your VSTS account. If you don’t have one, you can create one for free here
  • Go to Build and Release hub in VSTS and click Library
  • In Variable Group name field enter “AzureKeyVaultSecrets”
  • Toggle “Link secrets from an Azure key vault as variables”
  • Select your Azure subscription and then the Azure key vault you created earlier and click Authorize
  • Once authorization is successful you can add variables by clicking “Add” and you should be presented with the option to add references to the secrets in the Azure key vault. Once you added the reference to the StorageSASToken, click Save.

 

Set-up Continuous Deployment using VSTS

At this point we should have everything in place to deploy our linked template to Azure.  To setup the deployment pipeline, login to VSTS and click on Build and Release then Releases then create a release definition.  Select an empty process and name your environment Production.  For artifact, point to your GitHub account

  • To enable Continuous deployment, click on trigger button and toggle Continuous deployment trigger

 

  • Click Variables then Variable groups then click on Link variable group. Select the AzureKeyVaultSecrets variable group that you created in an earlier step
  • Add a variable called AzureBlobStorageURL and paste in the value from the url you copied earlier when you created the Azure Storage account
  • Add a variable called blobContainerName and put the name of your Azure blob container
  • Add a variable called StorageAccountName and put the name of your Azure storage account

 

  • In the release tasks, create the following steps:

 

  • Once steps are added, click save and kick-off a release. The release should finish successfully

 

  • Check Azure and you should see the VNet with NSG created

 

We have just showed how you can break down your ARM template and make it more modular by transforming it into Linked ARM template.  We have also walked through how you can use VSTS to continuously deploy your linked template and enabling the release process to read the SAS key from Azure Key Vault while deploying the template.

I hope you found this blog useful.  Please leave feedback on how this can be made better.

How to Add the OMS Client to a VM Scale Set

$
0
0

Premier Developer Consultant Tim Omta shares a PowerShell script he used to add the OMS client to an Azure VM ScaleSet.


I was asked by a customer to add the OMS client to an Azure VM ScaleSet (VMSS). This is not documented directly for a VMSS, though it is for Azure VMs. After some asking around and some experimentation, I was able to successfully deploy the OMS agent to the VMSS using PowerShell.

Read further details regarding the PowerShell script Tim used on his post here.

Rotate the expired or nearly expired SSL certificate on your subscription’s one-box environments

$
0
0

On April 23 2018 17:00:00 UTC, the SSL certificate on one-box environments that are under your subscription and not managed by Microsoft, will expire. Project owners or Environment managers can rotate the certificate from LCS.

If you do not rotate the certificate, when you try to use Dynamics 365 for Finance and Operations or Dynamics 365 for Retail, you will receive an error that your certificate is not valid.

To rotate the certificate, complete the following steps on each Environment page in LCS.

Note: Complete these steps only on environments that are under your subscription.

  1. Log in to https://lcs.dynamics.com and navigate to Cloud Hosted Environments page in your project.
  2. Select an environment, and in the right pane click Full Details
  3. On the Environment details page, click Maintain > Rotate secrets. Please note that this option will only show for environments in the Deployed state. If your environment is in the Stopped state, you will need to Start it first to see this option.

  4. Select Rotate the SSL certificates and confirm that you want to perform this action. Note that rotating the SSL certificate can't be reversed.

  5. After the certificate rotation is complete, the environment history will be updated. You can view the history by clicking History > Environment changes on the Environment details page.

 

クラウドホスト環境のSSL証明書期限切れ

$
0
0

お客様/パートナー様のサブスクリプション上で稼働しているクラウドホスト環境の中で

4月15日以前にデプロイされた環境のSSL証明書が4月23日午後5時(UTC)に期限切れになります。

 

御手数ですが、こちらの手順を御参考に証明書を更新ください。

< Rotate the expired or nearly expired SSL certificate on your subscription’s one-box environments>

https://blogs.msdn.microsoft.com/lcs/2018/04/22/rotate-the-expired-or-nearly-expired-ssl-certificate-on-your-subscriptions-one-box-environments/

 

対象環境の管理者の方には以下のタイトルのメールが届いています。

ACTION REQUIRED: Rotate nearly expired/expired SSL Certificate on your One-box environments under your subscription

 

今回は直前での連絡となり誠に恐縮ですが、今後はもっと早い時期に連絡できるように開発チームも検討しています。

また、複数の環境の証明書を一度に更新する方法はございません。

もし、SSL証明書の入れ替え中にエラーが発生した場合は、LCSの言語設定を英語(米国)に変更して再実行することで解決するか御確認ください。

Episode 6: IT IQ Series – Three digital platforms to enhance your classroom

$
0
0

Summary: Teachers can use online assessments, artificial intelligence and augmented reality to take existing lessons to the next level–but they shouldn’t forget the basics of classroom management when doing so. 

Digital technology can help teachers do many new things–but also transform the very basics of classroom learning. When done wisely, the results speak for themselves: Bentley Park College in Queenslandfor example, saw graduation rates increase from 55% to 100% as they embedded new technologies in their lessons and school infrastructure. Here are three digital platforms which have already begun to take everyday lessons to the next level: 

  1. Online assessments 

Are the days of paper-and-pen tests numbered? More and more exams are moving to the screen for faster, more accurate assessment. Take the National Assessment Program – Literacy and Numeracy (NAPLAN) test, for example, which will transition from paper to online tests from May 2018.  

The same principles can apply to any class test, not just nationwide ones. The Take a Test app run on Windows 10, for example, allows teachers to create a simple quiz on Microsoft Forms and share the link on OneNote. “Students take the test in a secure lock-down environment with no access to other sites and apps, while functions like cut and paste and screen printing are automatically disabled,” explains Jesse Cardy, a Microsoft Solutions Specialist for the education industry 

“Most importantly, online test platforms give you the same rigour of testing but with far less hassle. Teachers can be confident that students can focus on the tests in a kiosk mode that is free of distractions, while also having results automatically captured and tabulated in the back end. In other words, you spend far less time on marking.” That, in turn, allows for shorter and more frequent tests–which in turn help teachers pinpoint issues and give students the help they need before they fall behind. 

 2. Artificial Intelligence (AI) 

Many Australian schools already have some form of basic AI in place, often to automate day-to-day processes. But what about using it to bring life to STEM classes? When paired with robotics or programming, AI not only adds an extra challenge for students, but also lets teachers demystify how it works. Year 6 students at Ravenswood School, for example, learnt the principles of AI by using it to program a robot that plays lawn bowls, an exercise that not only encouraged curiosity in the field but showed them just how simple it was to learn.  

The cognitive function of AI, which allows for features like emotion, facial and speech recognition, also helps educators in another area of learning: distance education. Functions like speech-to-text can caption and translate online lectures with much less time or effort than humans can. Voice recognition, when paired with virtual assistants like Cortana on Windows 10, can also support students by answering basic questions or referring them to the right educators. 

“AI’s abilities might sound like science fiction sometimes, but they have practical applications at every level of education,” says Cardy. “The most important thing to remember is that your AI platforms all need the right data to operate effectively. Using AIs that fit seamlessly with your OS or other learning platforms will make a big difference to how well they function in the classroom, no matter where you embed them in your approach to teaching.” 

 3. Augmented Reality (AR)  

Augmented reality has perhaps the greatest potential to change everyday teaching as we know it. Unlike virtual reality, AR uses computer-generated images that are superimposed onto physical objects. By adding animation, narration, and other data to ordinary classroom items like textbooks, AR can bring almost any subject–from ancient history to marine biology–to life. At the same time, it can help students to visualise concepts in weightier theoretical subjects–like advanced maths or physics–and understand them more comprehensively.  

AR creates a truly immersive environment that can make learning more engaging, fun, and effective,” says Cardy. Some subjects, like 3D geometry, really don’t come across easily in a 2D environment like a textbook. But when you can visualise these objects using AR, students can not only see but also manipulate them. That turns an abstract, complex lesson into one that’s far more hands-on and easy to digest for students, without sacrificing academic rigour.”  

While it may seem like a pipe dream for many schools, AR isn’t as inaccessible as it used to be. Windows 10 for Education, for example, now includes Microsoft’s Mixed Reality platform as a basic inclusion, adding AR capabilities to a range of other apps like Minecraft and Steam that play a growing role in today’s classrooms. 

Even if you don’t yet have the capabilities to design your own AR experiences, you can tap on a range of apps to quickly introduce it to everyday learning, particularly in STEM-related subjects,” Cardy says. “Make sure your AR platform can access a range of apps and development capabilities, and your use of it can grow as your students and your school’s abilities mature.” 

Watch Jesse Cardy talk about why Windows 10 for Education can enhance learning in Australian schools on our YouTube channel. 

Find out more about Windows 10 for Education, including detailed resources on how to configure the most secure version for your school here. 

Our mission at Microsoft is to equip and empower educators to shape and assure the success of every student. Any teacher can join our effort with free Office 365 Education, find affordable Windows devices and connect with others on the Educator Community for free training and classroom resources. Follow us on Facebook and Twitter for our latest updates. 

タスクシーケンスでエラーが発生したら

$
0
0

みなさん、こんにちは。
MDT での OS 展開が失敗したときに、ログを確認し、原因を特定して問題を解決したいという要望があると思います。

今回はMDT での OS 展開のステップごとのログの出力場所と参照方法について書かれた、こちらのブログ記事の内容をご紹介します。
(少し古い記事ですがとても役に立ちます)

ログの出力場所については OS 展開のタスクシーケンスの進行状況により以下のフォルダとなります。

Windows PE でタスクシーケンスが開始され、OS イメージが適用されるまで:

X:MININTSMSOSDOSDLOGS

(X ドライブはメモリ上に展開された Windows PE 環境を指しています)

 

展開対象の PC 上の内蔵のドライブがフォーマットされた後:

C:MININTSMSOSDOSDLOGS

 

展開対象の PC 上に OS イメージの展開が開始された後:

%WINDIR%TEMPDeploymentLogs

 

タスクシーケンスが出力するログのうちトラブルシューティングに役立つものとして、以下のログファイルがあります。

  • BDD.LOG: MDT のログを集めたメインとなるログファイル
  • SMSTS.LOG: タスクシーケンスのエラーのトラブルシュートに使用するログ

また、タスクシーケンスで実行されるそれぞれのタスクはそれぞれのログを出力します。

タスクシーケンスにカスタムで追加したタスクで実行される実行ファイルやスクリプトについてもログが出力されますので、追加したカスタムタスクでエラーが発生した場合などもログを参照することで問題解決につながるヒントを得ることができます。

なお、出力されたログファイルはタスクシーケンスが正常終了するとクリーンアップ処理により削除されます。

 

ログファイルを見るための便利ツール

MDT のログファイルは通常のログファイルと同様にテキスト形式のファイルとして出力されますので、メモ帳を使用して内容を確認することができます。

 

上図のようにメモ帳で見ることもできることもできるのですが、Trace32 というツールでログを見ると警告やエラーの発生個所がハイライトされ、見やすくなります。(Trace32は SCCM 2007 Toolkit の一部として無償で提供されています)

Microsoft SCCM 2007 Toolkit
こちらからインストーラーをダウンロードし、Common Tools をインストールすると Trace32 がインストールされます。

Trace32 を起動し、MDT のログを表示すると、警告やエラーがハイライトされ、問題が発生している箇所を簡単に見つけることができます。


(画像をクリックすると拡大表示されます)

MDT での OS 展開でトラブルが発生した際、できるだけ早くスムーズに解決できるように、ログの情報やツールをぜひご活用ください。


blogpost_nacgv

CORS a WebAPI

$
0
0

V rámci solution máme dva webové projekty – Web (javascriptová single-page aplikace) a WebAPI(backend s API). v ASP.NET Core 2.0. Řešili jsme problém, že nám nefungoval spolehlivě CORS – javascriptové requesty z Webu nedostávaly správné odpovědi od WebAPI. Chovalo se to velmi podivně i přesto, že lokálně vše fungovalo, a to i když aplikace běžely na různých portech.

Konkrétně:

  • Některé GET requesty fungovaly i v testovacím prostředí, ale POST, PUT a DELETE requesty nikdy.
  • GET requesty browser někdy zdvojoval (zejména v Safari na Macu), první vždy prošel (status code 200) a druhý neprošel (status code 403)
  • V Developer tools v Chrome, ani v Safari nejsou vidět autorizační hlavičky i přesto, že uživatel je přihlášený (při odchycení requestu Fiddlerem tam skutečně jsou). Ovšem na localhostu jsou vidět autorizační hlavičky vždy.

CORS v aplikaci máme nastaven celkem standardně a nepříliš restriktivně:

2018-04-10-CORS-settings

Kde byl(y) problém(y):

Nejdříve jsme neměli povolené všechny hlavičky (pozor zejména na Authorization, která není v Chrome Developer tools defaultně vidět). Nakonec jsme stejně skočili u AllowAnyHeader().

Důležité je mít povoleno AllowCredentials(), pokud řešíte přihlašování

Na co nám nejdéle trvalo přijít je, že je potřeba povolit anonymní autentifikaci i když v aplikaci žádné anonymní požadavky nejsou potřeba (povoluje se to v IIS na obrázku níže). Je potřeba na to ovšem myslet a v aplikaci si ošetřit, že uživatel musí být přihlášen při běžném přístupu do aplikace.

2018-04-10-CORS-IIS

Na pozadí CORS funguje tak, že vzdálený klient nejdříve udělá tzv. preflight request metodou OPTIONS a v hlavičce pošle informace, na jakou URL chce jakou metodou kdo přistupovat. Pokud není povolena anonymní autentifikace, OPTIONS požadavek selže (vrátí 401), protože v hlavičce preflight requestu se dle specifikace https://fetch.spec.whatwg.org/#cors-preflight-fetch autorizační hlavička neposílá. V takovém případě vzdálený klient není schopný zjistit, zda bude mít oprávnění udělat skutečný požadavek, a tak celá komunikace selže (nebo se chová nepředvídatelně – viz podivnosti výše).

Technické podrobnosti např. zde: https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS

Nakonec pro přehlednost ještě schéma posílání CORS požadavků:

2018-04-10-CORS-schema

Robert Haken, HAVIT

The early history of redundant function pointer casts: MakeProcInstance

$
0
0


If you

look through old code
,
you see a lot of
redundant function pointer casts.
(If you're writing new code,
you should get rid of as many function pointer casts as possible,
because

a function pointer cast is a bug waiting to happen
.)
Why does old code have so many redundant function pointer casts?



Because back in the old days, they weren't redundant.



In the days of 16-bit Windows,
function prologues were required to take very specific forms
in order to make

stack walking
work,
and stack walking was necessary in order to simulate an MMU
on a CPU that didn't have one.



Another rule for prologues has to do with state management.
The full prologue for a far function looks like this:



mov ax, ds
nop
inc bp
push bp
mov bp, sp
push ds
mov ds, ax


Before we can dig into those instructions, we need to know a bit about
how code segments worked in real-mode 16-bit Windows.
In real-mode 16-bit Windows, there was a single address space for all applications
because the CPU had no concept of per-process address spaces.
The kernel simulated separate address spaces by managing instances.
The instance (represented by an instance handle)
specified the location of the data segment the code should operate on.
If you have two copies of a program running,
the code is shared, but each program has its own data.
The instance handle tells you where that data is.



And the instance handle is kept in the ds register.



Therefore, it is essential that every function have its ds
register set to the instance handle that describes where the code
should find its data.
You can think of it as a "global this pointer for the process."



Okay, so let's look at the function prologue again.
First, it copies ds to ax via a two-byte
mov ax, ds instruction.
Then there is a nop.
This pads the prologue size to three bytes.



The next four instructions build the stack frame:
The inc bp

marks the stack frame as a far frame
.
The push bp and mov bp, sp
build the bp chain.
And
the
push ds saves the original ds register,

which also provides breathing room for
return address patching
.



And then we move ax back into ds.
The instance handle just took a little tour of the ax
register and then returned back home.
What was the point of that?



Recall that in 16-bit Windows,

every far function called from another segment was listed
in the module's Entry Table
.



When a far function is placed in the exported function table,
the loader patches the first three bytes of the function
to three nop instructions.
Non-exported functions remain unchanged.
This means that non-exported functions do the redundant
ds rigamarole.
It's a little extra work, but it's ultimately harmless.



The effect of patching out the initial mov ax, ds
is that the function ends up doing this:



  • Build a far stack frame,
    which includes saving the original ds.
  • Set ds to whatever was passed in the ax register.


The second step means that the code, when it executes,
operates on the data associated with the handle passed in the ax
register.



Okay, great, but this means that you can't call an exported function
directly,
because it will set the ds register to whatever
value is passed in the ax register.
Since the ax register is not part of the calling convention,
its value is garbage.



But that's okay.
We made things worse so we can make them better.




The Make­Proc­Instance function

creates a stub function that loads the ax register
with the instance handle you provide,
and then jumps to the function you provide.
Really.
That's all it did.
(When you're done, you call Free­Proc­Instance
to free the memory back to the system.)



This stub function was known as
a procedure instance thunk,
or a proc instance for short.
Hence the name Make­Proc­Instance.



Okay, finally the punch line.
The Make­Proc­Instance function didn't care
what kind of function pointer you passed it.
Whatever you passed in, it returned the same kind of pointer back out,
because all the stub did was twiddle the ax register
and then jump to the real function.
The parameters on the stack didn't change,
the cleanup convention didn't change,
nothing else changed.



The Make­Proc­Instance function was
declared as returning a FARPROC,
which is a typedef for a far function that takes no parameters
and returns nothing.
The parameters and return value are irrelevant;
it just had to be something.



But what this means is that when you take your function,
like a window enumeration callback,
and create a procedure instance for it,
the thing you get back has been type-erased to a generic
function pointer.
To make it useful again, you need to cast it back to what it
was originally.



For example, if what you passed was a WNDENUMPROC,
then you need to cast the procedure instance back to a
WNDENUMPROC.
If you passed a TIMERPROC, then you need to cast
the procedure instance back to a TIMERPROC.
You could anachronistically express this as



template<typename R, typename ...Args>
auto MakeProcInstanceT(R (FAR *func)(Args...), HINSTANCE inst)
{
return (decltype(func))MakeProcInstance((FARPROC)func, inst);
}


Of course, you didn't have this fancy template deduction
in 1983-era C,
so you had to cast the return value manually.



And that brings us to today.
Even though
Make­Proc­Instance has been obsolete
for decades,
some people imprinted on the
"gotta cast your function pointers to get them to compile"
pattern,
either because they wrote code when the cast was required
and fell into the habit, or
or (more likely) they learned from code that was written
by someone who inherited this habit from somebody else.
And yes, this inherited folk wisdom

can even be found in MSDN
.



The redundant function pointer cast is now a type of folklore,
passed down from developer to developer,
even though it's no longer needed
and in fact

will mask problems
caused by mismatched prototypes
.

Elster: Update der offenen Schnittstelle auf TLS 1.2 mit PFS

$
0
0

Aufgrund der Ankündigung im Elster Newsletter vom 22.07.2017, in der mitgeteilt wurde, dass die offene Schnittstelle (welche Microsoft Dynamics NAV für die Übertragung nutzt) auf TLS 1.2 mit PFS umgestellt wird und Softwarehersteller ab 25.04.2018 mit TLS 1.2 und PFS versenden müssen, wurde die Funktionalität in den supporteten Versionen von Microsoft Dynamics NAV angepasst und mit dem Cumulative Updates für April zur Verfügung gestellt.

Durch das Update, wird ein neues P12 Zertifikat (könnte folgendermaßen heißen: client-offen.p12) benötigt, welches Sie vom Finanzamt erhalten (sollte es nicht schon bei Ihrem Zertifikatspaket dabei sein).

Leider ist noch ein Fehler in der CU 11001 , welcher zu der Fehlermeldung 3100 bei der Übertragung führt. Dieser wird mit folgender Korrektur behoben und mit dem Mai Cumulative Update offiziell zur Verfügung gestellt:

Old version BEFORE

New version AFTER

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

+------------------------------------------------------------------------------+

| OBJECT Codeunit 11001 Sales VAT Adv. Notif.-Transmit                         |

+------------------------------------------------------------------------------+

---------- Before (BEFORE) ---------- Codeunit 11001 ---------- Properties -----

            XMLDOMManagement.LoadXMLDocumentFromInStream(XMLInStream,XMLSubDoc);

 

            Certificate.GET(USERID);

            CertificateType := Certificate."Certificate Type";

            Certificate.TESTFIELD("PFX File");

            Certificate.TESTFIELD("Elster Certificate");

---------- After  (AFTER) ------------------------------------------------------

            XMLDOMManagement.LoadXMLDocumentFromInStream(XMLInStream,XMLSubDoc);

 

            Certificate.GET(USERID);

+           Certificate.CALCFIELDS("PFX File","Elster Certificate","Client Certificate","PFX File Password","Client Certificate Password");

            CertificateType := Certificate."Certificate Type";

            Certificate.TESTFIELD("PFX File");

            Certificate.TESTFIELD("Elster Certificate");

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

“Microsoft provides programming examples for illustration only, without warranty either expressed or implied, including, but not limited to, the implied warranties of merchantability or fitness for a particular purpose. This mail message assumes that you are familiar with the programming language that is being demonstrated and the tools that are used to create and debug procedures.

Wir haben nun entsprechende Update Pakete für die folgenden Versionen zur Verfügung gestellt, die Sie hier herunterladen können. Diese beinhalten, die benötigten Objekte (inklusive der Korrektur der CU11001) den geänderten ElsterTransferHandler sowie eine Beschreibung der Vorgehensweise und den öffentlichen Schlüssel des Finanzamtes frontendkey.p10.crt:

Microsoft Dynamics NAV 2015: NAV2015_-Elster_Update

Microsoft Dynamics NAV 2016NAV2016_-Elster_Update

Microsoft Dynamics NAV 2017NAV2017_-Elster_Update

Microsoft Dynamics NAV 2018NAV2018_-Elster_Update

Sollten Sie Probleme beim einspielen des Elster Updates haben, möchten wir Sie bitten einen entsprechenden Support Case zu eröffnen, damit wir Sie individuell unterstützen können.

Für die Versionen Microsoft Dynamics NAV 2013 und 2013 R2 wird es keine Anpassungen geben.

Vielen Dank

Mit freundlichen Grüßen

 

Franziska Fiegler

Productive web resource development for model-driven PowerApps

$
0
0

One of the most common questions I have been asked over the years (and still am today) about extending model-driven PowerApps / Dynamics 365 CE with html and JavaScript is:

“What’s the most productive way to develop and debug Dynamics 365 (and now model-driven PowerApps) web resources?”

The answer to that question will certainly be different depending on who you ask.  Any answer to this question is subjective.  There are lots of code editors out there that allow you to edit the various file types supported by web resources (html and JavaScript being the most common).  There are lots of helpful tools available that could be leveraged in different ways to answer this question (some from Microsoft, many created by members of the community).  I’ve tried lots of approaches over the years.  If you’ve come across any of my older blog posts or videos on the topic, then you’ve probably seen some of them.  When I show people my current preferred approach, most generally agree that it is more productive than what they are currently doing.  The video below is a comprehensive walkthrough of my my current approach.  As you will see in the video, at the time of this post, my toolchain is Visual Studio 2017, a must have (in my opinion) Visual Studio extension from Jason Lattimer called D365 Developer Extensions, and Fiddler.

HTH

@devkeydet

Viewing all 35736 articles
Browse latest View live