azure,azure-mobile-services , Azure Mobile Services and Application Insights


Azure Mobile Services and Application Insights

Question:

Tag: azure,azure-mobile-services

I hava added Azure Application Insights to a new Azure Mobile Services (.NET backend) project. When I running it on my local machine it's sending data to insights. But when I deploy it to Azure it will not work. In the log at the portal I get the message below. Anyone that know how to solve this?

Message='Could not load assembly 'D:\home\site\wwwroot\bin\Microsoft.ApplicationInsights.Extensions.Intercept_x86.dll'. Error received: 'Could not load file or assembly 'file:///D:\home\site\wwwroot\bin\Microsoft.ApplicationInsights.Extensions.Intercept_x86.dll' or one of its dependencies. The module was expected to contain an assembly manifest.'.', Exception=System.BadImageFormatException: Could not load file or assembly 'file:///D:\home\site\wwwroot\bin\Microsoft.ApplicationInsights.Extensions.Intercept_x86.dll' or one of its dependencies. The module was expected to contain an assembly manifest. File name: 'file:///D:\home\site\wwwroot\bin\Microsoft.ApplicationInsights.Extensions.Intercept_x86.dll' at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) at System.Reflection.RuntimeAssembly.InternalLoadFrom(String assemblyFile, Evidence securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm, Boolean forIntrospection, Boolean suppressSecurityChecks, StackCrawlMark& stackMark) at System.Reflection.Assembly.LoadFrom(String assemblyFile) at Microsoft.WindowsAzure.Mobile.Service.Config.WebHostAssemblyResolver.LoadAssembly(String assemblyFilePath) at Microsoft.WindowsAzure.Mobile.Service.Config.WebHostAssemblyResolver.GetApplicationAssemblies(ICollection1 asmPaths, ISet1 excludedAssemblyNames)

WRN: Assembly binding logging is turned OFF. To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1. Note: There is some performance penalty associated with assembly bind failure logging. To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog]. , Id=00000000-0000-0000-0000-000000000000, Category='Service.Hosting'


Answer:

This exception is a first chance exception and does not affect monitoring in general. AI does not work because Azure Mobile Services infrastructure blocks http module so application insights http module cannot be loaded. There is no workaround how you could enable autocollection right now. You can only manually instrument your code.


Related:


Azure Active Directory Graph Client 2.0 - Contains Expression


c#,azure,active-directory,graph-api-explorer
When querying Users etc using the Azure ActiveDirectoryClient it does not seem possible to construct a expression that has the 'Contains' keyword e.g. activeDirectoryClient.Users.Where(u => u.Surname.Contains(searchString)) .ExecuteAsync() I can successfully use u.Surname.StartsWith or EndsWith. Is this supported? If not is there an alternative? Thanks....

Error deploying database to SQL Azure


sql-server,azure,forms-authentication,sql-azure
I'm using forms authentication to handle users and attempting to deploy my database to SQL Azure, but getting this error message: The only table of the four listed that I utilize is aspnet_Membership, and the only other table I use is aspnet_Users from implementing forms authentication. What is TextInRowSize and...

How do I log into a web service that was auto-generated by Azure Mobile Web Services?


c#,testing,azure-mobile-services,visual-studio-2015
Microsoft's Azure Mobile Web Services lets you download a .NET or JavaScript Service and a client that talks to the Service. These are written in C#, or JavaScript. I chose to get one in C#. There is are several parts in the generated solution A Windows 8.1 desktop client (yourname.Windows)...

How can I add a .props file to a C# project?


azure,visual-studio-2013,azure-webjobs
I am trying to set up continuous delivery of Azure Web Jobs, and came across this post from the Azure blog. One of the steps there is to add a .props file to the web job application's properties. I am having difficulty adding a .props file. My web searches indicate...

Distributed session implementation detail


c#,asp.net,session,azure
With the reference to the structure of session module in ASP.NET below: As I understand, when the application uses distributed session provider (.e.g. Redis in Azure), the SessionStateModule will deserializes the user's session data into Session dictionary at the beginning of a request. What I'm wondering is whether the module...

How to expose existing REST API through Azure Service Bus (or through something else)


rest,azure,azureservicebus
I have an existing on-premise REST API from an external vendor. I'd like to expose this API unmodified to the outside world through an Azure website. So I have customers that run this API on-premise and I'm developing a PaaS/SaaS app that should access these on-premise API's. I also have...

TelemetryClient does not send any data unless Flush is called


azure,ms-application-insights
I'm using TelemetryClient (v0.17.0.576) directly in my code and it looks like I can push data to Azure only when I manually call Flush at the end which feels wrong. Am I missing something here ? var configuration = TelemetryConfiguration.CreateDefault(); configuration.InstrumentationKey = "KEY"; var client = new TelemetryClient(configuration); for (int...

How to avoid a 404 when deleting batches from Azure Table Storage


c#,.net,azure,azure-table-storage
Problem I am trying to delete a lot of rows from table storage that may or may not exist. The deal is I need to minimise I/O and maximise bandwidth so 1 hit to rule them all would be awesome. Problem is that if any of the batch entities doesn't...

Azure : HOWTO/BEST-Practice : Publish WebApp with Webjob using blobs Q's to multiple destinations?


visual-studio,azure,windows-azure-storage,publish
I have a webapp that I publish from VS. I have 3 publishing profiles (Test, Demo and Production). Each targets a different server on Azure, with it's own SQl behind it. I added a webjob using Queue's and Blob-storage. Again for test, demo and production I create 3 different storage...

How to override Azure Sql connection in Azure portal


entity-framework,azure,sql-azure
I tried to override connectionstring in Azure portal with this connection : Server=tcp:server.database.windows.net,1433;Database=mydatabase;User [email protected];Password=xxxxxx;Trusted_Connection=False;Encrypt=True;Connection Timeout=30; It gives me an error Keyword not supported: 'server' and when I tried it as: metadata=res://*/DataAccess.MyDataBase.csdl|res://*/DataAccess.MyDataBase.ssdl|res://*/DataAccess.MyDataBase.msl;provider=System.Data.SqlClient;provider connection string="data...

Azure - is one 'block blob' seen as one file?


azure,windows-azure-storage,azure-storage-blobs
Question background: This may be a simple question but I cant find an answer to it. I've just started using Azure storage (for storing images) and want to know if one 'blob' holds a maximum of one file? This is my container called fmfcpics: Within the container I have a...

Does SQL Azure support REPLACE T-SQL function with cyrillic characters?


sql-server,tsql,azure,sql-azure,management-studio-express
I am trying command like USE [aaa] GO SELECT [Id] ,REPLACE([BlaBlaField], 'xyz','') FROM [dbo].[aaa] GO through SQL Management Studio on SQL EXPRESS and SQL Azure Web Edition DB. In SQL Express it works, but on Azure it does not. I searched on the web at 'Azure SQL Database General Guidelines...

Trying to use Java Message Service (JMS) API with Service Bus and AMQP


java,maven,azure,amqp
I'm trying to execute this example program, but I am getting the following class not found exception: javax.naming.NoInitialContextException: Cannot instantiate class: org.apache.qpid.amqp_1_0.jms.jndi.PropertiesFileInitialContextFactory [Root exception is java.lang.ClassNotFoundException: org.apache.qpid.amqp_1_0.jms.jndi.PropertiesFileInitialContextFactory] at javax.naming.spi.NamingManager.getInitialContext(Unknown Source) at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source) at...

Setup Codeigniter For Windows Azure


php,codeigniter,azure
I've been trying to Setup Codeigniter 3 on the Windows Azure platform,everything seems fine for the normal setup but when i uploaded my application(Which i did via github so all the files are intact) and my session is set to autoload from config,i get the error "The resource you are...

Unable to publish to Azure after 2014 update


asp.net,asp.net-mvc,azure,sql-azure
I have an APS.net MVC project I have been publishing to azure for a while. I recently change laptop and moved to SQL Server 2014. Now when I try to publish I get 3 errors. The fist one looks to be the root course: Error 3 .Net SqlClient Data Provider:...

Can I run SignalR hub through Azure API Management?


c#,azure,signalr,azure-api-management
I have the same question as this guy this guy : can I run my SignalR hub through the Azure API management service? I cannot seem to configure it in the service: it only allows me to forward HTTP/HTTPS traffic. That matches the answer of the person in the forum...

Azure Mobile Services: migrate to non-Azure Windows Server


asp.net,azure,azure-mobile-services
I am planning to use Windows Azure Mobile Services for a new project. As far as I am concerned, Mobile Services are closely tied to Windows Azure. So far, I'm pretty happy with Windows Azure. What if, in the future, I decide to port the functionality to a non-Azure Windows...

How to use Azure Mobile Service with Cordova Project AngularJS and C#?


c#,angularjs,cordova,sql-azure,azure-mobile-services
I want to use a database hosted on Azure with some sort of backend for my app made with apache cordova tools for visual studio. My thought was that I could create my JS object in the app itself send that to the C#/JS code on azure which will then...

Application for viewing Azure service bus dead letters


azure,azureservicebus,dead-letter
I've been looking around the web and GitHub for an off-the-shelf dead letter viewer for Azure service bus. This is to allow our DevOps team to monitor, view and report on any dead letters for each subscription for each topic on our bus. I thought this would be a common...

connect to mysql database which is in ubuntu server


php,mysql,ubuntu,azure,virtual-machine
I am using below code to connect MySQL database in PHP. try { shell_exec("ssh -f -L 3307:127.0.0.1:3306 [email protected]_ip sleep 60 >> logfile"); $this->_conn = $this->dbh = new PDO('mysql:host=127.0.0.1;dbname=my_db', DB_USER, DB_PASS); $this->dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); } catch (PDOException $e) { die("Couldn't connect to database. Please try again!"); } I want to direct connect...

Handling service bus Message.Complete() exceptions


c#,azure,servicebus,idempotent
Consider the scenario, an Azure service bus with message deduplication enabled, with a single topic, with a single subscription and an application that is subscribed to that queue. How can I ensure that the application receives messages from the queue once and only once ? Here is the code I'm...

the size of a string is the same size of a image after convert the image into string?


c#,string,azure
I have uploaded an image of size X and then I convert then into a string, I need to split the string in several strings of size Y. The size of the image and the size of the string is the same? I use javascript for the conversion and then...

Add azure db to mvc5 project


asp.net,azure,visual-studio-2013,asp.net-mvc-5,sql-azure
I have a MVC 5 project using visual studio 2013. How can I add/create a database in azure from visual studio so that EF6 code first can just use and create the models? I've been browsing server explorer but there is nothing there related to azure....

Upload file to Azure Blob from HTML webpage (C#)?


c#,azure,file-upload,azure-storage-blobs
I am trying to figure out how to take a file from an html form and save it to my Azure Blob storage. I have found many posts about doing this for JavaScript but I am trying to do it via C#. One source I found said to do using...

setting up azure ad certificate auth using powershell


powershell,azure,azure-active-directory
I am attempting to setup an Azure AD application to authenticate using a certificate. I have been using this guide to successfully set this up after failing following this guide. I wish to now automate the process so it can be added to our general build scripts, looking at the...

It was not possible to connect to the redis server(s); to create a disconnected multiplexer


c#,azure,azure-redis-cache
I have the following piece of code to connect to azure redis cache. public class CacheConnectionHelper { private static Lazy<ConnectionMultiplexer> lazyConnection = new Lazy<ConnectionMultiplexer>(() => { return ConnectionMultiplexer.Connect(SettingsHelper.AzureRedisCache); }); public static ConnectionMultiplexer Connection { get { return lazyConnection.Value; } } } And I use it this way public static List<Models.Module>...

How to set ContentDisposition using Set-AzureStorageBlobContent


powershell,azure
Using Powershell (with the Azure module), this works: Set-AzureStorageBlobContent -Container $containerName -Context $context -File $localfilename -Force -Properties @{ContentType='text/plain'} This does not: Set-AzureStorageBlobContent -Container $containerName -Context $context -File $localfilename -Force -Properties @{ContentType='text/plain';ContentDisposition='attachment; filename=foo.txt'} The error message I get says, Set-AzureStorageBlobContent : Blob properties 'ContentDisposition' with value 'attachment; filename=foo.txt' is invalid...

How to set-up Wordpress Multi-sites on Azure using sub-directories


wordpress,azure,multisite
A question on Wordpress Multisite running on Windows Azure using Sub-directories: does it work? how do you do it?. I've installed Wordpress(4.2.2) from the Azure Gallery, updated the wp.config.php and web.config files to enable and install Multisites, but the result is a half working solution: Multi-sites is installed, and I...

How to set network security group rules for azure storage services?


azure,sql-azure,azure-table-storage,windows-azure-networking
I need to setup Network Security Group rules for my application so it can receive HTTPS requests from the Internet and write data into Table Storage and Azure SQL. Nothing else is allowed. I know how to setup the HTTP inbound rule. But I could not figure out how to...

Azure NextMarker


azure,windows-azure-storage,azure-storage-blobs
I have created a container in Azure called files. It has 3 images and 2 txt files. https://attosolstorage.blob.core.windows.net/files?comp=list With the URL listed above, NextMarker will be empty. If I use the following URL.. https://attosolstorage.blob.core.windows.net/files?comp=list&maxresults=1 It shows the NextMarker field populated, and what I understand from this article is that using...

SoapException: Host is not known, only when called from WebService


asp.net,web-services,azure
I have a web app running .NET 4.5 on the Azure platform. As part of the web app we send leads off to a 3rd party web service. The decision was made for the front end to interact with a local web service (.asmx) via a JS AJAX call which...

website creation fails with serverfarm not found Azure Powershell


json,powershell,azure,server-farm
I am struggling to get the Drupal Webapp created using powershell with a GalleryTemplate Json file. It creates Serverfarm, Database servers but fails for website creation. I am not able to figure out how to move ahead as website creation need to use the created hostingplan serverfarm.It would be great...

Excel file (azure blob) does not download in chrome


excel,azure,azure-storage-blobs
Excel files are stored in azure blob containers. They are downloaded without incident in IE but in Chrome the page displays this message (and in Canary it crashes): This file appears corrupt and provides a link to download it and all is well from that point. I've tried setting the...

Different output when run on Azure than on local build


c#,asp.net-mvc,azure,encoding
I have a C#, .NET MVC 4.5 web app with an action method which calls out to a web service with a query string parameter. Something like "/home/[email protected]" I'm using Encoding.UTF8 and my return code looks like this: return Content(responseText); This outputs as: 6^.a308666-86 which is correct. However, when I...

Slow Azure Table Search and Insert Operations on small tables


azure,azure-storage-tables
I am trying to benchmark search/read & insert queries on an ATS which is small size(500 entities). Average insert time is 400ms and average search + retrieve time is 190ms. When inserting, I am querying on the partition key and the condition itself is only composed of one predicate :...

How can I view asp.net Azure internal errors?


asp.net,azure
After uploading my site to Microsoft Azure, server returns this text instead of my site: "The page cannot be displayed because an internal server error has occurred." Where can I see what's the problem?...

PHP MSSQL Database Azure


php,sql-server,json,azure
I am trying to get parse data from the SQL Database from Azure into a JSON using PHP. I have the php script on a free web hosting server. I recieve an ERROR when I am to connect to the Azure's SQL Database. My PHP Script <?php $serverName = "tcp:ss4rda587x.database.windows.net,1433";...

Azure WebJob or Scheduler or another technology?


azure,azure-webjobs
I am writing an Azure hosted MVC website for a gym booking system. I need to be able to maintain membership expiry, suspensions as well as gym class attendence (i.e. logging to the database if a session has been missed). Each of these tasks requires a "c# service function" to...

Kestrel Running which framework?


azure,asp.net-5,dnx,dnvm,.net-5.0
I have a new ASP.NET 5 project and setup the project.json as below; "frameworks": { "dnx451": { "dependencies": { "ExternalLibrary": "1.3.0" } }, "dnxcore50": {} } I'm running the project through Kestrel with the default command defined in project.json. "kestrel": "Microsoft.AspNet.Hosting --server Kestrel --server.urls http://localhost:5001" Everything works fine. The project...

Domain redirection to Azure subscription


azure
I have one website running under current domain domain1.com which is not azure site. we build a new application with the new azure subscription I wanted to redirect/host the domain1.com to my azure subscription. how can we achieve this??...

Control access to web apps on Azure


azure,azure-web-sites
I currently have numerous web apps which are just webapi's on Azure. I have a gateway web app that is accessible publically as it has its own authentication mechanisms. However the other web apps I don't want to be accessed publically, only the gateway web app should have access to...

View local Azure Webjobs SDK dashboard for debugging WebJobs SDK console process


azure,azure-webjobs,azure-webjobssdk
I have a VS 2013 RC 4 Azure Webjobs project that I'm currently debugging. The project is a console project and has a function that uses a QueueTrigger attribute. I get the following errors in the console output when I run the job and insert a message to the template-mail-requests...

Azure Mobile Service requires authentication for SignalR HTML/Javascript Client


azure,signalr,azure-mobile-services
I have a fresh Azure Mobile Service running locally at localhost:52253. I installed the latest SignalR Nuget Package: Azure Mobile Services .NET Backend SignalR Extension 1.0.450 I also have a test HTML/Javascript client served from localhost:54697/ After working out the CORs issues, I still cannot connect to signalR hubs because...

Is there a way to implement a wcf service connected to a database without paying for azure?


database,wcf,azure,windows-phone-8
It seems like everything that I read is saying that for Windows Phone 8 Development, in order to create a database that connects to my WCF Service, I need to pay for it (Azure). Is that the truth? I want to create a database that my mobile app can access...

Getting error 400 bad request when accessing Azure blob storage - all latest components


azure,windows-azure-storage,azure-storage-blobs
I am running in to the "400 bad request" error that many have posted about when accessing Azure blob storage. Most of the fixes relate to updating versions of the Azure SDK and of the Storage Emulator from late '13 or '14, but there have been several subsequent releases since...

A parameter cannot be found that matches parameter name 'MaxSizeGB'


azure,sql-azure,azure-powershell
New-AzureSqlDatabase command on execution suddently started failing with parameter not found message. MSDN link mentions the parameter as supported. https://msdn.microsoft.com/en-us/library/dn546722.aspx Command : New-AzureSqlDatabase Input PS C:\scripts>$database1 = New-AzureSqlDatabase -ServerName "lpqd0zbrseg" -DatabaseName "Database1" -Edition "Business" -MaxSizeGB 50 -Collation "SQL_Latin1_General_CP1_CI_AS" Output Error New-AzureSqlDatabase : A parameter cannot be found that matches parameter...

Azure, login to separate accounts with one email


azure,azure-active-directory
I'm a developer that has an Azure account for my own dev stuff. I log into my dev account using [email protected] Next, I set up a client with their own Azure account, then invited myself via [email protected] and set myself as a co-administrator for the client's subscription. When I subsequently...

Azure - Enable diagnostics for worker/web role


azure,logging,azure-diagnostics
I would like to log every exception that occurs, (MVC cloudapp), in my table storage. I followed an official tutorial from Microsoft but it seems like they just complicate things too much. Tutorial can be viewed here: https://azure.microsoft.com/sv-se/documentation/articles/cloud-services-dotnet-diagnostics/#how-to-enable-diagnostics-in-a-worker-role It just feels like it's too much of a hassle just because...