1 . I want to learn Microsoft Sharepoint?

Answer :

Use the applications available at the Microsoft sites and use web searches to locate many training videos on Visual Studio topics. Microsoft, TechNet, MSDN are all from Microsoft. There, in a download web page, locate, get, and install several apps: Visual Studio Express the free product and Virtual PC and a trial or beta version of the newest Microsoft Sharepoint. Best to have several PCs to see how your SharePoint pages look instead of reliance upon cloud such as Microsoft Azure or Microsoft Live. Windows 7 Professional or Windows 8 Pro 64 beta from Microsoft TechNet on one or several PCs. 2GigaHertz or 2.2 or 2.6 or 2.8 or 3GHz dual core CPU or Quad core like Xeon or i5, or i7. Lots of RAM in your development PC that has the Visual Studio Express and lots of RAM and hopefully 750GB or 1TB or more available storage hard-drive space on the SharePoint server. See other comments for examples of the PC specs used by others for this, for details. Start by checking your operating system version, RAM, available hard-drive free space. Check properties of your PC. Then check properties of your C drive to see available space. Engage some friends, neigbbors and family members in this project.


Leave a Comment

Name  
  Email   
Message
1 . Deleting users in CRM Dynamics 2011?
 

Answer :

Maybe you can try this work around. Rather than just disabling them, change the active directory name to something else, then disable the records.

For example, your script could look as follows (assuming AD authentication):

Create AD users msmithbmiller, and jdoe.

Perform tests and validation.

Update msmith to testuser1
Update bmiller to testuser2
Update jdoe to testuser3

Deactivate testuser1testuser2testuser3

Next test will need to use testuser4testuser5testuser6, which means you'll need to create quite a few dummy accounts, but it may be easier to do that, than mess with the CRM SQL database.

For my unit tests where I need a User, I actually mock out the IOrganizationService call for just SystemUser requests, and return a mocked SystemUser entity without it actually hitting CRM. I would suggest that as well, but it sounds like you're attempting to actually test System User creation, so probably isn't an option in this case.


2 . Use Liquid to reference field through 1-N relationship in Dynamics portal web page?
 

Answer :

I think you are heading in the right direction. On Adxstudio I've just confirmed this works:

{{ user.adx_contact_externalidentity[0].adx_username }} .

Try setting up entity permissions for the external identity record. This isnt required in Adxstudio, but I think it may be in Microsoft Portals.

Also try using a loop to iterate over the contents.

{% for child_page in page.children %}

<a href="{{ child_page.url }}">{{ child_page.title }}</a>


3 . Could not load the appsettings.json file when function deployed to azure?
 

Answer :

When Functions execute in Azure, GetCurrentDirectory is set to D:\Windows\system32. There's no appsettings.json in that folder, thus the exception.

I hope you are able to set the directory from which the library is loading settings. If so, you should add an extra parameter to your function of type ExecutionContext and use its FunctionDirectoryproperty. See docs.

Of course, be sure to publish appsettings.json to Azure as part of your deployment.


4 . Publishing Web App to Azure?
 

Answer :

As mentioned it seems that Web publish or VS doesn't update the related files. If we update the AspNetCore, I recommend that we could remove the Azure WebApp files during republish the WebApp. We also could do this with VS. For more detail information, please refer to the screenshot.

enter image description here


5 . Can Microsoft Private Cloud provide Web/Worker roles?
 

Answer :

Cloud Services, which you're describing, are comprised of Web / Worker / VM roles, with Web and Worker OS's maintained by Microsoft and VM Role maintained by you (with multiple instances all based off the baseline image you upload). In all three cases, any type of new image creation is like starting fresh: changes made to the OS while running are not permanently persisted. VM Role does not put Windows Azure into IaaS mode, as the fabric is still using a single baseline image to manage role instances. IaaS, with Virtual Machines, is a bit different, with the Virtual Machines constructable in the cloud (vs. VM Role that requires them to be built locally and then uploaded). Further, any change to a Virtual Machine is persistent. When scaling to multiple instances, you'd need to make VHD copies from your master image, and then each instance would be living on its own (e.g. a change to one Virtual Machine will not show up in the other Virtual Machines).

Having said all that: You have access to Cloud Services (web/worker/vm role) only in Windows Azure today; there's no way to run these locally.

Recently we announced the availability of Windows Azure services for Windows Server. You'll see that there is a subset of Windows Azure features runnable on Windows Server:

  • Web Sites
  • Virtual Machines
  • Service Management Portal and API


6 . Cannot install Visual Studio 2013 update 5 (RTM); Tools for Apache Cordova?
 

Answer :

The command to uninstall a previous version of the tools has 2 different GUIDS in it.

"%ProgramData%\Package Cache\{f2f851cc-42a1-41f2-a2cd-a0e4627a60cb}\vs2013mda_0.1.exe" /uninstall /passive /force/burn.ignoredependencies={53d408db-eb91-43fb-9d8f-167681c19763};vsupdate_KB2829760

The first is the GUID of the Cordova package that you have installed on your machine that you want to uninstall. You can find the correct GUID to use by searching under %ProgramData%\Package Cache for vs2013mda_0.1.exe and find the GUID of the folder where it resides. Substitute the GUID you find on your machine for the first GUID in the command line script.

The second GUID in the command is the GUID of the package that is blocking the uninstall. There are a number of packages that will block the uninstall, and we have included a command for all of them but perhaps not with the right combination of MDD GUID that you have on your machine.

Here is a guide to which GUID you should use in the 2nd part of the command:

If you have VS 2013 Update 4 installed on your machine: {53d408db-eb91-43fb-9d8f-167681c19763}

If you have VS 2013 Update 5 CTP1 installed on your machine: {ee836379-0143-481a-97c9-d577d049e22a}

If you have VS 2013 Update 5 CTP2 installed on your machine: {cf552a8c-484b-4e33-afe7-c81dfadb0cfc}

If none of these work for you still, you can find the correct GUID to use by looking in the uninstall log for the MDD tools. When you attempt to uninstall MDD tools via Add Remove Programs, it will create a log file in %Temp% called dd_mda_tools_YYYYMMDDNNNN.log. In that uninstall log there will be a line that looks something like this: Detected related bundle: {53d408db-eb91-43fb-9d8f-167681c19763}, type: Dependent. Chances are the GUID for the related bundle in your file will be different from the ones we have covered in the pre-constructed commands. You can substitute the dependent GUID that you find in your uninstall log for the GUID in the 2nd part of the command.

 


7 . Access performance counter programmatically in Microsoft Azure web app?
 

Answer :

According to this Microsoft Article it is not supported on Azure Websites:

Windows Performance counter collection isn’t supported on an Azure WebSite

You can however monitor the CPU usuage and Memory Working set using the Monitor tab in the old management portal or directly on the website "blade" using the new portal. Maybe you can get these data out programatically using Microsoft.WindowsAzure.Management.WebSites


8 . Office 365 api in PHP?

Answer :

I'm trying to make an calendar view for my company to show which employees are available. I made an app in Azure, I can logon in to the system, I get an access token, but I can't get information.

I build the request url using curl and send this header with my request

array(6) {
 [0]=>
  string(28) "User-Agent: php-tutorial/1.0"
  [1]=>
  string(588) "Authorization: Bearer ~ACCESS_TOKEN~"
  [2]=>
  string(24) "Accept: application/json"
  [3]=>
  string(55) "client-request-id: ~GUID~"
  [4]=>
  string(30) "return-client-request-id: true"
  [5]=>
  string(45) "X-AnchorMailbox: ~MAIL~"
}

And all I get as a response is: " "

What am I doing wrong?

UPDATE

After logging in, Microsoft does not ask if i want to grant access to the app, but it does grant me an access token. Could this be the problem? And how can I make it ask for permission?

UPDATE 2

After logging in and trying to get information, I get a 401 Error saying: Access denied. Which is strange I think cause it already granted me an access token.

UPDATE 3

Couple days further and I have tried some example and tutorial code to check if it works. But even in these apps the api seem not to work. These are the projects I have tried.


9 . Versioning SQL Server database?
 

Answer :

 I choose not to put schema dumps in under version control as alumb and others suggest because I want an easy way to upgrade my production database.

For a web application where I'll have a single production database instance, I use two techniques:

Database Upgrade Scripts

A sequence database upgrade scripts that contain the DDL necessary to move the schema from version N to N+1. (These go in your version control system.) A _version_history_ table, something like

create table VersionHistory (
    Version int primary key,
    UpgradeStart datetime not null,
    UpgradeEnd datetime
    );

gets a new entry every time an upgrade script runs which corresponds to the new version.

This ensures that it's easy to see what version of the database schema exists and that database upgrade scripts are run only once. Again, these are not database dumps. Rather, each script represents the changes necessary to move from one version to the next. They're the script that you apply to your production database to "upgrade" it.

Developer Sandbox Synchronization

  1. A script to backup, sanitize, and shrink a production database. Run this after each upgrade to the production DB.
  2. A script to restore (and tweak, if necessary) the backup on a developer's workstation. Each developer runs this script after each upgrade to the production DB.

A caveat: My automated tests run against a schema-correct but empty database, so this advice will not perfectly suit your needs.


10 . 2 connections to SQL Server?
 

Answer :

In order to connect to two separate SQL Server instances at the same time, you need two connection strings in your web.config (or app.config), and you need to instantiate two SqlConnection objects.

Config:

<connectionStrings>    
    <add name="LocalConnection"
         connectionString="server=.;database=YourDb;Integrated Security=SSPI;" 
         providerName="System.Data.SqlClient" />
    <add name="RemoteConnection"
         connectionString="server=YourRemoteServerName;database=YourRemoteDbName;User ID=SomeUser;Password=Top$ecret" 
         providerName="System.Data.SqlClient" />
</connectionStrings>

And then in your code, you need to instantiate two SqlConnection objects:

// get the connection strings
string conStringLocal = ConfigurationManager.ConnectionStrings["LocalConnection"].ConnectionString;
string conStringRemote = ConfigurationManager.ConnectionStrings["RemoteConnection"].ConnectionString;

// create the two connections
SqlConnection conLocal = new SqlConnection(conStringLocal);
SqlConnection conRemote = new SqlConnection(conStringRemote);

Now, if you need to get something from the local database, use the conLocal connection for your SqlCommand etc. - and for your remote server, use conRemote instead.



11 . How do I report a bug in Windows Server Service Bus?
 

Answer :

I know it's a late answer to the question and it is actually not the answer to the question asked, but today, after installing VS 2015 RC on a PC with Windows Service Bus 1.1 and restarting the PC, my service bus gateway service stopped working and I went through all the pain described in this question but finally could make a solution out of the fake assembly scenario. Here's the solution:

  1. Created the fake assembly Microsoft.Cloud.Common.AzureStorage.dll with version 2.1.0.0 and signed it with a new key file.
  2. Disassembled it using: ildasm /all /out=azurestorage.il Microsoft.Cloud.Common.AzureStorage.dll
  3. Extracted the public key and public key token from another Microsoft.Cloud.* assembly located in service bus folder by ildasm /Tp Microsoft.Cloud.Common.Diagnostics.dll
  4. Opened azurestorage.il in a text editor and changed the public-key token and public key with the ones extracted in the last step
  5. Reassembled the il file: ilasm /dll azurestorage.il /out=Microsoft.Cloud.Common.AzureStorage.dll
  6. Registered the assembly for signature verification skipping using: sn -Vr Microsoft.Cloud.Common.AzureStorage.dll
  7. Installed the resulting assembly to GAC: gacutil /i Microsoft.Cloud.Common.AzureStorage.dll

and it finally worked. Hope this helps anyone who got stuck in this problem.


12 . TFS Service GitContinuousDeploymentTemplate.12.xaml failing to load parameters?
 

Answer :

It looks like you're using an older version than Visual Studio 2013 to edit the build definition. This build definition carries the .12.xaml which indicates that you should use Visual Studio 12.0 (2013) to edit the template. I understand it might be confusing that Visual Studio 11.0 = 2012 and that 12.0 = 2013, but that's just how it is.

You can use Visual Studio Express 2013 or a stand-alone installation of Team Explorer 2013 to create the build definition and edit it. After creation you can trigger the build from an older version of Visual Studio without any issues


13 . Retrieving and persisting state across requests?
 

Answer :

I am struggling a bit, to understand the sequence of events that occur after a request is sent from a browser/front end client, to the web server.

For this I would say this PDF Poster gives best pictorial representation of request processing in ASP.NET WebAPI.

My question, is, how do I implement this kind of functionality:

Namely:

  • Create an application context, in which I can populate with context sensitive information like a database connection, mailer configuration, object factories, miscellaneous state information etc.

  • Access a user object (which I can add user credentials, permissions etc to)

  • Have access to session variables etc?

For this I would say, WebAPIs are designed to be stateless and so, best approach is to create a persistent session (Say in database) and use an identifier for session (like session key or token) for each request to identify a user and fetch his session variables / context informations.

Now, for implementing the kind of functionality you have asked for in your example, that would be attained by a combination of Authentication Filters and Authorization Filters. .

Each request in WebAPI is first processed by handlers and then before execution of requested action, filters are applied. For your example Authentication filters will hold the DoLogin function and user.hasPermission logic will reside in Authorization filters and only action logic will reside in the Action(function) in controller.

enter image description here


14 . Cropping Image with Xamlcropcontrol for UI and WriteableBitmapEx?
 

Answer :

You will have to use the WBX WinRT APIs for this. Looks like you are trying the WP / Silverlight methods.

Try this:

    async Task<WriteableBitmap> LoadBitmap(string path)
    {
        Uri imageUri = new Uri(BaseUri, path);
        var bmp = await BitmapFactory.New(1, 1).FromContent(imageUri);
        return bmp;
    }

Note it takes an URI. In your case you can rather use the IRandomAccessStream directly:

 var bmp = await BitmapFactory.New(1, 1).FromStream(fileStream);

15 . Deserializing JSON using C# to return items?

Answer :
public class Document
{
    public List<string> keyPhrases { get; set; }
    public string id { get; set; }
}

public class RootObject
{
    public List<Document> documents { get; set; }
    public List<object> errors { get; set; }
}

You should have this structure:

var result = JsonConvert.DeserializeObject<RootObject>(content);