Is there a way to write C# code in an Azure Function running in the Azure cloud to move files to and from an instance of SharePoint on-premises ? I have heard that to do this I require some sort of data gateway or connector of some sort to be in place.
Any guidance much appreciated, thanks.
Yes it would be possible but there's lots of factors to take into account with regards to your environment and how it is configured from a network perspective.
You are able to run Azure Functions within your on-premises environment. You can see some of the hybrid scenarios here:
https://learn.microsoft.com/en-us/azure/architecture/hybrid/azure-functions-hybrid#running-azure-functions-on-premises
There's also App Service Hybrid Connections which allow you to reach on-premises infrastructure:
https://learn.microsoft.com/en-us/azure/app-service/app-service-hybrid-connections
There's a devblogs post with a scenario you can read also:
https://devblogs.microsoft.com/premier-developer/using-azure-app-services-with-hybrid-connections/
Related
I have set up an Azure On-Premise Data Gateway by following these instructions here. I also tested accessing through Logic Apps following these instructions.
However, I don't want to use Logic Apps. Are there any client libraries where I can directly access the gateway instead of only being able to talk through the Logic Apps workflow schema?
All I'm trying to do is stream files from file paths on-prem using C#.
Unfortunately, there is no such DotNet SDK or any another SDK is available for you as of now which might help in On-Prem Data GateWay accessing.
As of now, you can use only the Power BI, Microsoft Flow, Logic Apps, and PowerApps services that may help you to securely transfer the data between On-Prem and Cloud.
There is also some list of an available data source for on-prem data gateway. You can find it here
If you are trying to move on-Prem SQL server to Azure SQL Database then ADF would be helpful
So finally, you would need to continue with your Logic Apps or other services which currently support the onPrem Data Gateway
The gateway is built on top of Azure Relay, which you can use directly. Hybrid connections are also available in App Service.
Is it possible to read a file located on local machine path C:\data with an azure function trigger by http request ?
You can expose a local file system to Azure using the on-premises data gateway.
However this supported from Logic Apps, but not as far as I know from Functions. You could however still use the Logic App as a bridge to your Function using the Azure Function Connector.
You are of course free to use your own personal computer however you like, but be aware that the on-premises data gateway exposes machines on your own network directly to the internet, which in the context of a business is often considered a significant security hazard. Definitely do not do this in a business context without clearing it with IT security persons first.
I would say no. The resource that you want to read data from needs to be accessible from the web. Put the files in the cloud so that the function can access them.
Is it possible to make HTTP calls to applications outside of Azure from a web API running in Azure?
I'm trying to connect a ASP.NET web API in Azure to a wpf application that runs on a PC at my company. Both the applications request data from each other using HTTP calls with JSON. This works fine locally because i can use localhost but
when running the web API in Azure the web API can't reach the wpf application
I have looked into Azure Point-to-Site and Site-to-Site connections but most examples that i found show connection with a VM in Azure and nothing about web API's.
Thanks in advance!
I still don't get your scenario even after reading all the comments, however here's a shot in the dark.
First of all, no, there are no restrictions as to what destination you may call from Azure, yes that includes the dark web, although not necessarily a recommended destination for both traffic and tourism alike.
For the second part, if what you're calling is behind a firewall and your API runs in Azure App Service, take a look at Hybrid Connections, it's built as a solution to that exact scenario, no IPsec or firewall rules are in play. The connectivity from on-prem will be outbound.
I am trying to implement Azure Redis Cache in my app. When I see the documents they say I have to define a cache storage in the Azure online tool. I am wondering is there a way to skip that step and use Redis for development without using the actual server thing?
You can install Redis locally and use localhost. That might be one of your options even though I don't think it's faster.
You can download it and install it from here.
You can run Redis server locally, and start the experiment. But if you have decided to use Azure Redis, you should develop toward the real one as early as possible. Several reasons:
Azure Redis supports SSL and this is the default port. You should use this.
Azure Redis has high availability support through master slave.
Azure Redis provide Cluster support.
It might experience unexpected patching process causing temporarily data loss
These things are not easily setup and test locally.
To start off with, I am aware of this question that seems to ask the same thing. However I'm going to ask it again with a slight modification.
I'm working on a project to print PDF's. We have a library for PDF manipulation. We can use it to render a PDF to a file that the System.Drawing.Printing.PrintDocument object can use and print in c#. We are going to have an Azure Worker role that takes many 1-page pdf's and turns them into one large pdf, and I would like to have another Azure Worker Role that then spools that large PDF to a Windows Print Server here locally.
Since the printing part is so much slower (compared to the pdf creation/aggregation piece) I would like to be able to host it in azure to easily scale.
My initial thought was "I don't think this is even possible. How would Azure be able to know anything about my local print server." Which is the basic answer from the above similar question. But after some searching, I found some results that seem to indicate setting up a VPN Site-To-Site Tunnel or ExpressRoute Connection would let me do what I want. However I'm relatively new to Azure and the results I found are short on actual, useful, helpful details.
If it can't be done, fine, I can set up an application server locally to do the printing. But if someone has ideas or more insight on how to accomplish this I would love to hear it.
Basically, you could store PDFs into Azure Blob Storage like:
http://azureaccount.blob.core.windows.net/PDF/pdf1.pdf
Then you define an Azure Queue entity like:
MyQueue(Pdf_Id, Pdf_Blob_Url)
MyQueue(1, http://azureaccount.blob.core.windows.net/PDF/pdf1.pdf)
MyQueue(2, http://azureaccount.blob.core.windows.net/PDF/pdf2.pdf)
and submit to the Azure Queue.
Then on your Printing server, just setup an application to check the AzureQueue to process the PDFs. At this point, just get the PDFs directly from Azure blob storage url to do anything you want like merging, printing,....
Without getting into the VPN / Site-To-Site setups, here is an Idea:
You could have a small application hosted on your network that uses Service Bus Relay to expose a WCF service (this will allow incoming connections to the service from the role)
The worker role can consume this Service and then send the PDF for printing to it.
Your App would send the PDF to the printer via PrintDocument object you mentioned.
See:
https://azure.microsoft.com/en-gb/documentation/articles/service-bus-dotnet-how-to-use-relay/
What is the Service Bus relay? The Service Bus relay service enables
you to build hybrid applications that run in both an Azure datacenter
and your own on-premises enterprise environment. The Service Bus relay
facilitates this by enabling you to securely expose Windows
Communication Foundation (WCF) services that reside within a corporate
enterprise network to the public cloud, without having to open a
firewall connection, or require intrusive changes to a corporate
network infrastructure.