Matt Spinks

1

votes
1

answer
61

views

Can I use javascript to retrieve the content header when setting the src on audio

I'm using the HTML5 audio control to play an mp3 file that is streaming from the server: And I am setting the src of that audio control dynamically, when a user clicks a button: $('#myBtn').on('click', function (e) { var audio = document.getElementById('audio'); audio.src = '/api/audio/f56i4gi8lh';...
Matt Spinks
1

votes
2

answer
389

views

MVC route is not using default action

In my web api, I have created this controller: public class DistributionGroupController : ApiController { [HttpGet] public ServiceResult Index(string id) { if (id == null) return null; else return new ServiceResult(); } } In addition, this is my route config. I am specifying my default action for my...
Matt Spinks
1

votes
0

answer
37

views

What is the proper way to add bundled files to the appcache manifest?

I've created a prototype single-page web app that uses bundling for my javascript and css resources. I want to have more control over how the client's browser caches the resources, so I'm attempting to implement a cache manifest. But I can't get the bundle urls in my manifest controller to match the...
Matt Spinks
1

votes
2

answer
157

views

“The target 'AddScheduledJob' does not exist in the project” when publishing to Azure from Visual Studio

My solution consists of a main web app, with several azure web jobs attached to it. When I go to publish the main web app, I receive this error: [project_path]\[project_name].csproj(0,0): Error MSB4057: The target 'AddScheduledJob' does not exist in the project. I'm not sure where AddScheduledJob is...
Matt Spinks
1

votes
2

answer
55

views

Highcharts setData on pie chart not working

I am displaying a pie chart using the Highchart library. I have two sets of data I want to show, and I toggle between the two sets every 5 seconds indefinitely. When I load the initial set of data, the chart displays as it should. And when I load the second set of data (using setData), the chart cha...
Matt Spinks
1

votes
2

answer
50

views

Get parent rows where multiple child rows meet different conditions

In my database I have two tables: T_INDEX, and T_INDEXCALLER. It's a one-to-many relationship. Each index record can have multiple callers (referenced by IndexId). On my app's front-end, I have two search fields: Name, and Extension. Both of these fields reference the T_INDEXCALLER table. And in my...
Matt Spinks
1

votes
2

answer
62

views

Why is the query running so slow when there are indexes?

I am running a query in SQL Server, and it suddenly started running very slow. Up until yesterday, it used to run in < 1 sec (or max, 3 sec). All of a sudden, today, it now takes 7 - 9 minutes. I believe I have indexes set up properly. Here is the table definition: CREATE TABLE T_INDEX ( IndexId IN...
Matt Spinks
1

votes
0

answer
10

views

Why is extracting keys and hashes from Redis so slow?

I am using the StackOverflow.Redis library to interface with an Azure Redis server to extract some hash values for access via a web api. Here is how I am doing it: IDatabase cache = lazyConnection.Value.GetDatabase(); var server = lazyConnection.Value.GetServer(lazyConnection.Value.GetEndPoints().Fi...
Matt Spinks
1

votes
1

answer
86

views

Is it problematic to use a caching mechanism for throttling?

I implemented a throttling mechanism on our Azure web job. The 'job' of our web job is to download separate .wav files from a 3rd party api constantly throughout the day. And it does this around 5,000 times a day (right now). However, the 3rd party api has usage restrictions, and only allows us to d...
Matt Spinks
1

votes
1

answer
101

views

Can I query the Azure web job queue?

I have two Azure Web Jobs running within my Azure web app: Job A - running continuously Job B - triggered Job A's purpose is to trigger Job B based on two things: Job B has not been run in the past hour for a specified account number (passed into Job B as a param from Job A. Some other business log...
Matt Spinks
1

votes
3

answer
506

views

Why does the stored procedure run slow from code, but fast from SSMS? [duplicate]

This question already has an answer here: SQL Query slow in .NET application but instantaneous in SQL Server Management Studio 14 answers I am running a stored procedure from my web app, using Dapper. I ran the same stored procedure from SSMS first, to make sure all is well. It ran in 1-5 seconds f...
Matt Spinks
1

votes
1

answer
49

views

Can I use VSTS Release Manager to deploy a single web job under my app service without deploying the entire app service?

I have an Azure App Service which contains 5 web jobs. I have VSTS Release Manager set up to deploy the entire app service, which successfully updates my web jobs as well. However, I want to deploy only a single web job without deploying the entire app service. I have the build set up successfully f...
Matt Spinks
1

votes
1

answer
186

views

Cron expression doesn't work in Azure

I have a web job in azure that I am trying to run every 2 hours using a Cron job expression. I have the job configured as OnDemand, and I believe I have the Cron expression set up correctly. However, it NEVER gets kicked off. It's been out there for 2 days. Here is a quick run-down of the job: Prog...
Matt Spinks
1

votes
0

answer
29

views

Box Api GET Folder Items With Offset and Limit Not Working

I am attempting to retrieve the list of items within a folder in the Box.com api (and use the offset/limit for paging). According to the docs, I should do this: curl https://api.box.com/2.0/folders/FOLDER_ID/items?limit=2&offset=0 \ -H 'Authorization: Bearer ACCESS_TOKEN' Which seems very simple. A...
Matt Spinks
3

votes
0

answer
151

views

External javascript and css bundles don't load over https

I am creating a prototype app at this url: https://chirobyte.azurewebsites.net It's a single page app. I am also using a bundler to minify and bundle my css and javascript files: @Styles.Render('~/bundles/css') @Scripts.Render('~/bundles/jquery') @Scripts.Render('~/bundles/bootstrap') @Scripts.Rende...
Matt Spinks
2

votes
0

answer
58

views

Can I get a reference to my web request object from a WebException?

I am using a WebRequest to send a POST request to a REST api to obtain some data. To assist with this, I am handling WebException exceptions on a global level, using a global filter, and (attempting to) log the url, params, and headers of both the request and response. Once I have my WebException ob...
Matt Spinks
2

votes
2

answer
110

views

Variable assignment to first item in IEnumerable does not work

I am attempting to assign the value true to a field in my collection of objects. I am using the First() method to retrieve the first object, and assign to it. In this example, I am assigning the value true to the Show variable. However, immediately after the assignment, it appears that Show variable...
Matt Spinks
2

votes
2

answer
49

views

How do I make a form with only hidden inputs inside a Bootstrap (4) modal submit on enter?

I have a form with only hidden inputs (and a hidden submit button) inside a Bootstrap modal. My intention is to have the user open the modal by clicking a button, and then have them press enter immediately after the modal is shown to submit the form. Based on my research (and trial and error) I need...
Matt Spinks
3

votes
1

answer
69

views

How do I tell Dapper to use varchar for a list of params in a “WHERE” clause that uses “IN”?

I found this explanation and solution for using Dapper to search a VARCHAR field using a string as input: Query('select * from Thing where Name = @Name', new {Name = new DbString { Value = 'abcde', IsFixedLength = true, Length = 10, IsAnsi = true }); Source: Dapper and varchars But is there a way t...
Matt Spinks
5

votes
3

answer
112

views

Can I retrieve paged rows and total count within a single query?

I have a basic grid with paging enabled in my web app. This grid is being populated by SQL data via a Web API using Dapper. In my API controller I am running two separate queries: one to extract the rows (which are shown in my grid), and one to obtain the total number of records (to show in my pagin...
Matt Spinks
4

votes
0

answer
1.7k

views

Google Drive api “The download quota for this file has been exceeded”

I am working on an app that uploads and downloads files from Google Drive. I have the upload/download mechanisms in place, and have been doing some download tests using a couple files that have been uploaded. All was well about 13 hours ago. However, now, I just tried to download one of these files...
Matt Spinks