Azure storage account connection - f#

Having just created an Azure storage account with the following details:
Location: UK West
Subscription: Pay As You Go
Performance/Access Tier: Standard/Hot
Replication: Locally-Redundant storage (LRS)
The first thing I did was execute the following code (with my real account name and account key in place of MyAccountName and MyAccountKey) in an F# FSI.
open Microsoft.WindowsAzure.Storage
let connectionString = #"DefaultEndpointsProtocol=https;AccountName=MyAccountName;AccountKey=MyAccountKey"
CloudStorageAccount
.Parse(connectionString)
.CreateCloudTableClient()
.ListTables()
|> Seq.toArray
But I receive the following error:
Microsoft.WindowsAzure.Storage.StorageException: The remote server returned an error: (501) Not Implemented. ---> System.Net.WebException: The remote server returned an error: (501) Not Implemented.
Any idea why?

Performance/Access Tier: Standard/Hot
According to the details you created your storage account, I assumed that your Account kind is Blob storage. As I known, Blob storage accounts are specialized for storing blob data. Based on your code, you need to re-create your Azure Storage Account and choose the General purpose for your account kind, which could provide storage for tables. Also, there is a similar issue, you could refer to it.

Related

Publish Azure App With Database Connection String Using Active Directory Integrated Not Working

I have previously deployed an MVC application to Azure.
Under Publish -> Settings -> Databases, I include connection strings.
I have been using the following: Data Source=tcp:servername.database.windows.net,1433;Initial Catalog=dbname;User ID=username;Password=password;Encrypt=True;TrustServerCertificate=False
The problem with specifying a user is that stored procedures run as the user specified.
This results in CreatedBy/ModifiedBy values set to this same user, instead of the user that created/modified the record.
I previously tried the following: Data Source=tcp:servername.database.windows.net,1433;Initial Catalog=dbname;Persist Security Info=False;MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=False;Authentication="Active Directory Integrated"
However, I receive the error "The format of the specified domain name is invalid." after the application is deployed. Even though I test the connection with Active Directory Integrated in the Destination Connection String window, and it works.
As given in this MS Doc, if you’re using the AD Integrated type of Authentication in the Azure, then either you should have domain-joined device for accessing the Web Application linked with SQL Database or make the device as federations with ADFS.
So, if you are accessing the Azure Applications from other machines, use the AD-password type authentication mode and its connection string format is given in the same MS Document and this Doc2 for more relevant information on configuring the AD Integrated / Password Type of Authentication mode on Azure Data sources and applications.
AD Password Type Authentication Format: 
Server=demo.database.windows.net; Authentication=Active Directory Password; Encrypt=True; Database=sample_db; User Id=your_username#domain.com; Password=<Your__Password>

Datastore on Google Cloud Platform Oauth2 error and Data disappearing

I have recently lost all access to Google Cloud Platform Datastore for my app. I have records missing completely from my app and when I tried to check the data through the google cloud platform console I can no longer see any data or indexes.
I receive the following error when I try to view entities (no entities show up in the list anymore and this error appears if I try to manually enter a value in the kind field)
"Request had invalid authentication credentials. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project"
When I try to view indexes I receive a "Failed to load" error.
I have lost access to my database completely and I'm uncertain where to go from here. The app I'm using if for our CMS for our homeless charity which includes rental and tenancy information, sales information from our op shop and foodbank, and lots of client information regarding homelessness, mental health, counselling and addiction records.
Some of my clients have completely disapppeared from our system. I don't know how to save my data. Please help.
UPDATE : have been able to access datastore by updating google chrome, this has fixed the Oauth2 issue. While I can now see the data, this hasn't fixed the issue of the missing records. I'm currently migrating and updating my app from appengine ndb to cloud ndb and python 2 to python 3. I'm hoping this prevents future losses, but i've lost faith in the integrity of google datastore.

App Maker and Cloud SQL - connection issue

I am working on an app which is using Cloud SQL database. I am already connected with Cloud SQL instance using instance name, user name, password. I am able to create tables (by adding model), drop tables (by check) from App Maker level.
However I can't insert record using form. I also can't present the data in tables.
I am getting following error,
Exception: Unable to connect to database. Check the connection string,
user name, and password. Executing query for datasource ModelSQL:
(Error) : Unable to connect to database. Check the connection string,
user name, and password. Executing query for datasource ModelSQL
failed.
Did you set the preview credentials? (App Settings > GOOGLE CLOUD SQL > SQL preview credentials > UPDATE).
Please re-type CloudSQL credentials: in application setting - Cloud SQL for Preview or in deployment settings for Deployments.
Also ensure that your user is Editor or Owner on Google Cloud Platform's project with CloudSQL instance. And re-check setup instructions: https://developers.google.com/appmaker/models/cloudsql
Is the app running as user or as developer (https://developers.google.com/appmaker/security/identity)?

Deployment to Server fails with local Administrator

When trying deploy my Release to a Server using a local Admin Account at the Server i get the Message:
7-05-09T08:12:50.6866361Z 2017/05/09 10:12:50 ERROR 5 (0x00000005) Getting File System Type of Destination \\server\C$\temp\
2017-05-09T08:12:50.6866361Z Access is denied.
during the robocopy to the remote server.
When trying to use my domain Account (also Administrator) it works without any problems.
What am i missing?
Make sure that the UNC path \\server\C$\temp\ could be achieved by the local account you used as build service account.
I suggest that you use domain user to access the domain resources. Or you could share that folder \\server\C$\temp\ to Everyone and give the Read and Write permission.
If you insist to use a local account, as a workaround:
local accounts on each member server where the shared folders are
stored will have to be created to directly map to the same
username/password combinations the users are using on each local
machine. For example, on client 1, local user named A, password xxxx,
on the server which stores the shares, you need to create a local user
named A with the same password xxxx.

Unauthorized when query.get() in Parse .NET SDK in worker role.

ParseClient.Initialize("id", "key");
//get the publish instance.
string publishInstanceId = msg.Split(':')[1];
var getPublishQuery = ParseObject.GetQuery("PublishInstance");
getPublishQuery.GetAsync(publishInstanceId).Wait(); //Exception raised here - System.AggregateException - Unauthorized.
My App ID and Keys are valid and I've checked it thrice. I have also used Master Key, CLient Key as well as .NET key. None of them work.
This code runs in a worker role in Windows Azure Cloud Services.
Im using 1.2.16 version of PArse .NET SDK.
Is your PublishInstance set to allow anonymous access? From the looks of the above you're not logging in, so you could be getting that error due to permissions.
Personally I would suggest creating a service account and logging in using that so you can lock your permissions down.

Resources