Read Azure AD in Visual Studio 2013

I am working on a Room App, which is simply used to let user know if the room is free/busy and display all the custom attributes along with room capacity. While using online Exchange I came across that capacity and custom attributes are stored in Active
Directory. So I thought of using Azure Active Directory, but again got stuck on how to use it in the code, as Call Graph API configuration and development in Visual Studio 2012 and 2013 is different. Can anybody help me or point me to a blog where I can configure
my application to use VS2013 and Active Directory.

Hi,
 I did went through exactly as mentioned in your link, but even there too, querying for the User details, didn't give me either the capacity or custom attributes. Please do let me know how to proceed further.
<fieldset>
AccountEnabled
<select class="tri-state list-box" disabled="disabled"><option value="">Not Set</option><option selected="selected" value="true">True</option><option value="false">False</option></select>
City
Country
Department
DisplayName
Board Room
FacsimileTelephoneNumber
GivenName
ImmutableId
JobTitle
LastDirSyncTime
Mail
[email protected]
MailNickname
boardroom
Mobile
PasswordPolicies
None
PhysicalDeliveryOfficeName
XXX
PostalCode
PreferredLanguage
State
StreetAddress
Surname
TelephoneNumber
UsageLocation
UserPrincipalName
[email protected]
UserType
Member
ObjectType
FU User 
</fieldset>

Similar Messages

  • How to configure a proxy server for Windows Azure Tools in Visual Studio 2013

    Hi Visual Studio/Azure Tools team
    I would like to use the Windows Azure tools in Visual Studio 2013 to manage my Azure Web sites (Server Explorer -> Windows Azure -> Web Sites) from within my corporate network which is secured using a proxy server. Unfortunately, I am not able to use
    the Windows Azure tools since the required HTTPS connection to windows azure is not going through the default configured proxy. Instead, Visual Studio tries directly to connect to port 443 which is blocked by our corporate firewall (and yes: there is no way
    around using our proxy server). Other visual studio features like NuGet, updates, etc. work fine and use the configured proxy server. 
    So my question: How can I configure visual studio respective its Azure tools to use a proxy server instead of a direct connection? I already tried configuring the proxy server within the file devenv.exe.config but this doesn't show any effect for Windows Azure
    tools.
    Regards
    tschaena

    As we have very similar problems I consider the found solution a work arround an existing problem which will not work if corporate FW policy does not allow such changes.
    In my mind, any tools in charge of dealing with some sort of FW protocols should deliver the following information, should make it absolute clear how to setup that the request packages are setup rigth at the first time.
    a) proxy server
    b) proxy port
    c) proxy user
    d) proxy users-password
    e) proxy.auth.Preference="BASIC"
    And for moste tools (including Visual Studio and AZUR Tools) it is absolut unclear
    a) how to setup that on a per tools basis
    b) OR who inherits this information from whom    i.e. use the same as IE does, what if we use FireFox or any other browsers?
    I understand that developers requested to cure such problem areas will often have difficulty to gain all required elemenst used to realy test the solution.
    But I can tell you: I loos more time figthing down the FW setups for my clients. WHat I do at home in a sniff, takes ages to be realised by all the various clients on the market where each has to deliver the same sort of information but actually does not,
    or has it just somewhere, but not in the vicinity of the demanding user.
    Good examples i.e. NetBeans IDE where the Option Menu shows very clearly what information is required to pass through a FW/Proxy; but even there, the hint to start with a BASIC authentication schema is not part of this OPTION menu and must be added a JAVA
    environment value. But at least, it works.
    Sepp

  • Windows Azure Tools for Visual Studio 2013 - v2.2 install fails on Windows Server 2012 R2

    Microsoft Visual Studio Professional 2013
    Version 12.0.21005.1 REL
    Microsoft .NET Framework
    Version 4.5.51641
    The installation completes without any errors on my VM running Windows Server 2012 R2, however its not recognized in VS2013 ? It also breaks the Publish functionality when I try and publish a web site to my hosting provider.

    I tried install, uninstall, reinstall cycle several times without success. Any help would be greatly appreciated.
    here is my About info:
    Microsoft Visual Studio Professional 2013
    Version 12.0.21005.1 REL
    Microsoft .NET Framework
    Version 4.5.51641
    Installed Version: Professional
    LightSwitch for Visual Studio 2013   06177-004-0444002-02824
    Microsoft LightSwitch for Visual Studio 2013
    Microsoft Office Developer Tools for Visual Studio 2013 ENU   06177-004-0444002-02824
    Microsoft Office Developer Tools for Visual Studio 2013 ENU
    Team Explorer for Visual Studio 2013   06177-004-0444002-02824
    Microsoft Team Explorer for Visual Studio 2013
    Visual Basic 2013   06177-004-0444002-02824
    Microsoft Visual Basic 2013
    Visual C# 2013   06177-004-0444002-02824
    Microsoft Visual C# 2013
    Visual C++ 2013   06177-004-0444002-02824
    Microsoft Visual C++ 2013
    Visual F# 2013   06177-004-0444002-02824
    Microsoft Visual F# 2013
    Visual Studio 2013 Code Analysis Spell Checker   06177-004-0444002-02824
    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.
    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.0.11001.0
    For additional information, visit http://www.asp.net/
    BusinessObjectEditor   1.0
    Information about my package
    CodeRush for Visual Studio   13.2
    Common Azure Tools   1.0
    Provides common services for use by Azure Mobile Services and Windows Azure Tools.
    CreateLayoutWizardPkg   1.0
    Create layout wizard.
    DevExpress.ExpressApp.Design.DesignDynamicPackage   1.0
    DevExpress VSIX Package
    DevExpress.ExpressApp.DesignPackage   1.0
    DevExpress VSIX Package
    DevExtreme.Design   13.2.6
    DevExtreme Visual Studio integration package
    DXCore for Visual Studio   13.2
    DXCore for Visual Studio
    PreEmptive Analytics Visualizer   1.2
    Microsoft Visual Studio extension to visualize aggregated summaries from the PreEmptive Analytics product.
    SQL Server Data Tools   12.0.30919.1
    Microsoft SQL Server Data Tools
    Windows Azure Mobile Services Tools   1.0
    Windows Azure Mobile Services Tools
    Workflow Manager Tools 1.0   1.0
    This package contains the necessary Visual Studio integration components for Workflow Manager.
    XtraReports package   1.0
    XtraReports package

  • Cannot Connect to Azure SQL Database in Visual Studio 2013

    Beyond Frustrated here.
    I am trying to connect to an Azure SQL database - it has been created, has tables etc. I am trying to create a new Data Connection from within Visual Studio 2013, latest release for VS and Azure. I continue to receive the following error:
    A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections.
    (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) (Microsoft SQL Server, Error: 53)
    I have ensured that TCP is allowed and above Named Pipes in the Configuration Manager. The associated IP address is allowed on Azure Firewall. Certificate has been added to VS etc. But still no connection. I can see the database in the Azure section in Server
    Explorer, but cannot add a Data Connection. What is equally as frustrating is I have a MacBook Pro running Win 7 sitting right next to my office computer and it can access Azure fine, not problems.
    If anyone has any other ideas on how I might be able to solve this I would love to hear them. Thanks in advance.
    Jeff

    Hi,
     The Error message "   A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is
    configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) (Microsoft SQL Server, Error: 53) "
    The issue comes up mainly because the application is not able to connect to the server.
    To resolve this issue, try the following steps (in that order):
     Make sure that TCP IP is enabled as a client protocol on the application server. For more information on how to do this, see
    Configure client protocols. On application servers where you do not have SQL Server tools installed, you can check this by running cliconfg.exe (SQL Server Client Network Utility).              
     2.  Check the application’s connection string to make sure that it is correctly configured. For example, make sure that the connection string specifies the correct port (1433) and the fully qualified server name.                
    Note You can follow these steps to obtain the connection string from the Azure Management Portal:                  
                          Log on to the
    Azure Management Portal.                    
                          In the left navigation pane, click
    SQL Databases.                    
                          Select your Azure SQL Database server.                    
                          Click
    Dashboard.                    
                          On the right side, go to the
    quick glance section, and then click Show connection strings.                    
    Test the connectivity between the application server and the Azure SQL database by using a UDL file, ping, and telnet. For more information about how to do this, see
    Azure SQL Database connectivity troubleshooting guide and
    Troubleshooting SQL Server connectivity issues.                
    Note As a troubleshooting step, you can also try to test the connectivity on a different client computer.                
    Try increasing the connection timeout. Microsoft recommends using a connection timeout of at least 30 seconds.              
    As a best practice ensure retry logic is in place. For more information about the retry logic, see
    Azure SQL Database best practices to prevent request denials or connection termination.              
          If these  steps do not resolve your problem, follow the below steps to collect more data and contact support:              
       If your application is a cloud service, enable the logging. This step returns a UTC time stamp of the failure. Additionally, SQL Azure returns the tracing ID.
    Microsoft Customer Support Services can use this information.                   
       For more information about how to enable the logging, see
    how to enable diagnostic logging for Azure Web sites and Developing SQL Database Applications section in
    Azure SQL Database Development Considerations.                
      Check out
    the list of best practices for Connecting to Windows Azure SQL Database.
    Regards,
    Shirisha Paderu.

  • Azure Visual Studio 2013 Integrated Sign Connectivity Issues

    I am having periodic VS2013 Ultimate and Azure tools 2.3 connectivity issues. I'd say it's all related to session timing out but it causes VS to crash sometimes and other times when using some Azure feature, right clicking 'Web Role' I get 'Object....null
    reference' messages.
    I can ask studio to connect to Azure, via right clicking Azure node of Azure branch in server explorer and it always tells me I'm currently signed in as the correct\current user but this seems to prevent the issue from occurring if I do this first thing
    everyday.
    How can I properly resolve the Visual Studio crashes and such? I'd say I've had Visual Studio 2013 crash more in the last 6 months than all prior VS crashes across my DEV lifetime....and I started developing long before Visual Studio was born :>)

    Hi,
    It's hard to reproduce this issue, please try to update your vs, then see whether this issue exist or not. You could also use another computer to do the same operation, if you encounter the same issue, please contact with azure support to
    get further help:  http://www.windowsazure.com/en-us/support/contact/
    Best Regards,
    Jambor
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Visual Studio 2013 Community Azure Login Not Working with Two-factor Authentication

    Has anybody had any problems logging in to Azure to publish when using Visual Studio 2013 Community and with two-factor authentication turned on?
    I couldn't log on until I turned off two-factor authentication.
    Regards

    Hello John,
    Thanks for posting here!
    You can try and set a credential helper like
    git-credential-winstore in order to cache your credentials. See if that helps.
    Couple of questions here:
    1) Are you using a MSA account by any chance?
    2) When you turn on two-factor authentication, do you get any error message?
    3) Did you try with different browsers?
    Looking forward to your response!
    Regards,
    Sadiqh

  • Publish cloud service fails from Visual Studio 2013 Update 4: Published Asset Entry for Image Microsoft.Azure.Diagnostics_PaaSDiagnostics_europeall_manifest.xml not found.

    I have a cloud service project with two roles (service and worker). In Visual Studio 2013 Update 4 when I choose "Publish..." from the "Solution Explorer",  it opens "Microsoft Azure Activity Log" and quickly terminates.
    Here the log:
    9:43:47 AM - Applying Diagnostics extension.
    9:44:09 AM - Published Asset Entry for Image Microsoft.Azure.Diagnostics_PaaSDiagnostics_europeall_manifest.xml not found.
    All works fine when uploading the package and updating from https://manage.windowsazure.com/. It only fails from within Visual Studio.
    What can I do to get it working?

    I have the same problem with our Azure project. Two web roles (service and worker). Just updated from SDK2.2 to SDK2.5 and Visual Studio 2013 Update 2 to Update 4. The main reason behind this was to move from log4net to WAD and in doing so, of course directly
    move to the new diagnostics version.
    Now, I get the same error message in Visual Studio:
    11:45:24 - Checking for Remote Desktop certificate...
    11:45:25 - Applying Diagnostics extension.
    11:45:45 - Published Asset Entry for Image Microsoft.Azure.Diagnostics_PaaSDiagnostics_europeall_manifest.xml not found.
    With my small testing project - also two roles (service and worker) - everything is fine. However, I'm looking for a solution to make by existing production service working.
    Also the test project shows no Microsoft.Azure.Diagnostics_PaaSDiagnostics_europeall_manifest.xml,
    but this is no problem - so what's the meaning of or solution to this error messages?
    What I found so far:
    I deployed the Azure project from the same development environment to another Azure test service: Deployment
    showed no errors and the service is running fine! So the problem is not with the source, the development environment, library dependencies etc.
    Trying Azure cmdlets for PowerShell also work fine for the new service and fails for the production service with almost the same error message:
    Following http://blogs.msdn.com/b/kwill/archive/2014/12/02/windows-azure-diagnostics-upgrading-from-azure-sdk-2-4-to-azure-sdk-2-5.aspx
    I tried:
    PS C:\> Set-AzureServiceDiagnosticsExtension -StorageContext $storageContext -DiagnosticsConfigurationPath $public_config -ServiceName $service_name -Slot 'Staging' -Role $role_name
    VERBOSE: Setting PaaSDiagnostics configuration for MyWebRole.
    Set-AzureServiceDiagnosticsExtension : BadRequest : Published Asset Entry for Image
    Microsoft.Azure.Diagnostics_PaaSDiagnostics_europeall_manifest.xml not found.
    At line:1 char:1
    + Set-AzureServiceDiagnosticsExtension -StorageContext $storageContext -Diagnostic ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : NotSpecified: (:) [Set-AzureServiceDiagnosticsExtension], CloudException
        + FullyQualifiedErrorId : Microsoft.WindowsAzure.CloudException,Microsoft.WindowsAzure.Commands.ServiceManagement.
       Extensions.SetAzureServiceDiagnosticsExtensionCommand
    The problem seems to be related to those service configuration parts in the cloud which are not replaced
    by a new deployment... So what are possible reasons or fixes for this behaviour?
    Best regards,
     Andreas

  • Can't update SQL 2014 DB during web publish from Visual Studio 2013

    According to Visual Studio 2013 I have "SQL Server Data Tool 12.0.40706.0" installed, which should allow me to update a SQL 2014 database but when I try to publish my web application I get the error: "Web deployment task failed. (Could not
    generatedeployment script. Internal Error. The database platform service with type Microsoft.Data.Tools.Schema.Sql.Sql120DatabaseSchemaProvider is not valid. You must make sure the service is loaded, or you must provide the full type name of a valid database
    platform service. Internal Error. The database platform service with type Microsoft.Data.Tools.Schema.Sql.Sql120DatabaseSchemaProvider is not valid. You must make sure the service isloaded, or you must provide the full type name of a valid database platform
    service. Learn more at:
    http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_EXECUTING_METHOD.)" I can update the database fine if I go into the package managment console and run -UPDATE-DATABASE but I don't want to have to go into myweb.config, update it to point to the production
    database, run the update command, and then change my web.config back everytime I try to update my database. What do I have to do to getthis working? I had no problems when I was on an Azure DB.

    Actually problem seems to be related when web publish to remote server. I tried local web publish to sql2014 db and it works.
    For remote server web publish works to sql 2012 express db but when try with sql 2014 express db on same server get bellow error.
    Error message "The database platform service with type Microsoft.Data.Tools.Schema.Sql.Sql120DatabaseSchemaProvider
    is not valid. You must make sure the service is loaded, or you must provide the full type name of a valid database platform service."
    Any ideea what may be causing it? I have installed the sql server 2014 express with advanced services x86, exact same version as on my local machine, and also restarted server after install. Need install/configure anything else on server like SSDT 2014 to
    make this work? 
    Cheers!

  • Database connection error in Visual Studio 2013

    I am using Visual Studio 2013 and have installed MS SQL Server 2014. I am trying to generate my database from a model (edmx) but I get the following error: Cannot
    connect to <Database>. An incompatible SQL Server version was detected (Microsoft.VisualStudio.Data.Tool.Sqleditor)
    In the edmx.sql file, is written:
    -- Entity Designer DDL Script for SQL Server 2005, 2008, 2012 and Azure
    I can see that 2014 version is missing from this generated file, and seems that the program tries to connect to the 2012 version .. how can I avoid this and manage visual studio tu use the 2014 version of MS SQL Server? Thanks in advance
    I already updated the SQL Server Data Tools to the newest version.

    Hello,
    Please read the following article:
    http://support.microsoft.com/kb/2858352/en-us
    Hope this helps.
    Regards,
    Alberto Morillo
    SQLCoffee.com

  • Type of license to be purchased for Visual Studio 2013 to be used with Visual Studio Online Subscription

    Dear Sir/Madam,
    For commercial use, I have subscribed for Visual Studio Online. To work with .NET code on my local machine, what type of Visual Studio license do I need to purchase/install locally. It gives me two options to download on home page. 1) Visual Studio
    2013 Community Edition 2) Visual Studio 2013 Ultimate Edition
    I am more interested to that can I use "Visual Studio 2013 Community Edition" with VS Online subscription for commercial use? If not then what type of Visual Studio edition do I need to purchase to use with VS Online subscription?
    Thank you
    Uday

    Hi,
     For Best answer to your question, i would suggest you contact a Support Professional from the Microsoft Billing Department.
     You can create a free Support ticket for the same here :
    http://azure.microsoft.com/en-in/support/options/
     Or you can also contact a Microsoft Licensing Specialist : 1-800-426-9400, Monday through Friday, 6:00 A.M. to 6:00 P.M. (Pacific Time)
    Regards,
    Nithin Rathnakar.

  • Unable to see function return values in Visual Studio 2013 debugger

    Hi!
    I can't see function return values in
    Microsoft Visual Studio Ultimate 2013
    Version 12.0.31101.00 Update 4
    Microsoft .NET Framework
    Version 4.5.51650
    Installed Version: Ultimate<o:p></o:p>
    as described in  http://blogs.msdn.com/b/visualstudioalm/archive/2013/06/27/seeing-function-return-values-in-the-debugger-in-visual-studio-2013.aspx
    So what can I do to get this functionality back?
    MsdnMezzo

    Hi MsdnMezzo,
    Reference:
    http://blogs.msdn.com/b/visualstudioalm/archive/2013/06/27/seeing-function-return-values-in-the-debugger-in-visual-studio-2013.aspx
    If use the same sample in the above blog provided by you, how about the result? Could you debug it with the same steps? I could debug it in my side using the VS2013.
    So to make sure that whether it is your VS IDE issue, please debug it with this sample, if it works well, I doubt that we would think about your specific project and the debugging steps.
    If so, to really repro this issue, could you share us a sample with one drive? You could upload your project to one drive and share us the downloaded link in your new reply, I will download and repro this issue in my side.
    Best Regards,
    Jack
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Adding SQL Server Express to Visual Studio 2013 Pro on Windows 10 Preview

    I have installed VS 2013 Pro on Windows 10. I need to delevop unsing SQL Server Express. Do I download the full SQL Server 2012 Express Advanced (with full text search), or do I need only part of it? I was going to download the SQLEXPRADV_X64_ENU.exe. 
    Is this a good way to go?
    Do I also need to download any other .net frameworks?
    kciNDev

    Hello,
    Please read the following resources:
    http://msdn.microsoft.com/en-us/library/ms233763.aspx
    http://stackoverflow.com/questions/20333518/how-to-create-a-database-in-ms-visual-studio-2013
    http://msdn.microsoft.com/en-us/vstudio/bb643825.aspx
    Hope this helps.
    Regards,
    Alberto Morillo
    SQLCoffee.com

  • Visual Studio 2013 - New Project

    Hi
    Many years ago I wrote a VB6 program for school students for diet analysis in terms of energy and a range of vitamins and minerals.  It drew comparisons against the national guidelines.  Results were tabulated, graphed and output provided in Word
    and Excel files.  The VB6 program used an Access database containing about 850 foods. It has been used by quite a few schools and appears to always be used across a network.
    My intention is to re-write the whole program in Visual Studio 2013 using Visual Basic code.  I intend to refresh the whole program and add a wider range of foods and update the comparisons using the latest national guidelines and food label formats.
    This will be my first attempt at Visual Studio and I intend to use a Windows Forms Application approach.  The data used is "static" - it does not change it is simply a "read only" file - get the data, multiply for mass and add up each
    category (energy, vitamins and minerals).  It is a "file of data" rather than a true database.  In reality a 1000 food data file should only be about 200 Kbytes.  As an Excel file it is only 150Kbytes but as an Access file it is bloated
    up to a 550Kbyte file.
    The program is not sophisticated, so, should I be using a WPF Application or a Window Forms Application?  The WFA just feels a bit more familiar than a WPF.  Also, the program is intended for loading onto a network at some schools or on a stand-alone
    computer.
    My greatest concern is about the choice of approaching the data.  A "true" database is not needed because the data is simply for about 1000 rows of food each with about 20 columns of data (numeric and text).  The Access file is simple
    but I could create an mdf file (I think) but would that be an advantage?  With the Access data I appear to have loaded the file and created a DataAdapter and I have experimented with GetData() which works.  My attempts to use ExecuteReader() failed
    completely.  Is there a better approach?  such as SQL "DataTable.Rows(RowPosition)(“column name")”??  It seems a very sophisticated method for a small file of data.
    The Access Database that I have experimented with in VS2013 appears to use Jet Drivers???? which proved to create a few problems for installations in the past.  Should I be using an mdf file approach??  I will need to distribute the data in a "resx"
    file.  I could use SQL Server Management Studio (free download) and then use VS2013 to read the Access file and build a new mdf database.....
    I am not convinced that I have the best solution.  Any comments and suggestions would be very greatly appreciated.
    Many thanks for reading this far.
    Winchestermili
    Winchestermili

    Frank
    Looking good!  The "attachment" to a new project worked first time.
    I can see all the new Classes by hovering a pointer over the "declarations" above "Public Class Form1"
    Seems to access the VBNetForum URL quite quickly using a high speed BB connection.
    I am greatly looking forward to the next stage...........
    Regards
    Keith
    Winchestermili
    Keith,
    I intentionally truncated that post with “let me know when you’re that far along” simply because it’s very easy to get lost
    with a concept that’s new. This isn’t as different as you might think though – you’ve been using a database, and now you’ll be using instances of a class (various ones).
    Over the years here, I’ve seen many times where people use databases because they assume “that’s the only way to do it”. The
    “it” actually being encapsulation.
    Encapsulation
    is what they need and certainly a database provides that (and a lot more), but it’s not the only way it can be done.
    Think about this a bit: A DataRow encapsulates the related data for whatever it is. For example maybe it’s a person’s data –
    you’d want to keep the person’s first name, surname, and things like that all together because it defines something related to that one person. You then have a collection of those DataRows in a DataTable.
    In much the same way, what I have here is similar: Instead of a DataRow, I’m using instances of a class. Instead of columns
    in a DataRow, I’m using properties of the instance, and instead of a DataTable, I’m using a List(Of Class).
    …the concept is identical.
    Classes are a means of building an object in OOP. In and of itself, it’s really just a template or a blueprint (overused metaphor).
    Deborah Kurata put it best, in my opinion, when she said that a class is like a cookie-cutter and the objects created are cookies. You eat the cookies, not the cookie-cutter!
    A class works that way exactly: You can’t “consume” a class; you consume the objects (instances) created by them and in this
    case, like a DataTable housing DataRows, I’m storing them in a very specific type of collection known as a List(Of T).
    I don’t want to get too far adrift about classes and/or OOP here – not that I would mind the discussion – but it’s a new concept
    to you and it’s easy to get confused about what’s doing what. I’ll get more to the specifics next.
    That entire class library is the data layer; it doesn’t work with controls of any sort, only the data.
    That said though, in the following I’ll explain how controls can be ‘assisted’ by the methods in the classes.
    The main class in this is the one called “FoodComposition”. That one is only barely started – the
    only
    method in it so far is an overloaded way to add a new instance to a list of them.
    Two of the classes are really just ‘supporting classes’ – those being the ones called “FoodCategory” and “LabelNote”. Don’t
    get me wrong here, they do have methods in them (with more to be added), but you won’t too much be working with those in the user’s program – you will in the program that I’ll create for you to add/modify/remove* and so on, but for now let’s set those two
    aside.
    *  The fact that these are “supporting” classes, I have it set up such that you cannot remove an instance of those if there’s
    a reference to them in FoodComposition. If you want to see where/how I’m doing that, look at the code of the class FoodCategory, for example, and go to line 633, then read the code of that method named “Remove”.
    The one class in the bunch which is pretty much self-contained is the one called DietaryReferenceValue (DRV is the name you
    used). That one makes for a good topic to explain how I can provide methods which lend a helping hand to your controls but don’t, directly, have anything to do with controls.
    I have a method in that class named “GetAllGroupNames” which is a function that returns a string array containing the names
    of each instance’s group. That might be used, for example, if you wanted to show a ListBox or a ComboBox to allow the user to select one of the group names:
    Private Sub Form1_Load(ByVal sender As System.Object, _
    ByVal e As System.EventArgs) _
    Handles MyBase.Load
    Dim url As String = _
    "http://www.fls-online.com/VBNet_Forum/12-13-14/NutritionData.xml"
    GetNutritonData(url)
    ListBox1.Items.AddRange(NutritionData.DietaryReferenceValue.GetAllGroupNames(drvList))
    End Sub
    So, for example, when the user selects one of them:
    Private Sub ListBox1_SelectedIndexChanged(ByVal sender As System.Object, _
    ByVal e As System.EventArgs) _
    Handles ListBox1.SelectedIndexChanged
    Try
    If ListBox1.SelectedIndex > -1 Then
    Dim selectedGroup As String = _
    ListBox1.Items(ListBox1.SelectedIndex).ToString
    Dim drv As NutritionData.DietaryReferenceValue = _
    NutritionData.DietaryReferenceValue.GetInstance(drvList, selectedGroup)
    MessageBox.Show(drv.ToString, drv.SexAndAgeGroup)
    End If
    Catch ex As Exception
    MessageBox.Show("An error occurred:" & vbCrLf & vbCrLf & ex.Message, _
    "Program Error", MessageBoxButtons.OK, _
    MessageBoxIcon.Warning)
    End Try
    End Sub
    As you can see there, I’m using the .ToString method which I have overridden in the class. That’s also part of what I wanted
    to discuss: What it gets.
    Currently I don’t have much else (other than maintenance routines like adding, removing, renaming) in there; the methods that
    you use are methods that I set up – but in the words of Hamlet, “therein lies the rub” … I don’t know what you want!
    Give some thought to just what methods you might want to have in there. For example maybe you might want to have a method which
    will return the value of one specific nutrient which you specify. I can do that, I just don’t know yet that you want it so it’s not there.
    Quite often I’ll also provide what I’m come to call “convenience properties”. For example with the property named “Sodium”,
    I might have another property (read-only) named “Sodium_String” which returns a string in whatever format you wanted it to have.
    These are things I don’t know that you want and also things which you may not have known can be done, thus this writing. ;-)
    The other day I asked about units. It may not be where you want to go with this but I’d also like to offer that we can provide
    more granularity to the nutrients themselves. Don’t get me wrong, it’d be an overhaul of what I have right now, but I’ll do it if you want to proceed:
    Imagine that we have a class, all by itself, that we call “Nutrients”. At the very least that class would have members like
    Name and UnitOfMeasure, but it could have anything else you wanted. An example that comes to mind might be the URL to a page on Wikipedia about it, or maybe a URL to an appropriate image or … whatever you dream of here.
    So then when using them in the other classes, “Calcium” would, itself, be an object which has a name (“Calcium”), a unit-of-measure
    (maybe “milligram”), and so on.
    It’s a lot to take in all at once and even this is something you may want to reread, but do give it thought. Let me know what
    methods you want in the classes which will help you in your user’s program.
    Still lost in code, just at a little higher level.

  • Visual Studio 2013 problem setting localhost alias in IIS Express

    I'm trying to define an alias to localhost in development ambient in Visual Studio 2013.
    When I used previous versions of Visual Studio, I used the Visual Studio Development Server to debug and the only thing I needed to do was to change my hosts file adding this entry:
    127.0.0.1 localhost
    127.0.0.1 localhostalias
    I'm having problems to do this with VS2013. I've browsed all over the internet and I've tried the following things, but I'd like someone of you to tell me what am I doing wrong. I've obviously already changed the hosts file...
    In the web project Properties -> Web in the section Servers where IIS Express is selected as default, I tried changing http://localhost:53944 to http://localhostalias:53944 but an error is showed saying: "Unable to create the virtual directory. Cannot
    create the Web site 'http://localhostalias:53944'. You must specify "localhost" for the server name".
    I also tried changing the applicationhost.config which is located in <<Documents>>\IISExpress\config to 
    <site name="<<Site name>>" id="2">
    <application path="/" applicationPool="Clr4IntegratedAppPool">
    <virtualDirectory path="/" physicalPath="<<Site Path>>" />
    </application>
    <bindings>
    <binding protocol="http" bindingInformation="*:53944:*" />
    </bindings>
    </site>
    And when I opened the project it was changed to
    <site name="<<Site name>>" id="2">
    <application path="/" applicationPool="Clr4IntegratedAppPool">
    <virtualDirectory path="/" physicalPath="<<Site Path>>" />
    </application>
    <bindings>
    <binding protocol="http" bindingInformation="*:53944:*" />
    </bindings>
    </site>
    <site name="<<Site name>>(1)" id="3">
    <application path="/" applicationPool="Clr4IntegratedAppPool">
    <virtualDirectory path="/" physicalPath="<<Site Path>>" />
    </application>
    <bindings>
    <binding protocol="http" bindingInformation="*:53944:localhost" />
    </bindings>
    </site>
    Can someone help me?
    Thanks in advance,
    Camilo

    Hello Camilo,
    This forum supports  "setup and deployment of .NET Framework.", if there is something about the installation of .NET Framework, you can post it here. I read your post and I think you should post it under
    IIS forum instead.
    Regards,
    Barry Wang
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Visual Studio 2013 Express for Windows - InitializeComponent() does not contain a definition issue

    Hi,
    I have recently downloaded Visual Studio 2013 Express for Windows (Windows Store App version), with Update 1.
    I create a blank app. I right-click on InitializeComponent() in the MainPage.xaml.cs and select Go To Definition. It brings me to the .g.i.cs file where this method resides.
    I go into the designer for MainPage.xaml and create a grid of 2 rows and 2 columns (all at 1*). I add one button, doesn't matter where. I double click on that button to add a click method to MainPage.xaml.cs. Without entering anything into the button click
    method, I scroll up and InitializeComponent() has an error and tells me there is not definition, even though I was looking at the definition a minute ago. I found I could unload the project and reload it and InitializeComponent() would have the definition
    in the .g.i.cs file but as soon as I add another button click or anything else I run into the same error. It seems as if the .g.i.cs file is not automatically regenerating, or it is being deleted all together when the button click method is added to the xaml.cs
    file.
    Everything I have done up to this point is very vanilla. I installed VS '13 Express for Windows, didn't change any VS setting, created a project and ran into this issue. I installed Update 1 thinking there might be a fix from the update--no luck. The xaml
    file Build Action is Page and the Xaml.cs file is Compile.
    I have tried deleting the MainPage.xaml file, after the creation of a project, and adding a new MainPage file with the added templates VS wants to include, and I still run into the same issue.
    I have searched for answers the past few days but haven't found anything that addresses my issue (most of what I found addresses VS '10 but their InitializeComponent() issues aren't the same as mine). Any help the MSDN community can provide would be
    a great help. If worst comes to worst, I will re-install VS and see if that corrects it--this would be a last-ditch effort though.
    Thank you for any help you may be able to provide

    Intellisense has a bug in VS2013 where it doesn't recognize InitializeComponent when you start working on the XAML.  My feeling is that if you try to compile this app, it will run fine (as long as there are no actual errors).
    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.
    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined
    objects and unknown namespaces.

Maybe you are looking for

  • Export functionality doesn't work properly in reports post upgrade to EHP1

    Dear Experts, We have recently upgraded our BI system to EHP1 SP 7. Pre-upgrade the export functionality (to excel or pdf) was working fine, however post-upgrade in few reports we have encountered some issues. In a couple of reports the exported exce

  • Cisco Threat Responder and SNMP

    Any one with experience with CTR sending alerts to a SNMP Mgmt Center ? I have tried to send to Tivoli with not much luck in terms of formatted alerts (yes, mib loaded) as well as too much information (ie: not filtered to just critical alerts) being

  • How to export/import apex user ?

    Hi All, I am using APEX 3.1. How to export apex users and import into different workspace. Basically I am trying export APEX users from dev workspace into Prod. Is it possible to include as part of application export? Anyone's help is much appreciate

  • How to get Time of Query Executon?

    Hello All I want to know that how i can find the total Query Execution Time. Mean How much time it take by the query for execution. Thanks

  • Wan to add push button in the output of ALV Grid display.

    Hi Friends, I wan to add a Push button in the output of ALV GRID display with STANDARD ikons. How to copy standard ikons of GRID output. How to apply the copied status into my code. Regards, Viji