Giter Site home page Giter Site logo

microsoftdocs / sandbox Goto Github PK

View Code? Open in Web Editor NEW
21.0 26.0 41.0 16.95 MB

Sandbox is a repo for content for employees to experiment, play with, and get feedback on new technology

Home Page: https://docs.microsoft.com/sandbox

License: Creative Commons Attribution 4.0 International

PowerShell 100.00%

sandbox's Introduction

Sandbox Overview

The Sandbox is an area of docs.microsoft.com that is designed to be a sandbox, meaning a place where we can experiment, play with new technology, and get feedback on ideas.

Sandbox Expectations

Sandbox content isn't guaranteed to be kept up-to-date, maintained, or even work :) Content may be deleted or heavily revised at any time. Community contributions and feedback are of course welcome!

Microsoft Open Source Code of Conduct

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

sandbox's People

Contributors

abhishektripathi avatar agriffard avatar amervitz avatar anthonychu avatar antoinega avatar brianpeek avatar cecilphillip avatar costo avatar dantogno avatar dgkanatsios avatar ealsur avatar elamalani avatar gjcampbell avatar intrepidsoldier avatar jonathanpmast avatar maximrouiller avatar mikhailshilkov avatar paladique avatar supernova-eng avatar thedanfernandez avatar timheuer avatar wa1 avatar wingtofree avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sandbox's Issues

Documents does not exist in the namespace Microsoft.Azure

Hi,
I get an error when trying the DocumentClient example...

error CS0234: The type or namespace name 'Documents' does not exist in the namespace 'Microsoft.Azure' (are you missing an assembly reference?)

Is this documentation still valid for Azure Functions 2.x?


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Typo on "Creating HTTP Redirect"

"response.headers.Location": "https://dosc.microsoft.com/"

--> https://docs.microsoft.com/


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Supporting wildcard routes.

I'd like to support function1 and function1/arbitrary/path. Is that supported ? If so what is the "recipe" for that?


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Good examples

This page contains the examples I was looking for, particularly how to use the Route in the HttpTrigger attribute. Thanks !


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Suggested recipe for reading HTTP headers

Dears,

I would like to suggest adding the following recipe for reading HTTP headers, I created and tested this sample code for a customer who was asking for an example code on how to get the client IP address from the HTTP headers. Think this would be helpful to include with the "HTTP and webhooks" recipes for any customer who are looking for the same:
############################################
using Microsoft.Azure.WebJobs;
using Microsoft.Azure.WebJobs.Extensions.Http;
using System.Net.Http;
using System.Net;
using Microsoft.Extensions.Logging;
using System;

namespace FunctionApp1
{
public static class Function1
{
[FunctionName("ReadingRequestHeaders")]
public static HttpResponseMessage Run([HttpTrigger(AuthorizationLevel.Anonymous, "GET", Route = null)]HttpRequestMessage req, ILogger log)
{
log.LogTrace("Reading the request headers in HTTP Triggers");
// Read headers
try
{
System.Collections.Generic.IEnumerable<string> data = req.Headers.GetValues("x-forwarded-for");
// Echo request data back in the response
return req.CreateResponse(HttpStatusCode.OK, data);
}catch (Exception ex){
log.LogTrace(ex.Message);
return req.CreateResponse(HttpStatusCode.OK, "x-forwarded-for header is not available when testing Functions locally, Try Publishing the function to Azure then invoke it from there!");
}
}
}
}
############################################


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Takeaways under "Logging in orchestrator functions" unrelated

The Takeaways section (https://docs.microsoft.com/en-us/sandbox/functions-recipes/durable-diagnostics#takeaways) under Logging in orchestrator functions (https://docs.microsoft.com/en-us/sandbox/functions-recipes/durable-diagnostics#logging-in-orchestrator-functions) is a copy-paste from the following page, and does not relate to the topic:

https://docs.microsoft.com/en-us/sandbox/functions-recipes/durable-manage-orchestrations#inspecting-the-status-of-an-orchestration

In addition, each of the anchor links for the Takeaways and Read More sections respectively on this page are identical and should either be separated or removed.


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ICollector couldn't accept message with SessionId

Service Bus Queue can have SessionId, its not clear how we can set SessionId by ICollector.


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Can we have same code sample with nodejs

Can we have same sample with nodejs . The main thing we can have is how to reuse connection using nodejs example


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

F# example doesn't work

DocumentDB was renamed to CosmosDB for Azure Functions 2.x
Generating new functions also use HttpRequest instead of HttpRequestMessage
It would be nice to have recipes that are up-to-date.


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Does `dynamic` type exist in F#?

From the docs:

The example uses an object parameter, but the binding can work with other types, including: dynamic, string, 

Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ServiceBusTopicTrigger sample -> Method name should be "Run" instead of "RunTopic"

[FunctionName("ServiceBusTopicTrigger")]
public static void RunTopic([ServiceBusTrigger("functopic", "sampletopic", AccessRights.Manage, Connection = "ConnectionSetting")]string topicMessage,
TraceWriter log)
{
log.Info("101 Azure Function Demo - Service Bus Topic Trigger");

log.Info($"C# ServiceBus topic trigger function processed message: {topicMessage}");

}


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

What about 2018.4?

It seems like the 2018.1, 2,3 works and 2019 doesn't.
no mention about 2018.4.

No documentation to send subscription name along with topic in [ServiceBus] attribute

In the above example, it is shown that [ServiceBus] attribute can take "topic name" but how do i send "subscription name"? Is it possible to do so that POCO can be added to IAsynCollector collection?


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Connection Management Best Practise

Hi, how exactly do the above examples tie in with connection management best practices - specifically the info listed here: https://docs.microsoft.com/en-us/azure/azure-functions/manage-connections
We are running one of the above examples (the Save multiple documents example) in Azure and are receiving intermittent errors: "An operation on a socket could not be performed because the system lacked sufficient buffer space or because a queue was full"


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Several issues with readability, typos, links

Issues with readability:

  • The very start of the article begins "When is started by using ...", probably should read "When a sub-orchestration is started by using..."
  • "When using an HttpTrigger ..."
  • "... invoked on an orchestration instance ..."

There are probably other issues.

In addition, each of the anchor links for the Takeaways and Read More sections respectively on this page are identical and should either be separated or removed.


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

'Multiple assemblies with equivalent identity have been imported' error after importing the SDK

[Enter feedback here]
I followed the exact instructions given on this page and imported the Event hub SDK into my unity 2018.4.23f1, then Unity hub pops up an error that says:
Multiple assemblies with equivalent identity have been imported: 'C:\Users\BarryZhang\Desktop\event_hub_test\Assets\Plugins\Microsoft.CSharp.dll' and 'C:\Program Files\Unity\Editor\2018.4.23f1\Editor\Data\MonoBleedingEdge\lib\mono\4.7.1-api\Microsoft.CSharp.dll'. Remove one of the duplicate references.

I didn't even write any script or create any object , this error shows up immediately after I imported the SDK, any workaround?


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

can you give some java function connect cosmos db and kafka sample

I want to use java function to connect cosmos db, when db changed can create feed message to kafka, do we have some sample code or links? thanks!


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

How to add metadata to Message when using an output binding?

I am using a Azure Function with an output bidning as is described in section: "Using ICollector with Service Bus queue bindings"
I need to add specifik metadata to the message that are added to the queue, but it seeams like thats not supported?
I want to filter the messages in the topic with Message.CorrelationId or Message.Label,
I tried to use ICollector<Message> but it throws exception "Error getting value from 'ExpiresAtUtc' on 'Microsoft.Azure.ServiceBus.Message'".
How can I add metadata to the message using output bindings?


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

This page is out of date

The examples on this page are Azure Function V1 implementations that aren't necessarily compatible with Azure Function V2 implementations. (For example, functions with Event Hub input bindings are asynchronous, and aren't compatible with how a Service Bus output binding is defined here, as it uses out parameters).

This page should either be updated, or marked deprecated with a link to updated documentation.


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

There's a missing parenthesis in the 5th code snippet

[DocumentDB("test", "test", ConnectionStringSetting = "CosmosDB"] DocumentClient client,
int minAge

Think it should be:

[DocumentDB("test", "test", ConnectionStringSetting = "CosmosDB")] DocumentClient client,
int minAge


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

How to give "subscription" in [ServiceBus] output binding?

In all the examples, i can see only topic and queue is being mentioned. What if i want to publish message to a specific subscription of a service bus topic. I dont see any parameter or message properties which i can set using IAsynCollector method. Please suggest ASAP.


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

JSON code snippet is incorrect.

This code snippet:

{
  "http": {
    "routePrefix": ""
  }
}

Should be:

{
  "extensions": {
    "http": {
      "routePrefix": ""
    }
  }
}

Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Setting/Creating Environment Variables within Azure Functions.

I have a question regarding caching of Environment Variables in Azure Functions.

We are creating environment variables in our code dynamically and using them.
Example:-
Environment.GetEnvironmentVariable("access.key", "auto generated long lived auth keys.")

We wanted to make sure that these environment variables are not cached in any of the azure file system.

Thanks,
Chethan


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Different style of examples on the same page?

Different examples at https://docs.microsoft.com/en-us/sandbox/functions-recipes/cosmos-db (https://github.com/MicrosoftDocs/sandbox/blob/master/sandbox/functions-recipes/cosmos-db.md) seem to have different style.

The first samples:

  • Don't have usings
  • Accept objects

Later samples:

  • Have usings
  • Have custom classes for documents
  • Still are not valid runnable full examples, because they miss static class declaration

Is there a reason for that? Shouldn't we simplify the later examples?

cc @anthonychu @cecilphillip

where is java example

Hi Team, I can imagine Microsoft favorite language C# is very good but there are other languages like Java which is there in the market as well. if you want to make a nice document please always include Java example. All the time documents of Azure ignore Java examples and that's very frustrating.


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Unity 2018.2 SSL Support

As of Unity 2018.2 there is modern SSL/TLS support in .NET
This means a developer doesn't need to use the unsecure workaround listed.

Source: https://blogs.unity3d.com/2018/07/11/scripting-runtime-improvements-in-unity-2018-2/


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

TraceWriter becoming obsolete

Hello, in the current version of Azure Functions SDK, it says that the TraceWriter is obsolete and should be replaced with ILogger instead (recently did such refactor in my code), maybe it is good idea to replace it here as well?

Regards, Jakub


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

httpTrigger not supporting routePrefix?

httpTrigger not supporting routePrefix? It doesn't seem to work, why not supporting prefix?

in host.json I get an error "property routePrefix is not supported"


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.