OData support in ASP.Net Web API RTM 2012 - visual-studio-2012

How to implement the OData in ASP .Net Web API using Visual Studio 2012?

Use Web API OData preview package - http://nuget.org/packages/Microsoft.AspNet.WebApi.OData
You can find overview articles by Alex James here - http://blogs.msdn.com/b/alexj/archive/2012/08/15/odata-support-in-asp-net-web-api.aspx
There is no full support for OData in Web API at the moment. The best you can do for the time being is go with the preview package above.
It was released on the same day as Web API RTM was released, to provide simple support for OData and preview some functionalities (that's why it's called alpha). Full package is coming later this fall.

Related

Azure Logic App Integration Tools in Visual Studio 2017

I am an experienced BizTalk developer who is now moving on to Azure logic apps. I have installed Visual Studio 2017 and added the "Azure Logic Apps Tools for Visual Studio" through the Tools|Extensions and Updates menu. However, I don't see an option for creating/editing XML schemas(.xsd files), I don't see the BizTalk EDI X12 schemas and there is no option for creating a map. What am I missing? I have searched and searched with no luck. Thanks.
XSD & Maps are part of the Azure Integration Account service. You need the Microsoft Azure Logic Apps Enterprise Integration Tools in order to use those. You will see that the mapper is very similar to what you know from the BizTalk-world.
I'm not sure Microsoft Azure Logic Apps Enterprise Integration Tools is already supported in VS 2017. I know it's supported on VS 2015.
On a side note, xsd's and maps created using a BizTalk Server Project will also work fine in an Azure Integration Account and Logic Apps,but might lead to a more complex ALM-story.
Right now there is no tooling available for Visual Studio 2017, only for Visual Studio 2015.
The tools are based on the BizTalk components and those components are only available for Visual Studio 2015.
You can download EDI schemas from Open Source Github, but only EANCOM and EDIFACT, X12 messages have been removed due to licensing questions https://github.com/Microsoft/Integration/tree/master/BizTalk%20Server/Schema

Azure cloud service publishing wizard failing

For some unknown reason, I now get this error when I try to publish my cloud service. (I'm shown as logged into visual studio, but the wizard seems to not recognise this - and step 1 of the wizard has a link to "re-enter credentials" - which gives this error too)
The service is a simple one: just a single web role.
I have tried everything I can think of, in this order:
Restart Computer
Restore last known working copy of the solution
"Clean" the project
Reset my visual studio (2013) as per this stack overflow answer
Any help / pointers would be very very welcome, I'm stumped - and I'm stuck with a cloud service that I can't publish to!!!
Here is my visual studio info:
Microsoft Visual Studio Professional 2013
Version 12.0.31101.00 Update 4
Microsoft .NET Framework
Version 4.5.50938
Installed Version: Professional
LightSwitch for Visual Studio 2013 06177-004-0447006-02367
Microsoft LightSwitch for Visual Studio 2013
Team Explorer for Visual Studio 2013 06177-004-0447006-02367
Microsoft Team Explorer for Visual Studio 2013
Visual Basic 2013 06177-004-0447006-02367
Microsoft Visual Basic 2013
Visual C# 2013 06177-004-0447006-02367
Microsoft Visual C# 2013
Visual C++ 2013 06177-004-0447006-02367
Microsoft Visual C++ 2013
Visual F# 2013 06177-004-0447006-02367
Microsoft Visual F# 2013
Visual Studio 2013 Code Analysis Spell Checker 06177-004-0447006-02367
Microsoft® Visual Studio® 2013 Code Analysis Spell Checker
Portions of International CorrectSpell™ spelling correction system © 1993 by Lernout & Hauspie Speech Products N.V. All rights reserved.
The American Heritage® Dictionary of the English Language, Third Edition Copyright © 1992 Houghton Mifflin Company. Electronic version licensed from Lernout & Hauspie Speech Products N.V. All rights reserved.
Application Insights Tools for Visual Studio Package 1.0
Application Insights Tools for Visual Studio
ASP.NET and Web Tools 12.4.60425.0
Microsoft Web Developer Tools contains the following components:
Support for creating and opening ASP.NET web projects
Browser Link: A communication channel between Visual Studio and browsers
Editor extensions for HTML, CSS, and JavaScript
Page Inspector: Inspection tool for ASP.NET web projects
Scaffolding: A framework for building and running code generators
Server Explorer extensions for Microsoft Azure Web Apps
Web publishing: Extensions for publishing ASP.NET web projects to hosting providers, on-premises servers, or Microsoft Azure
ASP.NET Web Frameworks and Tools 2012.2 4.1.21001.0
For additional information, visit http://go.microsoft.com/fwlink/?LinkID=309563
ASP.NET Web Frameworks and Tools 2013 5.2.21010.0
For additional information, visit http://www.asp.net/
Common Azure Tools 1.4
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.
Microsoft Azure HDInsight HQL Service 2.0.1000.0
Language service for Hive query
Microsoft Azure HDInsight Tools for Visual Studio 2.0.1000.0
An integrated development environment for HDInsight application development.
Microsoft Azure Mobile Services Tools 1.3
Microsoft Azure Mobile Services Tools
Microsoft Azure Tools 2.6
Microsoft Azure Tools for Microsoft Visual Studio 2013 - v2.6.30423.1601
NuGet Package Manager 2.8.50926.663
NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.
Office Developer Tools for Visual Studio 2013 ENU 12.0.30626
Microsoft Office Developer Tools for Visual Studio 2013 ENU
PreEmptive Analytics Visualizer 1.2
Microsoft Visual Studio extension to visualize aggregated summaries from the PreEmptive Analytics product.
SQL Server Data Tools 12.0.41012.0
Microsoft SQL Server Data Tools
Windows Phone 8.1 SDK Integration 1.0
This package integrates the tools for the Windows Phone 8.1 SDK into the menus and controls of Visual Studio.
Workflow Manager Tools 1.0 1.0
This package contains the necessary Visual Studio integration components for Workflow Manager.
Ok, so by sheer chance (and after much frustration - most of a day wasted), I clicked into the "Manage" dialog for the subscription (the blue item here:)
This had a link for me to sign out, then when I signed back in again all was ok... strange, because the "re-enter your credentials" link on the main dialog didn't resolve thing... oh well - posted here in case some other poor sod has the same problem: hope it saves you some time!
I had faced the same issue in the past. VS 2015 throws this error but VS 2017 doesn't. With the help of fiddler I was able to find out the root cause of it. VS 2015 was trying to authenticate my account against the tenant on which I do not have access any more. Now when I say access, there could be many reasons for it. Like, when I was trying to authenticate with my org account, I saw "User is disabled" error in fiddler logs. So I asked my administrator to enable my account, and since then it is working fine for me.
Similarly, I faced the same issue with my personal account as well. But this time, I could not see any error in fiddler logs. However, through fiddler I got to know which tenant is being used by VS 2015 to authenticate my account. Then I logged into Azure portal and found that i do not have any subsricption assigned to me on that tenant. So i asked the administrator of that tenant to completely remove me from this tenant. Once that happened everything worked fine.
So I believe, the issue is, VS 2015 always try to authenticate your account on which you do not have access anymore and thats why we recieve that error.
Fiddler traces
1) The first http call returns the list of all the tenants associated with your account.
2) Subsequent calls clearly tells you which tenantId is being used to authenticate.
3) And, one of the call will also tell you about actual AD error (if any)
Thats how it helped to fix this issue.

Azure .NET 4.5 support

OK, I can't find a definitive answer on this online so I thought I'd ask the community on this one.
.NET 4.5 has gone RTM last week and were looking at upgrading our products to use it. Before we make this leap, I first need to check if this will impact any Azure deployments with our product (ASP.NET MVC stuff)
Does the latest production version of the Azure platform support .NET 4.5 in its web and worker roles yet?
I'm aware that the RC of the framework could be installed using a startup power shell script during the VM/role warm up but I don't want this burden on my application, I'm just looking to know of its safe to go live with .NET 4.5 and MVC 4 etc... in Azure's current state?
The Azure SDK v1.8 (October 2012) is out for download:
http://www.microsoft.com/en-us/download/details.aspx?id=35448
Supports: .NET 4.5, Windows Server 2012 and IIS 8.0:
http://msdn.microsoft.com/en-us/library/windowsazure/ff683673.aspx#BK_October2012
To use Windows Server 2012 which supports .NET 4.5, change osFamily="2" to osFamily="3" in your Azure role .cscfg file.
Edit: I updated my two sites last night to Windows Server 2012/.NET 4.5 and they work like a champ. So, this is all the RTM/stable code just waiting for the announcement (maybe BUILD 2012?). If you are using Windows Server 2012, you need to enable .NET 3.5 features for backward compatibility with .NET 2.0-.NET 3.5 apps/modules.
Edit2: Azure 4.5 support was announced yesterday at the BUILD 2012 conference :) http://channel9.msdn.com
Microsoft announced today that Azure will now support .NET 4.5.
http://techcrunch.com/2012/10/31/azure-mobile-services-now-supports-windows-phone-8-announces-azure-store/
Even after downloading and installing the October 2012 updates (through the WebPI link on the page) that #Bart listed above, you may still have to delete your Azure Project and remake it-- that was the only thing that removed the "Windows Azure Cloud Service projects currently support roles that run on .NET Framework version 3.5 and 4. Please set the Target Framework property in the project settings for project" error for me.
Even when i changed the osFamily to "3" the error continued until i blew the Azure proj away.
I didnt get to try this as a fix, but i wonder if setting the schemaVersion in the .cscfg to schemaVersion="2012-10.1.8" would've negated my need to blow it away.
If you need to user .Net 4.5 on Azure, please go to the Azure UserVoice site and vote for it: http://www.mygreatwindowsazureidea.com/forums/34192-windows-azure-feature-voting/suggestions/2598170-iis8-and-asp-net-4-5-support-in-azure-platform
For Windows Azure Cloud Services (PaaS) the Windows Azure SDK supports only .net 4.0 yet. As .net 4.5 is just RTM, it will take some time for the Windows Azure SDK to support .net 4.5 however there is not timeline discussed anywhere and if there will be any info on this regard, it will be communication to Windows Azure website.
If your application must have .net 4.5, you can use Windows Azure Virtual Machine with Windows OS and install .net 4.5 and build/deploy/run MVC4 application as you choose.
Windows Azure Web Sites are apparently adding support for .Net 4.5 within a preview.
http://social.msdn.microsoft.com/Forums/en-US/windowsazurewebsitespreview/thread/3fab0f32-23c9-4122-9ece-8c3edbadde47
Microsoft just announced today that .NET 4.5 support is coming very soon for Azure and sent out upgrade guides for existing apps.
Seems the concern was that some of the .NET 4.0 changes and bug fixes that are rolled in .NET 4.5 can adversely affect existing web applications. The e-mail implied that the upgrade was rolling out this weekend and asked people to upgrade to .NET 4.5 in Visual Studio 2012.
According to Scott Guthrie, as of October 25th, .NET 4.5 is supported on Windows Azure Web Sites
Windows Azure Cloud Services (Web and Worker Roles) will be supported "in the next few days" (presumably by the end of October 2012).

ASP.Net API running on Windows Azure websites

I have an MVC project in Visual Studio 2012 RC which hosts an MVC web site and an ASP.NET API. I use routes to delegate the request to the correct controller.
On my local development machine both the website and api work fine. However when I push the change to Azure websites the website works, but the ASP.NET web api returns HTTP 500 errors.
The base site is: http://salaahtime.azurewebsites.net
One of the web site pages is http://salaahtime.azurewebsites.net/website/login
An example use of the API is http://salaahtime.azurewebsites.net/api/salaahtime/testestablishment/2012/1
However this returns HTTP 500.
I have
Updated my project to use .net 4.0. By default it is set to .net 4.5 which does not work with Azure websites
Removed Entity Framework 5.0 reference which only works with .net 4.5
Any ideas why the api would not work in Azure websites?
There is a known issue when backing a project down from 4.5 to 4.0 using the RC release of Visual Studio 2012. I know this will be slightly painful to hear, but you'll be better off creating a new project and setting the project's framework version to 4 rather than 4.5. This is an issue that should be fixed prior to the product's release.
Hope this helps. Trust me, we know of it and in our own development work have had to re-create projects using the 4 framework.
Also - the 4.5 framework will be supported in Windows Azure Web Sites once the 4.5 framework has been officially released.
Please try to turn off custom error (http://msdn.microsoft.com/en-us/library/h0hfz6fc.aspx), which may give more detailed information. If you’re working with a database, make sure you’ve updated the connection string to use Windows Azure SQL Database instead of a local database. There is also a possibility that Web API is not stood by web sites. The name web sites indicate it is used to build web sites, not web platforms. Web sites have limited features compared to web roles and virtual machines. If that’s the case, please use a web role or a virtual machine.
Best Regards,
Ming Xu.

how to add web reference in MS CRM 2011

on MS CRM 4.0, we can add this web service as web reference:
http:///MSCrmServices/2007/CrmService.asmx
to get all CRM entities to our local,
actually i just want to create a class library project and add web reference to CRM web service, and get all original and my customized entities?
i knew the tool cmrsvcutil.exe (in CRMSDK) can generate all entities (includes customized), but the code is only for .NET 4.0.
can anybody help me?
*UPDATE***
finally i used CRMSDK4 and DynamicEntity to call CRM web service and update my customized eneties.
The CRM 2011 SDK is built on .NET 4 so you may have some trouble if you are working with an earlier version. Can you explain a little more about your application and needs as their are more web services in the 2011 version than there were in 4. It is best practice to use the SDK libraries to reference the service. If you want to use pre .NET 4 I would recommend using the CRM 4 SDK to connect to the CRM 4 endpoint that still exists for backwards compatibility. Note that this isn't a great solution in the long run as the next version likely will not support use of the CRM 4 web service.
To see the new 2011 service endpoints, log in to CRM, click on Settings > Customization > Developer Resources ->

Resources