Visual Studio error when trying to create MVC application on Azure - asp.net-mvc

I want to create a new MVC application with Visual Studio Community 2015. I've followed this tutorial on how to do this and I've gone as far as creating the application, but after I click 'Create' to create the application, the error message below is displayed.
Is this message referring to the Azure API version for Visual Studio? If so, how should I resolve this? I've looked online and I can't seem to find anything about this error. I'm a newbie at this, so I'm not sure if I've overlooked anything, but I don't seem to according to the tutorial. Any help is greatly appreciated!
UPDATE
The image below shows the SQL API version I've found. It's odd thought, because it does not match the version shown in the error message.

As the error message says the API have to be in correct format yyyy-MM-dd.
API version I was using recently was 2014-04-01 or 2014-04-01-preview. Try any of these when defining SqlServer resouce.
Also have a look at resources.azure.com if you have any SqlServers created and double check the API version from there..
This does not relate to the Azure Sdk version for Visual Studio. It relates to the (in your case) API version used to create SqlServer instance using Azure Resource Manager
Sample SqlServer and database resource node:
"resources": [
{
"name": "[parameters('sqlServerName')]",
"type": "Microsoft.Sql/servers",
"location": "[resourceGroup().location]",
"apiVersion": "2014-04-01-preview",
"dependsOn": [ ],
"tags": {
"displayName": "SqlServer"
},
"properties": {
"administratorLogin": "[parameters('sqlDatabaseUserName')]",
"administratorLoginPassword": "[parameters('sqlDatabasePassword')]",
"version": "12.0"
},
"resources": [
{
"name": "AllowAllWindowsAzureIps",
"type": "firewallrules",
"location": "[resourceGroup().location]",
"apiVersion": "2014-04-01-preview",
"dependsOn": [
"[concat('Microsoft.Sql/servers/', parameters('sqlServerName'))]"
],
"properties": {
"startIpAddress": "0.0.0.0",
"endIpAddress": "255.255.255.255"
}
},
{
"name": "[parameters('databaseName')]",
"type": "databases",
"location": "[resourceGroup().location]",
"apiVersion": "2014-04-01-preview",
"kind": "v12.0",
"dependsOn": [
"[parameters('sqlServerName')]"
],
"tags": {
"displayName": "SqlDatabase"
},
"properties": {
"collation": "[parameters('sqlDatabaseUriNameCollation')]",
"edition": "[parameters('sqlDatabaseUriNameEdition')]",
"maxSizeBytes": "10737418240"
//10 gigs currently
}
}
]
}
Also as #Robert McKee pointed make sure you have latest Azure SDK (2.7.1 or 2.8 released recently)

I'm not sure how, but this evening when I went to try it again, it worked. Thank you all for your answers!

Related

Make electron app smaller?

I just recently built an electron app and packaged it using electron-packager. The .exe file is 55,000kb and the rest of the folder is quite bulky as well. Is there any way to take down the size of this application at all?
Here's a github issue on it.
The comment I'm emphasizing is:
That's the expected size, there is no way to make it smaller.
The reason why it's so big is because electron is loading most of chromium inside that 50mb file.
So no unfortunately there is no way to make it smaller sorry.
A somewhat helpful post from that github thread suggests removing unnecessary node modules via electron-packager. It also offers a bit more explanation on why files are so large.
You can zip your app and if you're using electron-packager you can ignore some node modules that you don't need when the app is running, this makes it a bit smaller. For instance I have a 37MB zipped Electron app (Note Windows version is much larger as it contains a copy of Git). But Electron will always have a large part of Chrome in it so there is only so much that can be done. Electron itself right now is ~33MB.
There is a way to reduce Electron size drastically (up to 99%, depending how big is your app), by using native browser, available in each OS, instead of loading webkit. BUT as built in browsers don't have the system API's, you will also be drastically limited in what you can do. But, if you need basic web ui app, this might be the best solution out there, though, it must be mentioned, that it might have some unexpected issues, as you will need to test your app on different OS'es browsers..
The method i'm talking about is available in awesome post Put your Electron app on a diet with Electrino by Pauli Olavi Ojala
If you are using Electron Builder https://www.electron.build you should use the various methods listed to remove files and folders for specific platforms.
Example
{
"name": "Example",
"version": "1.1.2",
"description": "",
"main": "main.js",
"scripts": {},
"build": {
"appId": "com.example",
"afterSign": "notarize.js",
"fileAssociations": [{
"ext": [
"mp4"
],
"name": "Media File",
"role": "Viewer"
}],
"dmg": {
"sign": true
},
"mac": {
"hardenedRuntime": true,
"gatekeeperAssess": false,
"entitlements": "build/entitlements.mac.plist",
"entitlementsInherit": "build/entitlements.mac.plist",
"icon": "build/icon.png",
"category": "public.app-category.video",
"extraFiles": [{
"from": "resources/bin/mac",
"to": "Resources/bin/mac",
"filter": [
"**/*"
]
},
{
"from": "node_modules/platforms/darwin-x64/bin",
"to": "Resources/bin/mac",
"filter": [
"**/*"
]
}
],
"files": [
"!gruntfile.js",
"!README.md",
"!notarize.js",
"!.env",
"!minify.js",
"!src/*",
"!.git/*",
"!resources/*"
]
},
"win": {
"target": "nsis",
"signingHashAlgorithms": [
"sha1"
],
"certificateFile": "",
"certificatePassword": "",
"files": [
"!gruntfile.js",
"!README.md",
"!notarize.js",
"!.env",
"!minify.js",
"!.git/*",
"!resources/mac/*"
]
}
},
"author": "Example",
"license": "ISC",
"devDependencies": {
},
"dependencies": {
}
}

Google Cloud Endpoints REST Discovery Document missing format

I've upgraded to Cloud Endpoints 2.0 which no longer supports RPC. Therefore, I generated a new discovery document and used the service generator with the REST discovery doc as input in order to generate the client library for my iOS app.
Using the new REST discovery doc I am getting the following error when trying to generate the library:
~/workspace/google-api-objectivec-client-for-rest/Source/Tools/ServiceGenerator/build/Release/ServiceGenerator discovery/servUsApi-v1-rest.discovery --outputDir GTLAPI --gtlrFrameworkName GoogleAPIClientForREST
ERROR: Failure, exception: Looking at parameter 'creditKickbackKash:creditAmount', found a type/format pair of 'number/(null)', and don't how to map that to Objective-C
I was able to manually fix this by adding (in numerous places) in the discovery doc, the "format": "double" key and value for all double parameters. Notice creditAmount below is missing a format, like all other doubles.
The generated discovery doc looks like this:
"creditKickbackKash": {
"httpMethod": "PUT",
"id": "servUsApi.admin.creditKickbackKash",
"parameterOrder": [
"userId",
"creditAmount"
],
"parameters": {
"userId": {
"format": "int64",
"location": "path",
"required": true,
"type": "string"
},
"creditAmount": {
"location": "path",
"required": true,
"type": "number"
}
},
"path": "creditKickbackKash/{userId}/{creditAmount}",
"response": {
"$ref": "ResultDTO"
},
"scopes": [
"https://www.googleapis.com/auth/userinfo.email"
]
}
Is anyone else having this issue? How can I get the discovery document generation to properly format the document including double number types?
I had the same problem. I rolled back from 1.9.50 to 1.9.48 and the problem is gone.

Gcloud::Datastore::ApiError - Api call runQuery is not working

When i run on local. Everything is going okay.
But my appication is not running on cloud provide url
https://<your-project-id>.appspot.com
But working Great on locally.
When first time i deploy its work for me https://<your-project-id>.appspot.com but when i add class and apply add, delete, edit operation its not work on https://<your-project-id>.appspot.com but still working on local.
After deploy
"response": {
"betaSettings": {
"has_docker_image": "True"
},
"name": "apps/trial-project-1103/modules/default/versions/20151021t211200",
"handlers": [
{
"securityLevel": "SECURE_NEVER",
"authFailAction": "AUTH_FAIL_ACTION_REDIRECT",
"urlRegex": ".*",
"login": "LOGIN_OPTIONAL",
"script": {
"scriptPath": "PLACEHOLDER"
}
}
],
"manualScaling": {
"instances": 1
},
"vm": true,
"#type": "type.googleapis.com/google.appengine.v1beta4.Version",
"runtime": "custom",
"id": "20151021t211200",
"resources": {
"diskGb": 10,
"cpu": 0.5,
"memoryGb": 1.2999999523162842
},
"threadsafe": true
},
"done": true,
"name": "apps/trial-project-1103/operations/e302b28c-6984-4362-a823-891f8806e10d",
"metadata": {
"target": "apps/trial-project-1103/modules/default/versions/20151021t211200",
"insertTime": "2015-10-21T16:14:55.935Z",
"method": "google.appengine.v1beta4.Versions.CreateVersion",
"user": "sajjadmurtaza.nxb#gmail.com",
"operationType": "create_version",
"endTime": "2015-10-21T16:17:44.649Z",
"#type": "type.googleapis.com/google.appengine.v1beta4.OperationMetadata"
}
}
Please guide me why this is happening.?
It's impossible to answer your first question without knowing a lot more about your app.
To answer your second, logs are found in the Google Cloud Platform Developers Console. Select your project, then navigate to Monitoring > Logs. You'll be able to see all of the logs for your project.
Have you successfully followed this tutorial?
https://cloud.google.com/ruby/getting-started/hello-world
if you can't ssh into the machine & see the production.log. then, you can enable logging by adding the following to config/environments/production.rb & deploy again
config.consider_all_requests_local = true
This will show the error in the browser itself
Be sure that you've enabled Datastore API in the Developer Console. Also, double check your Project ID and your Dataset ID (which should be the same as the project ID).
In my experience, these are the most common reasons for this error.

How to download attachments from JIRA v6.3.15 in java

I'm trying to get list of JIRA issues created after a given date and download the respective attachment files from my application in java. The JIRA Server version I am currently using is 6.3.15.
When I searched on web I found the below REST client, however it says it supports till JIRA Server 6.0. I want to know whether it supports 6.3.15 as well, if not are there any other alternate solutions?
REST Java Client for JIRA
by Atlassian Labs for JIRA Server 5.0 - 6.0
https://marketplace.atlassian.com/plugins/com.atlassian.jira.jira-rest-java-client
REST Java Client for JIRA is a wrapper around JIRA REST https://docs.atlassian.com/jira/REST/6.3.15/.
I see that there was no changes in attachment REST methods between 6.0 and 6.3.15. Take the current version and I am sure it will work for you.
Another way is to directly use JIRA REST API and in your case it can be even simpler. I guess you need:
call https://YOUR_JIRA/rest/api/2/issue/CURRENT-ISSUE?fields=attachment for one issue or
https://YOUR_JIRA/rest/api/2/search?jql=YOUR_JQL&fields=attachment to return set of issues matching JQL query (make sure to take care about paging if you expect more than 1000 issues)
For each issue there will be a section with attachments:
"attachment":
[
{
"self": "https://vkrupach.atlassian.net/rest/api/2/attachment/10100",
"id": "10100",
"filename": "to test",
"author":
{
"self": "https://vkrupach.atlassian.net/rest/api/2/user?username=vkrupach",
"name": "vkrupach",
"key": "vkrupach",
"emailAddress": "vkrupach#ukr.net",
"avatarUrls":
{
"48x48": "https://vkrupach.atlassian.net/secure/useravatar?avatarId=10122",
"24x24": "https://vkrupach.atlassian.net/secure/useravatar?size=small&avatarId=10122",
"16x16": "https://vkrupach.atlassian.net/secure/useravatar?size=xsmall&avatarId=10122",
"32x32": "https://vkrupach.atlassian.net/secure/useravatar?size=medium&avatarId=10122"
},
"displayName": "Volodymyr Krupach [Administrator]",
"active": true,
"timeZone": "Europe/Moscow"
},
"created": "2015-04-19T10:05:59.696+0300",
"size": 469,
"mimeType": "text/html",
"content": "https://vkrupach.atlassian.net/secure/attachment/10100/to+test"
}
]
"content": is direct link to file.

Updated RKRelationship Mapping with RestKit

I've been diving into RestKit lately but since the newest version came out so recently, all the tutorials I've found both on their github and just on the web are all for old versions. Normally that's not a problem but a lot of classes that used to exist now don't, which of course, makes all the tutorials useless.
For the sake of everyone that uses it, for the newest version of RestKit, how would you relationship map this sample JSON?
{
"entities": {
"message": [
"dentist appointment"
],
"dateRange": [
{
"start": "2012-11-15",
"end": "2012-11-16"
}
],
"time": [
"02:00:00PM"
]
},
"action": "REMINDER_SET",
"category": "REMINDER"
}
Upvote this if you have the same question.

Resources