Unable to connect to Azure Analysis Services via Azure Function App - Could not load type...
Following this guide, I have created an Azure Function App that compiles and runs:
#r "Microsoft.AnalysisServices.Tabular.DLL"
#r "Microsoft.AnalysisServices.Core.DLL"
#r "System.Configuration"
using System;
using System.Configuration;
using Microsoft.AnalysisServices.Tabular;
// req is a value passed from function.json which is currently ignored
public static void Run(String req, ILogger log)
{
log.LogInformation($"C# Timer trigger function started at: {DateTime.Now}");
try
{
Microsoft.AnalysisServices.Tabular.Server asSrv = new Microsoft.AnalysisServices.Tabular.Server();
// Pulls the connection string from the Connection Strings collection within the Application Settings
//var connStr = ConfigurationManager.ConnectionStrings["AASDev"].ConnectionString;
// Pulls the connection string from an Environment Variable held within the Application Settings collection
//var connStr = GetEnvironmentVariable("Conn");
// Simply hard coding the connection string (Anonymised)
var connStr = @"Data Source=asazure://<roll out>.asazure.windows.net/<My AAS Instance>;Initial Catalog=<My AAS Database>;User ID=<My User>;Password=<My Pass>";
asSrv.Connect(connStr);
Database db = asSrv.Databases["<My AAS Database>"];
Model m = db.Model;
m.Tables["<My AAS Table>"].RequestRefresh(RefreshType.Full); // Mark only one table for refresh
db.Model.SaveChanges(); //commit which will execute the refresh
asSrv.Disconnect();
}
catch (Exception e)
{
log.LogInformation($"C# Timer trigger function exception: {e.ToString()}");
}
log.LogInformation($"C# Timer trigger function finished at: {DateTime.Now}");
}
When running the function however, an exception is thrown when it tries to connect to the server object held within the asSrv
variable:
2018-11-12T13:45:40.273 [Information] C# Timer trigger function exception:
System.TypeLoadException:
Could not load type 'System.Security.Principal.WindowsImpersonationContext' from assembly 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=<removed>'.
at Microsoft.AnalysisServices.IdentityResolver.Dispose()
at Microsoft.AnalysisServices.XmlaClient.Connect(ConnectionInfo connectionInfo, Boolean beginSession)
at Microsoft.AnalysisServices.Core.Server.Connect(String connectionString, String sessionId, ObjectExpansion expansionType)
at Submission#0.Run(TimerInfo myTimer, TraceWriter log)
The connection string has the User ID
and Password
set as per the example and no matter how I try formatting or retrieving this connection string it either throws the above error or complains that there isn't a user or password where omitted.
What am I missing here?
Edit for Runtime ~1:
Currently getting many instances of the following error message:
2018-11-13T10:02:42.817 [Warning] Unable to find assembly 'Microsoft.VisualStudio, PublicKeyToken=xxx'. Are you missing a private assembly file?
2018-11-13T10:02:42.817 [Warning] Exception during runtime resolution of assembly 'Microsoft.VisualStudio, PublicKeyToken=xxx': 'System.ArgumentException: The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))
at System.AppDomain.nApplyPolicy(AssemblyName an)
at Microsoft.Azure.WebJobs.Script.Description.FunctionAssemblyLoader.ResolveAssemblyCore(Object sender, ResolveEventArgs args) in C:projectsazure-webjobs-sdk-scriptsrcWebJobs.ScriptDescriptionDotNetFunctionAssemblyLoader.cs:line 88'
2018-11-13T10:02:42.817 [Warning] Unable to find assembly 'Microsoft.VisualStudio, PublicKeyToken=xxx'. Are you missing a private assembly file?
2018-11-13T10:02:43.676 [Warning] Unable to find assembly 'Microsoft.AnalysisServices.Tabular.resources, Version=15.0.0.0, Culture=en-US, PublicKeyToken=xxx'. Are you missing a private assembly file?
2018-11-13T10:02:43.676 [Warning] Unable to find assembly 'Microsoft.AnalysisServices.Tabular.resources, Version=15.0.0.0, Culture=en, PublicKeyToken=xxx'. Are you missing a private assembly file?
c# azure ssas azure-functions azure-analysis-services
add a comment |
Following this guide, I have created an Azure Function App that compiles and runs:
#r "Microsoft.AnalysisServices.Tabular.DLL"
#r "Microsoft.AnalysisServices.Core.DLL"
#r "System.Configuration"
using System;
using System.Configuration;
using Microsoft.AnalysisServices.Tabular;
// req is a value passed from function.json which is currently ignored
public static void Run(String req, ILogger log)
{
log.LogInformation($"C# Timer trigger function started at: {DateTime.Now}");
try
{
Microsoft.AnalysisServices.Tabular.Server asSrv = new Microsoft.AnalysisServices.Tabular.Server();
// Pulls the connection string from the Connection Strings collection within the Application Settings
//var connStr = ConfigurationManager.ConnectionStrings["AASDev"].ConnectionString;
// Pulls the connection string from an Environment Variable held within the Application Settings collection
//var connStr = GetEnvironmentVariable("Conn");
// Simply hard coding the connection string (Anonymised)
var connStr = @"Data Source=asazure://<roll out>.asazure.windows.net/<My AAS Instance>;Initial Catalog=<My AAS Database>;User ID=<My User>;Password=<My Pass>";
asSrv.Connect(connStr);
Database db = asSrv.Databases["<My AAS Database>"];
Model m = db.Model;
m.Tables["<My AAS Table>"].RequestRefresh(RefreshType.Full); // Mark only one table for refresh
db.Model.SaveChanges(); //commit which will execute the refresh
asSrv.Disconnect();
}
catch (Exception e)
{
log.LogInformation($"C# Timer trigger function exception: {e.ToString()}");
}
log.LogInformation($"C# Timer trigger function finished at: {DateTime.Now}");
}
When running the function however, an exception is thrown when it tries to connect to the server object held within the asSrv
variable:
2018-11-12T13:45:40.273 [Information] C# Timer trigger function exception:
System.TypeLoadException:
Could not load type 'System.Security.Principal.WindowsImpersonationContext' from assembly 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=<removed>'.
at Microsoft.AnalysisServices.IdentityResolver.Dispose()
at Microsoft.AnalysisServices.XmlaClient.Connect(ConnectionInfo connectionInfo, Boolean beginSession)
at Microsoft.AnalysisServices.Core.Server.Connect(String connectionString, String sessionId, ObjectExpansion expansionType)
at Submission#0.Run(TimerInfo myTimer, TraceWriter log)
The connection string has the User ID
and Password
set as per the example and no matter how I try formatting or retrieving this connection string it either throws the above error or complains that there isn't a user or password where omitted.
What am I missing here?
Edit for Runtime ~1:
Currently getting many instances of the following error message:
2018-11-13T10:02:42.817 [Warning] Unable to find assembly 'Microsoft.VisualStudio, PublicKeyToken=xxx'. Are you missing a private assembly file?
2018-11-13T10:02:42.817 [Warning] Exception during runtime resolution of assembly 'Microsoft.VisualStudio, PublicKeyToken=xxx': 'System.ArgumentException: The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))
at System.AppDomain.nApplyPolicy(AssemblyName an)
at Microsoft.Azure.WebJobs.Script.Description.FunctionAssemblyLoader.ResolveAssemblyCore(Object sender, ResolveEventArgs args) in C:projectsazure-webjobs-sdk-scriptsrcWebJobs.ScriptDescriptionDotNetFunctionAssemblyLoader.cs:line 88'
2018-11-13T10:02:42.817 [Warning] Unable to find assembly 'Microsoft.VisualStudio, PublicKeyToken=xxx'. Are you missing a private assembly file?
2018-11-13T10:02:43.676 [Warning] Unable to find assembly 'Microsoft.AnalysisServices.Tabular.resources, Version=15.0.0.0, Culture=en-US, PublicKeyToken=xxx'. Are you missing a private assembly file?
2018-11-13T10:02:43.676 [Warning] Unable to find assembly 'Microsoft.AnalysisServices.Tabular.resources, Version=15.0.0.0, Culture=en, PublicKeyToken=xxx'. Are you missing a private assembly file?
c# azure ssas azure-functions azure-analysis-services
See my newly update, you could just ignore those warnings if connection succeeded.
– Jerry Liu
Nov 14 '18 at 13:12
add a comment |
Following this guide, I have created an Azure Function App that compiles and runs:
#r "Microsoft.AnalysisServices.Tabular.DLL"
#r "Microsoft.AnalysisServices.Core.DLL"
#r "System.Configuration"
using System;
using System.Configuration;
using Microsoft.AnalysisServices.Tabular;
// req is a value passed from function.json which is currently ignored
public static void Run(String req, ILogger log)
{
log.LogInformation($"C# Timer trigger function started at: {DateTime.Now}");
try
{
Microsoft.AnalysisServices.Tabular.Server asSrv = new Microsoft.AnalysisServices.Tabular.Server();
// Pulls the connection string from the Connection Strings collection within the Application Settings
//var connStr = ConfigurationManager.ConnectionStrings["AASDev"].ConnectionString;
// Pulls the connection string from an Environment Variable held within the Application Settings collection
//var connStr = GetEnvironmentVariable("Conn");
// Simply hard coding the connection string (Anonymised)
var connStr = @"Data Source=asazure://<roll out>.asazure.windows.net/<My AAS Instance>;Initial Catalog=<My AAS Database>;User ID=<My User>;Password=<My Pass>";
asSrv.Connect(connStr);
Database db = asSrv.Databases["<My AAS Database>"];
Model m = db.Model;
m.Tables["<My AAS Table>"].RequestRefresh(RefreshType.Full); // Mark only one table for refresh
db.Model.SaveChanges(); //commit which will execute the refresh
asSrv.Disconnect();
}
catch (Exception e)
{
log.LogInformation($"C# Timer trigger function exception: {e.ToString()}");
}
log.LogInformation($"C# Timer trigger function finished at: {DateTime.Now}");
}
When running the function however, an exception is thrown when it tries to connect to the server object held within the asSrv
variable:
2018-11-12T13:45:40.273 [Information] C# Timer trigger function exception:
System.TypeLoadException:
Could not load type 'System.Security.Principal.WindowsImpersonationContext' from assembly 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=<removed>'.
at Microsoft.AnalysisServices.IdentityResolver.Dispose()
at Microsoft.AnalysisServices.XmlaClient.Connect(ConnectionInfo connectionInfo, Boolean beginSession)
at Microsoft.AnalysisServices.Core.Server.Connect(String connectionString, String sessionId, ObjectExpansion expansionType)
at Submission#0.Run(TimerInfo myTimer, TraceWriter log)
The connection string has the User ID
and Password
set as per the example and no matter how I try formatting or retrieving this connection string it either throws the above error or complains that there isn't a user or password where omitted.
What am I missing here?
Edit for Runtime ~1:
Currently getting many instances of the following error message:
2018-11-13T10:02:42.817 [Warning] Unable to find assembly 'Microsoft.VisualStudio, PublicKeyToken=xxx'. Are you missing a private assembly file?
2018-11-13T10:02:42.817 [Warning] Exception during runtime resolution of assembly 'Microsoft.VisualStudio, PublicKeyToken=xxx': 'System.ArgumentException: The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))
at System.AppDomain.nApplyPolicy(AssemblyName an)
at Microsoft.Azure.WebJobs.Script.Description.FunctionAssemblyLoader.ResolveAssemblyCore(Object sender, ResolveEventArgs args) in C:projectsazure-webjobs-sdk-scriptsrcWebJobs.ScriptDescriptionDotNetFunctionAssemblyLoader.cs:line 88'
2018-11-13T10:02:42.817 [Warning] Unable to find assembly 'Microsoft.VisualStudio, PublicKeyToken=xxx'. Are you missing a private assembly file?
2018-11-13T10:02:43.676 [Warning] Unable to find assembly 'Microsoft.AnalysisServices.Tabular.resources, Version=15.0.0.0, Culture=en-US, PublicKeyToken=xxx'. Are you missing a private assembly file?
2018-11-13T10:02:43.676 [Warning] Unable to find assembly 'Microsoft.AnalysisServices.Tabular.resources, Version=15.0.0.0, Culture=en, PublicKeyToken=xxx'. Are you missing a private assembly file?
c# azure ssas azure-functions azure-analysis-services
Following this guide, I have created an Azure Function App that compiles and runs:
#r "Microsoft.AnalysisServices.Tabular.DLL"
#r "Microsoft.AnalysisServices.Core.DLL"
#r "System.Configuration"
using System;
using System.Configuration;
using Microsoft.AnalysisServices.Tabular;
// req is a value passed from function.json which is currently ignored
public static void Run(String req, ILogger log)
{
log.LogInformation($"C# Timer trigger function started at: {DateTime.Now}");
try
{
Microsoft.AnalysisServices.Tabular.Server asSrv = new Microsoft.AnalysisServices.Tabular.Server();
// Pulls the connection string from the Connection Strings collection within the Application Settings
//var connStr = ConfigurationManager.ConnectionStrings["AASDev"].ConnectionString;
// Pulls the connection string from an Environment Variable held within the Application Settings collection
//var connStr = GetEnvironmentVariable("Conn");
// Simply hard coding the connection string (Anonymised)
var connStr = @"Data Source=asazure://<roll out>.asazure.windows.net/<My AAS Instance>;Initial Catalog=<My AAS Database>;User ID=<My User>;Password=<My Pass>";
asSrv.Connect(connStr);
Database db = asSrv.Databases["<My AAS Database>"];
Model m = db.Model;
m.Tables["<My AAS Table>"].RequestRefresh(RefreshType.Full); // Mark only one table for refresh
db.Model.SaveChanges(); //commit which will execute the refresh
asSrv.Disconnect();
}
catch (Exception e)
{
log.LogInformation($"C# Timer trigger function exception: {e.ToString()}");
}
log.LogInformation($"C# Timer trigger function finished at: {DateTime.Now}");
}
When running the function however, an exception is thrown when it tries to connect to the server object held within the asSrv
variable:
2018-11-12T13:45:40.273 [Information] C# Timer trigger function exception:
System.TypeLoadException:
Could not load type 'System.Security.Principal.WindowsImpersonationContext' from assembly 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=<removed>'.
at Microsoft.AnalysisServices.IdentityResolver.Dispose()
at Microsoft.AnalysisServices.XmlaClient.Connect(ConnectionInfo connectionInfo, Boolean beginSession)
at Microsoft.AnalysisServices.Core.Server.Connect(String connectionString, String sessionId, ObjectExpansion expansionType)
at Submission#0.Run(TimerInfo myTimer, TraceWriter log)
The connection string has the User ID
and Password
set as per the example and no matter how I try formatting or retrieving this connection string it either throws the above error or complains that there isn't a user or password where omitted.
What am I missing here?
Edit for Runtime ~1:
Currently getting many instances of the following error message:
2018-11-13T10:02:42.817 [Warning] Unable to find assembly 'Microsoft.VisualStudio, PublicKeyToken=xxx'. Are you missing a private assembly file?
2018-11-13T10:02:42.817 [Warning] Exception during runtime resolution of assembly 'Microsoft.VisualStudio, PublicKeyToken=xxx': 'System.ArgumentException: The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))
at System.AppDomain.nApplyPolicy(AssemblyName an)
at Microsoft.Azure.WebJobs.Script.Description.FunctionAssemblyLoader.ResolveAssemblyCore(Object sender, ResolveEventArgs args) in C:projectsazure-webjobs-sdk-scriptsrcWebJobs.ScriptDescriptionDotNetFunctionAssemblyLoader.cs:line 88'
2018-11-13T10:02:42.817 [Warning] Unable to find assembly 'Microsoft.VisualStudio, PublicKeyToken=xxx'. Are you missing a private assembly file?
2018-11-13T10:02:43.676 [Warning] Unable to find assembly 'Microsoft.AnalysisServices.Tabular.resources, Version=15.0.0.0, Culture=en-US, PublicKeyToken=xxx'. Are you missing a private assembly file?
2018-11-13T10:02:43.676 [Warning] Unable to find assembly 'Microsoft.AnalysisServices.Tabular.resources, Version=15.0.0.0, Culture=en, PublicKeyToken=xxx'. Are you missing a private assembly file?
c# azure ssas azure-functions azure-analysis-services
c# azure ssas azure-functions azure-analysis-services
edited Nov 13 '18 at 10:19
iamdave
asked Nov 12 '18 at 15:21
iamdaveiamdave
7,89621338
7,89621338
See my newly update, you could just ignore those warnings if connection succeeded.
– Jerry Liu
Nov 14 '18 at 13:12
add a comment |
See my newly update, you could just ignore those warnings if connection succeeded.
– Jerry Liu
Nov 14 '18 at 13:12
See my newly update, you could just ignore those warnings if connection succeeded.
– Jerry Liu
Nov 14 '18 at 13:12
See my newly update, you could just ignore those warnings if connection succeeded.
– Jerry Liu
Nov 14 '18 at 13:12
add a comment |
1 Answer
1
active
oldest
votes
The tutorial is for Function on runtime ~1 which targets at .Net Framework. While right now Function app is on .Net Core runtime ~2 by default.
Go to Portal, Platform features> Application settings, under Application settings section, set FUNCTIONS_EXTENSION_VERSION
to ~1. Note that all functions created before will be influenced.
Update
Without .Net Core SDK support, we probably can't make it work in Funtion 2.x runtime. And those warnings of missing assemblies in ~1 runtime should be harmless.
If you meet error On-Premise Gateway is required to access the data source. Please install a unified gateway for the server
, please follow this tutorial to install.
What changes would be required to replicate this functionality on .Net Core runtime ~2?
– iamdave
Nov 13 '18 at 9:00
@iamdave Probably just give up using those assemblies and find other method to authenticate, like rest api. Internally those assemblies tried to find references which are not available in .net core env, it's more than an Azure function problem.
– Jerry Liu
Nov 13 '18 at 9:05
find other method to authenticate - Such as? How else is one supposed to connect to an Azure Tabular Model without using the Tabular DLLs referenced in the tutorial?
– iamdave
Nov 13 '18 at 9:08
Also, changing to runtime ~1 causes a bunch of missing reference errors, so I am assuming that isn't the actual problem here
– iamdave
Nov 13 '18 at 9:09
@iamdave If you want to move on with ~1, could you provide those missing error so I can offer help? On my side, I was stopped by theasSrv.Connect(connStr)
with some authentication problem as I have multiple authentication factor set and can't log in directly so I think runtime ~1 could work for you. If you want to work with ~2 runtime, you could try other packages in that tutorial.
– Jerry Liu
Nov 13 '18 at 9:16
|
show 5 more comments
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53265161%2funable-to-connect-to-azure-analysis-services-via-azure-function-app-could-not%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
The tutorial is for Function on runtime ~1 which targets at .Net Framework. While right now Function app is on .Net Core runtime ~2 by default.
Go to Portal, Platform features> Application settings, under Application settings section, set FUNCTIONS_EXTENSION_VERSION
to ~1. Note that all functions created before will be influenced.
Update
Without .Net Core SDK support, we probably can't make it work in Funtion 2.x runtime. And those warnings of missing assemblies in ~1 runtime should be harmless.
If you meet error On-Premise Gateway is required to access the data source. Please install a unified gateway for the server
, please follow this tutorial to install.
What changes would be required to replicate this functionality on .Net Core runtime ~2?
– iamdave
Nov 13 '18 at 9:00
@iamdave Probably just give up using those assemblies and find other method to authenticate, like rest api. Internally those assemblies tried to find references which are not available in .net core env, it's more than an Azure function problem.
– Jerry Liu
Nov 13 '18 at 9:05
find other method to authenticate - Such as? How else is one supposed to connect to an Azure Tabular Model without using the Tabular DLLs referenced in the tutorial?
– iamdave
Nov 13 '18 at 9:08
Also, changing to runtime ~1 causes a bunch of missing reference errors, so I am assuming that isn't the actual problem here
– iamdave
Nov 13 '18 at 9:09
@iamdave If you want to move on with ~1, could you provide those missing error so I can offer help? On my side, I was stopped by theasSrv.Connect(connStr)
with some authentication problem as I have multiple authentication factor set and can't log in directly so I think runtime ~1 could work for you. If you want to work with ~2 runtime, you could try other packages in that tutorial.
– Jerry Liu
Nov 13 '18 at 9:16
|
show 5 more comments
The tutorial is for Function on runtime ~1 which targets at .Net Framework. While right now Function app is on .Net Core runtime ~2 by default.
Go to Portal, Platform features> Application settings, under Application settings section, set FUNCTIONS_EXTENSION_VERSION
to ~1. Note that all functions created before will be influenced.
Update
Without .Net Core SDK support, we probably can't make it work in Funtion 2.x runtime. And those warnings of missing assemblies in ~1 runtime should be harmless.
If you meet error On-Premise Gateway is required to access the data source. Please install a unified gateway for the server
, please follow this tutorial to install.
What changes would be required to replicate this functionality on .Net Core runtime ~2?
– iamdave
Nov 13 '18 at 9:00
@iamdave Probably just give up using those assemblies and find other method to authenticate, like rest api. Internally those assemblies tried to find references which are not available in .net core env, it's more than an Azure function problem.
– Jerry Liu
Nov 13 '18 at 9:05
find other method to authenticate - Such as? How else is one supposed to connect to an Azure Tabular Model without using the Tabular DLLs referenced in the tutorial?
– iamdave
Nov 13 '18 at 9:08
Also, changing to runtime ~1 causes a bunch of missing reference errors, so I am assuming that isn't the actual problem here
– iamdave
Nov 13 '18 at 9:09
@iamdave If you want to move on with ~1, could you provide those missing error so I can offer help? On my side, I was stopped by theasSrv.Connect(connStr)
with some authentication problem as I have multiple authentication factor set and can't log in directly so I think runtime ~1 could work for you. If you want to work with ~2 runtime, you could try other packages in that tutorial.
– Jerry Liu
Nov 13 '18 at 9:16
|
show 5 more comments
The tutorial is for Function on runtime ~1 which targets at .Net Framework. While right now Function app is on .Net Core runtime ~2 by default.
Go to Portal, Platform features> Application settings, under Application settings section, set FUNCTIONS_EXTENSION_VERSION
to ~1. Note that all functions created before will be influenced.
Update
Without .Net Core SDK support, we probably can't make it work in Funtion 2.x runtime. And those warnings of missing assemblies in ~1 runtime should be harmless.
If you meet error On-Premise Gateway is required to access the data source. Please install a unified gateway for the server
, please follow this tutorial to install.
The tutorial is for Function on runtime ~1 which targets at .Net Framework. While right now Function app is on .Net Core runtime ~2 by default.
Go to Portal, Platform features> Application settings, under Application settings section, set FUNCTIONS_EXTENSION_VERSION
to ~1. Note that all functions created before will be influenced.
Update
Without .Net Core SDK support, we probably can't make it work in Funtion 2.x runtime. And those warnings of missing assemblies in ~1 runtime should be harmless.
If you meet error On-Premise Gateway is required to access the data source. Please install a unified gateway for the server
, please follow this tutorial to install.
edited Nov 14 '18 at 7:11
answered Nov 13 '18 at 8:58
Jerry LiuJerry Liu
9,6431728
9,6431728
What changes would be required to replicate this functionality on .Net Core runtime ~2?
– iamdave
Nov 13 '18 at 9:00
@iamdave Probably just give up using those assemblies and find other method to authenticate, like rest api. Internally those assemblies tried to find references which are not available in .net core env, it's more than an Azure function problem.
– Jerry Liu
Nov 13 '18 at 9:05
find other method to authenticate - Such as? How else is one supposed to connect to an Azure Tabular Model without using the Tabular DLLs referenced in the tutorial?
– iamdave
Nov 13 '18 at 9:08
Also, changing to runtime ~1 causes a bunch of missing reference errors, so I am assuming that isn't the actual problem here
– iamdave
Nov 13 '18 at 9:09
@iamdave If you want to move on with ~1, could you provide those missing error so I can offer help? On my side, I was stopped by theasSrv.Connect(connStr)
with some authentication problem as I have multiple authentication factor set and can't log in directly so I think runtime ~1 could work for you. If you want to work with ~2 runtime, you could try other packages in that tutorial.
– Jerry Liu
Nov 13 '18 at 9:16
|
show 5 more comments
What changes would be required to replicate this functionality on .Net Core runtime ~2?
– iamdave
Nov 13 '18 at 9:00
@iamdave Probably just give up using those assemblies and find other method to authenticate, like rest api. Internally those assemblies tried to find references which are not available in .net core env, it's more than an Azure function problem.
– Jerry Liu
Nov 13 '18 at 9:05
find other method to authenticate - Such as? How else is one supposed to connect to an Azure Tabular Model without using the Tabular DLLs referenced in the tutorial?
– iamdave
Nov 13 '18 at 9:08
Also, changing to runtime ~1 causes a bunch of missing reference errors, so I am assuming that isn't the actual problem here
– iamdave
Nov 13 '18 at 9:09
@iamdave If you want to move on with ~1, could you provide those missing error so I can offer help? On my side, I was stopped by theasSrv.Connect(connStr)
with some authentication problem as I have multiple authentication factor set and can't log in directly so I think runtime ~1 could work for you. If you want to work with ~2 runtime, you could try other packages in that tutorial.
– Jerry Liu
Nov 13 '18 at 9:16
What changes would be required to replicate this functionality on .Net Core runtime ~2?
– iamdave
Nov 13 '18 at 9:00
What changes would be required to replicate this functionality on .Net Core runtime ~2?
– iamdave
Nov 13 '18 at 9:00
@iamdave Probably just give up using those assemblies and find other method to authenticate, like rest api. Internally those assemblies tried to find references which are not available in .net core env, it's more than an Azure function problem.
– Jerry Liu
Nov 13 '18 at 9:05
@iamdave Probably just give up using those assemblies and find other method to authenticate, like rest api. Internally those assemblies tried to find references which are not available in .net core env, it's more than an Azure function problem.
– Jerry Liu
Nov 13 '18 at 9:05
find other method to authenticate - Such as? How else is one supposed to connect to an Azure Tabular Model without using the Tabular DLLs referenced in the tutorial?
– iamdave
Nov 13 '18 at 9:08
find other method to authenticate - Such as? How else is one supposed to connect to an Azure Tabular Model without using the Tabular DLLs referenced in the tutorial?
– iamdave
Nov 13 '18 at 9:08
Also, changing to runtime ~1 causes a bunch of missing reference errors, so I am assuming that isn't the actual problem here
– iamdave
Nov 13 '18 at 9:09
Also, changing to runtime ~1 causes a bunch of missing reference errors, so I am assuming that isn't the actual problem here
– iamdave
Nov 13 '18 at 9:09
@iamdave If you want to move on with ~1, could you provide those missing error so I can offer help? On my side, I was stopped by the
asSrv.Connect(connStr)
with some authentication problem as I have multiple authentication factor set and can't log in directly so I think runtime ~1 could work for you. If you want to work with ~2 runtime, you could try other packages in that tutorial.– Jerry Liu
Nov 13 '18 at 9:16
@iamdave If you want to move on with ~1, could you provide those missing error so I can offer help? On my side, I was stopped by the
asSrv.Connect(connStr)
with some authentication problem as I have multiple authentication factor set and can't log in directly so I think runtime ~1 could work for you. If you want to work with ~2 runtime, you could try other packages in that tutorial.– Jerry Liu
Nov 13 '18 at 9:16
|
show 5 more comments
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53265161%2funable-to-connect-to-azure-analysis-services-via-azure-function-app-could-not%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
See my newly update, you could just ignore those warnings if connection succeeded.
– Jerry Liu
Nov 14 '18 at 13:12