Getting started with Windows Azure - c#

I'm going to sound like a complete newbie here but here goes...
I've just signed up for a Windows Azure account and was hoping to get a simple hello world aspx page up and running in a browser to see how it all works but I can't seem to find a simple guide to getting a very simple web application running.
I've got as far as setting up a "service" and going onto the "deploy" page but it's asking me upload an "application package".
I've looked on MSDN but there aren't any simple guides, just reams of documentation talking about "roles" and "development fabric". For somebody that is proficient in HTML/CSS and knows a little abit about asp.net it may just as well be in another language.
So, does anybody know how to upload a simple aspx page and then access it in a browser?
Jon

Make sure you're careful with your app as well. Leaving a simple HelloWorld app running 24/7 for 1 month could cost you approx $85 in fees.
($0.12/hr x 24hr x 30days = $86.40)
http://www.microsoft.com/windowsazure/pricing/

Does this guide help you? It seems pretty detailed for what you're looking for.
Note: When you're looking at helping documentation, I strongly urge you to focus mostly on documentation/posts dated AFTER November, 2009. It was about then that Microsoft made and released some major changes to Azure. Anything older than that might be outdated and unhelpful.

Download and install
1. Windows Azure SDK: http://go.microsoft.com/fwlink/?LinkID=130232
2. Windows Azure Tools for Visual Studio: http://go.microsoft.com/fwlink/?LinkId=128752
Request a Token: http://www.microsoft.com/azure
After getting the token create an application: https://lx.azure.microsoft.com
Open visual studio: new –> project –> Cloud Services –> Web Cloud Service
Write hello world code in the Default.aspx page (be creative)
Right click on your Service project (Not the _WebRole) and select publish.
Select Deploy and Upload you package and configurations
Select Run.
This from Rimon
http://blogs.msdn.com/rimontadros/archive/2009/04/17/windows-azure-hello-world-application-in-8-steps.aspx

An application package is simply an encrypted zip of your project here is a good guide to get you started.

Looks like others have covered things quite well. I just want to add two blog posts that I put up recently, specifically related to managing your account and understanding the true cost of web roles and worker roles:
First: How to correctly set up your account to use the MSDN Premium offering (assuming you have an MSDN Premium account.
Next: The true cost of web and worker roles. This one post could save you a LOT of money. Andrew Lewis already pointed you to the pricing, but this post will illustrate how costs accrue even when your app is not running.

I found that the Windows Azure Platform Training Kit was pretty helpful when I was getting started. It is simple step by step hands on stuff.

Related

How to really send a message to a user in Teams through a bot

The last few days, I checked dozens of samples, docs, blog posts, youtube videos (courses, that I couldn't fine) and I can say I'm still confused and I still without a Teams bot.
Every example I've checked is different in approach, and now I'm pretty sure there are many others like me.
Frequently problems: required input/parameters like service Url, conversation Id, etc. 1. You can't find a explanation for them. 2. You can't find a place where it's explained how to get them.
What I want to achieve
I want a bot on Teams, with a API, with 2 parameters: user email, message. The bot has to send the message to the specified user. That's it.
I'm looking how to:
Create/Setup the Application
Create the actual Bot
Install the application to Teams
I used to create a Teams conversation bot. Hope my experience will help you.
First, download sample provided by microsoft. I uses c# to create this bot, so I copy the '57.teams-conversation-bot' folder and opened it with vs studio. In this sample, I need to modify the configuration in appsettings.json. I need to enter the appid and apppassword.
So the next step is creating an Azure ad application in Azure portal. But if you never create Bot Framework registration resource before, you can create the azure ad application when you create a Bot Framework.By the way, You can leave 'Messaging endpoint' empty now. Please note, when you creating Azure ad application, you can choose to set this application as a multitenant app if your account creating the app is in a different tenant with your teams account.
Now I have a bot framework and an Azure ad app, I can modify appsettings.json, enter the appId and app password. I can get appId in app overview page and get app password when creating client secrets in Certificates & secrets tag.
Now, I need to debug my sample with web chat in the azure portal(Enter the bot framework created just now, you can see Tag 'Test in web chat' in the left panel). So I need to use ngrok to make the bot visit my code in local environment. Running the sample by pressing F5 in vs studio. Opening ngrok.exe and running the command ngrok http -host-header=rewrite 3978. Then I can get a https url, copy that and paste in the 'Messaging endpoint'. Don't forget to add '/api/messages'.
Now sending 'hello' to the bot and you will get default result. When you get the picture below, it means you have made a correct configuration.
Next step is to add this bot to Teams client. First, I add the Teams Channel in the bot I created in the azure portal.
Then I need to modify the manifest file. Replacing the "YOUR-MICROSOFT-APP-ID" with appId creating just now. And creating manifest.zip file which contains the three file in folder TeamsAppManifest.
Next step is uploading the zip file to Teams client. Click the 'Apps' in the lower-left corner and click the 'Upload the custom app' in the bottom of the left panel, then click add. Ok, now I get a team conversation bot.
There -are- a ton of approaches, partly because Teams development is still relatively new, partly because the Bot Framework (the set of tools for buildings Bots in the Microsoft world, both for Teams and otherwise) has also undergone some major changes. That's aside from the various language options (dotnet, node, python, etc.).
What's looking to be a good place to get started though, is the new Teams Toolkit, a plugin for Visual Studio and Visual Studio Code, for building a new Teams project (Tab, Bot, etc.). Have a look here for a link. It's very new though, so some rough edges, but it's aiming to be very comprehensive to get up and running quickly (does a lot of Azure registrations behind the scenes, for example). Check out the latest monthly Teams Developer call, from earlier this week, for a visual run-through: https://www.youtube.com/playlist?list=PLWZJrkeLOrbbTKzV1sQOFAXd_s0BHJDiL (this week's call isn't up yet, but it should be very soon).

Post to my page from my facebook App using c#

I designed a contest application for my Facebook page.
The application is a web application (MVC / C#), using Facebook connect to authenticate users.
I would like that when a person wins in the game, the application publishes on my Facebook page (not on the profile of the user, only on my page) a message like "Georges B just won a Bluetooth headset."
I have no problem with development or code. But Facebook is a gas plant and it is very difficult to find up-to-date documentation. I tried with Token users, but it does not work anymore. I do not know how to do it because the majority of tutorials on the web use this solution.
Thanks.
OK, negative notes without any explanation. This forum becomes anything. I understand the basics of respect but still, it is not with repression that people are advanced ... Explanations would be a minimum.
I'm going to fend for myself and I'll only read the existing posts without participating in the future.

Problems following guide for basic MVC creation in Azure

I'm following this guide and it seems to differ from what I see on my computer.
In the image where I'm supposed to pick the type, I select MVC but on my machine, I see addition options (about Azure, besides the authentication). I leave it be as it is. After that, I get the image below and it's not mentioned by the guide at all.
I'm signed in and I'm picking a name for the web site. However, the part that I'm unsure of is the database server option. I can only pick No database or New server but I want to use the one that I already have, one that's got a database that I'm using in another project (non-MVC).
How should I handle this discrepancy? Am I using a substandard guide?
this option is visible for you because you have a superior Visual Studio Update, but, simply, you can uncheck this a go ahead, this check in mean to create a web site or virtual machine to publish your site in Microsoft Azure, but is only an option (you need an Azure subscription), if your check this option and select for example the individual user accounts for security, you need a database, and Azure mean that you have an Azure Sql Database (this is not the only option that you can use).
If you want to follow the guide, simply, uncheck the option Host in the cloud and go ahead an learn MVC!

Why is my Azure website no longer visible?

I have created a new website and published it (via Visual Studio) to Azure.
Initially, everything worked fine.
But, after republishing the website a few times, the website stopped responding - i.e. it shows a "Server not found" error in Firefox or "This page can't be displayed" in IE).
Now, any new website I publish shows the same error. (Here's a basic test site I published, so you can see the message: http://www.test-website.azurewebsites.net)
The previously published websites are still working; it is just new websites that are failing.
Does anyone know why this would be happening?
Additional Info:
The website was created using Visual Studio 2012 C# ASP MVC .NET 4.5
The websites are using Microsoft's 'Free' pricing tier.
There are a total of 3 websites on the Azure account.
Claies brought this up in a comment, and I'll take it a step further. Your link should not start with www. when you're visiting a .azurewebsites.net domain.
If you're just typing this, then that's the issue.
On the other hand, given that you're asking this, I'm wondering whether maybe your configuration file is a bit messed up in VS. When you run the publish wizard, try going back a couple pages to the page with the textboxes, and double-check that none of those refer to the www. version. If they do, simply drop that.
That settings shouldn't affect the publish itself, but it will determine which URL to go to when publishing completes, so you'll definitely want to get that fixed if it is wrong, or else this will just keep happening.

Creating / Managing users remotely

I've put my site online and I'm looking to add/change user membership. From Visual Studio, I can access the Website Administration Tool WSAT and it's great if you just want to add users manually. Is there a similar way to change users once the site is hosted on a remote server?
For the moment, I change the user information through the WSAT and re-FTP the mdf file; it's pretty painful. Let me know if there's a better way.
Thanks.
I believe there are only two options.
If you have control of the server
you can enable access to the WSAT on
the server.
Code up your own little management system.
Here's a link that covers both in a little more depth. That link also references the 4guysfromrolla.com tutorial which, while dated, is still relevant.

Categories