I am trying to add our first Azure Function App, which will read from a queue and update an Azure Search Index. I wrote everything in a C# dialog app to make sure the data would parse and upload properly.
Apparently when you are running in Azure the following line of code is too much to ask for:
using Microsoft.Azure.Search;
Azure has no idea what that library is, and now I have to stop using the Portal and download Visual Studio 2017 and follow a long list of steps to put this Microsoft supplied reference into my Azure bin folder for Azure Functions?
Really Microsoft? I just need access to the Search objects and I am done, but the little documentation I can find says I need to spend a few days installing software and setting up FTP somewhere if I want to get there.
Is there a more direct path?
If you develop function through the portal then use NuGet package. The package is called Microsoft.Azure.Search
In short, you have to create a project.json file with the required NuGet package references.
Here is a good explanation and here you can find Microsoft documentation.
Related
I have a C# application that is built using the .NET Core Web API template. This works great locally and I can access the rest endpoints in my application.
For example /api/person/0 where 0 is the id of a person.
The problem is with Azure. When I create an app service and use a github repository the app gets deployed. In the logs I see the following partial error:
Physical Path C:\home\site\wwwroot\api\gerecht\1
Azure thinks that my C# app is a simple website and tries to access the path as a physical file and not as an endpoint in my application. Why is Azure not accessing the endpoint?
Thanks
How did you deploy the application to Azure?
[Brute Force]
You may want to use GitHub Action from inside Visual Studio for this.
Right Click Publish
Azure (Select appropriate OS)
Deploy using GitHub Action
I experience this in the past and that was how I solved it.
Alternatively, you could use the Azure CLI from inside the directory that contains your .csproj file.
Official documentation here.
I'm setting up a program that will run on a Linux VPS, and I'm a little confused.
Here's what I've got set up:
I have a Linux VPS running.
Every time I merge my GitHub repo's dev branch to master, it will automatically deploy a publish folder in the repo to the VPS containing all the compiled components, inc the main .dll.
I have a service on the VPS that picks up the main .dll and runs it.
The bot's token is stored in a .resx file that is in the .gitignore file, and as such, isn't in the repo.
The problem I'm having is, Discord notifies me it's found my bot's token in the compiled .dll on the GitHub. I was under the impression that as the .dll was compiled that the token would be either impossible or extremely difficult to extract.
I may be wrong.
Is there any way around this? The bot is written in C# DotNetCore.
Thanks,
Josh
Download a decompiler like Telerik Just Decompile and you'll see the string. I think you can find in a text editor as well.
If you want a way around Discord finding token in your public repository, make your repository private.
If you want to store something private in an exe/dll and want it to remain private, your only option is to not distribute your exe/dll.
I know that I in the past was able to find the code used for the visual studio part of the azure sdk.
Need to see how visual studio selects certificate and generate remote access passwords when creating cloud services. But I have had no luck searching around in https://github.com/WindowsAzure for it
Need the c# code that selects a certificate and uploads it to azure for the deployment.
Not sure where the actual SDK source is, but I've posted this solution on SO and my blog for Securing Azure ServiceConfiguration values for Enterprise Deployment. Writing the code to encrypt/decrypt is trivial and full examples are provided. Adding the certificate to a deployment is also easy - just add it to to role settings. Depending on which SDK you are using, you may have to run with elevated privledges.
I've built a Winforms Application, and I want to publish it. I'd like to have a link on a website https://sites.google.com/site/satsavvyboardgame/home where I can have the user download the application and have it install on their computer. So far, I haven't found any way to wrap everything up in one package, or successfully publish to the web. What are the specifications for the URL to publish to the web?
Is there any way to package everything into one item (the site won't allow me to upload/download folders), so that the user could download one item, then run that or something in it?
Is there another way to do this that I haven't seen?
I'm using C# Visual Studio 2010 Express, and my application has the code and a couple of XML files that I need to run. All are part of the project, and run fine when I install from a file using the CD publish settings.
I've never published an application before, so any help would be much appreciated. Thanks!
You have 2 general options:
use "ClickOnce" which will enable automatic updates each time the user click to install and have several other benefits such as less problems with priviliges.
Use "Windows-Installer", which allows you more control of how to do and what to do during the installtion phase. However, shamefully, Package & Deployment project types do not exist anymore in vs2012. there are several 3rd party packages you can work with to create your setup-project.
The ClickOnce is preferable if what the user download is a just a simple standalone game application for example.. the MSI is for the more "rich" applications that should make extensive usage in the machine registry and etc..
The table in this link will give you the data you need to make a decision:
http://msdn.microsoft.com/en-us/library/142dbbz4(v=vs.80).aspx
After creating a Azure Project within my silverlight app and adding the existing service as a "Add Web Role Project in Solution" I can run my silverlight app hosted in the Cloud and run it successfully locally.
I would like to use the SDK Toolkit instead of Visual Studio to create a package from the webrole. But what is the correct path to the WebRole?
In order to create a package, you shouldn't need to know where your local role runs. You should only need the service definition file and the binaries/files.
See the cspack cmdline:
http://msdn.microsoft.com/en-us/library/windowsazure/gg433133.aspx
You can also use msbuild to create a package:
http://msdn.microsoft.com/en-us/library/windowsazure/hh301088.aspx
Also, this is a good starting point:
http://msdn.microsoft.com/en-us/library/windowsazure/gg433055.aspx
Let me know if I mis-understood what you're trying to ultimately accomplish.