Just to clarify I am working for the first time with azure. I created a Restful WCF Service a few months ago with SQL Server connection. I deployed the WCF on IIS with the database on SQL Server Express 2012. The service works with no problems.
[OperationContract]
[WebGet(UriTemplate = "feed/{ID}/{Rating}/{Feed}", ResponseFormat = WebMessageFormat.Json)]
string feed(string ID, string Rating, string Feed);
Now I must move the WCF service to Azure. The problem is I have no idea how to deploy the WCF to azure and if it is even possible to deploy the WCF to azure. The database have been moved to azure.
The principal is relatively easy depending on whether you want a Azure WebSite or Cloud Role - for Cloud...
Ensure you have the Azure SDK installed from the WebPlatform Installer.
Add a WCF Cloud Service Role to your project
Expand the out the project and right click onto the 'Roles' node selecting 'Add' and then existing project from your solution.
Publish the role using your Azure credentials.
These two articles provide an end-to-end tutorial that goes into more depth...
http://www.claudiobernasconi.ch/2013/08/03/deploying-a-wcf-service-on-windows-azure/
http://blogs.msdn.com/b/nishasingh/archive/2012/12/05/creating-and-deploying-a-wcf-service-on-windows-azure-and-consuming-it-in-windows-8-store-app.aspx
With this one more specific to Azure Websites
http://blogs.msdn.com/b/brunoterkaly/archive/2014/03/31/moving-a-wcf-service-and-database-to-the-cloud.aspx
HTH
Related
Created a Basic Azure Service Fabric , Stateful Service, using reliable service framework using .NET core.
Created a values controller with get operation returning string collection
created endpoint configuration in service manifest with protocol of http
Created DNS service name in the application manifest for the service
Created Azure service fabric Cluster from portal
Configured the nodes with ReverseProxy and Enable DNS
Configured the LB rules 8081,80,19080,19000
Have healthprobe at 19000,19080,8081
Published my azure fabric application from Visual studio, and I can open the fabric explorer, it shows my services are deployed correctly
but not able to access the service from outside of cluster
http://domain.eastus2.cloudapp.azure.com:19080/MyCalculatorApplication/AgeCalculatorService/api/values throws exception as {"Error":{"Code":"E_INVALIDARG","Message":"Invalid argument"}}
When you are trying to use the naming service of service fabric, first you should resolve the endpoint using this url:
http://domain.eastus2.cloudapp.azure.com:19080/Services/MyCalculatorApplication/AgeCalculatorService/$/ResolvePartition?api-version=3.0&PartitionKeyType=1&timeout=60
Then you can use one of the endpoints
I'm not sure that this is the correct endpoint.
Your url should be something like this:
http://domain.eastus2.cloudapp.azure.com:SERVICEPORT/api/values
Our DNS/webserver was setup so www.mysite.com went to the website, and mysite.com went to the service setup via DNS. This service is used by a wpf application with multiple clients all with different versions. So just changing the service url in the wpf application is not going to work as clients just don't upgrade and some are running on older versions and won't upgrade.
Is there anyway to replicate this in Azure? Since you need to verify the domain by creating a cname, I can't have the same cname point to different addresses. So any ideas on how to do this with Azure?
Would like to keep the service separate from the website.
EDIT: We have hundreds of subdomains, one for each client. So client1.example.com, client2.example.com, www.example.com, etc. And the service example.com. The service url is coded into the legacy wpf application so can't change. The wcf service is currently a app service was well.
www.example.com and example.com are distinct and separate domains. It is perfectly feasible to have example.com point to one Azure site and www.example.com to point to another.
I'm working on a project that includes an ASP.NET Web API site to be consumed by an Android and iOS app. The API is connected to a SQL Server database. I'm at a point where I want to publish my project to the Azure Cloud, but am trying to figure out what would be the best configuration.
The configuration needs to be scalable and reliable as the plans for this product will be accessed by many at the consumer level.
API Hosting
What do I use within Azure to host the API? Do I go with the Azure Web Site service? Or the Cloud service? or something else? I know I don't want to go Virtual Machine as I don't want to have a lot of maintenance.
One thing I should add here, I plan on having a Test/Qual environment as well as a Production environment in Azure.
SQL Database
This one seems easy for me, I will need to utilize the SQL Database service through Azure.
Scheduler
I have one final need of various jobs that need to run at night on some form of schedule. Would you agree that utilizing the Azure Scheduler service would be much cheaper than having either a Cloud service or Virtual Machine running scheduled tasks? Instead I could use Scheduler to utilize various web services at set times?
While Azure Web sites and Azure Web roles (cloud services) are very similar, the below are the most notable differences in my opinion:
Web Roles are cheaper than Web sites. There is a free offering for websites, but it has significant drawbacks.
Web sites are easier to manage and operate
You can deploy web sites from git.
You can use remote desktop to connect to Web roles.
You can use Worker Roles for background tasks from Web roles. Recently Websites introduced web roles which lessens the need for worker roles, note that this is as of today still in beta.
I have a WCF service using wsHttpBinding and Windows Authentication hosted in an intranet environment.
Currently I am trying to host that service into Azure VM. Service is not able to authenticate as it is outside local domain.
Please let me know the steps or rather the configuration, I would need for achieving Windows Authentication. IIS configuration WCF web.config configuration etc.
There is a wealth of information at http://azure.microsoft.com/en-us/documentation/services/active-directory/
If you want to using your domain login's. There are a few approaches to doing this depending on your requirements and this documentation is very good in guiding you to the right solution.
I'm working on an exercise and i want a help. So far I have to created an MVC4 Internet Application using C# and uploaded it to azure as a web site (custom create with sql server). Now I want to create a web service to use the same database that my web application is using. How I can do it?
I found an option when you create a new project (C#->Cloud Project-> Windows Azure Cloud Service)
Note that then i want to use the web service with workflow based service
Thank you
Connections to SQL Azure are just Connection Strings. This isn't any different than creating applications on premises or hosting them elsewhere. Get the connection string of your existing Azure SQL Database and then use that when setting up your database calls in your web service project. You can get the connection string from the Windows Azure Management portal. Dig down to the database and there will be a Show Connection Strings option on the dashboard page for the database. See this documentation if you aren't familiar with working with connection strings Azure SQL: http://msdn.microsoft.com/en-us/library/windowsazure/ee336282.aspx
Note that Azure SQL Databases do not support integrated windows authentication, so the connection string will contain the username and password. You may want to look into securing that information in your configuration.