CM & CD Setup

How to create a custom application pool identity in IIS using windows DOMAIN\User for your #Sitecore instance

Posted on Updated on

This is a continuation of the series Login failed user DOMAIN\User post. If by any chance you bumped into this post, you may still continue as it has no dependency with the previous post.

In this post, we will create a custom application pool identity in IIS using the windows credential of your machine.

The steps are very easy to follow.

  1. Open the Internet Information System a.ka IIS
  2. Navigate to the Application Pools 

Application_Pools.png

  1. Select the application pool of your Sitecore instance, in my case sitecore.blacksmith
  2. On the right Actions pane > click the Advanced Settings
  3. Once the Advanced Settings is opened, look for the Identity and click the “…” beside it.
  4. The Application Pool identity window will show up, then change it to Custom Account
  5. Click the Set… button, and the Set Credentials window will appear.
  6. You’ll noticed that you have to provide the User name and Password, and that’s because we’re trying to use the windows credential of the machine.
  7. Use your windows username: MARVINGDL and windows password: SECRET!HACKER
  8. Then, you’re all set 🙂

How_to_create_a_custom_application_pool_identity_in_IIS_using_windows_DOMAINUser

In other scenarios, let’s say on your production environment, you may use the DOMAIN\USER when creating a custom application pool identity.

Example:

Username: TECL\SCSTG

Password: SERVER_ADMIN_PASSWORD

Related Posts:

Advertisements

How to connect to two (2) sitecore instances from virtual machine / rdp simultaneously

Posted on Updated on

In this post, I would tackle the procedure on how to establish a connection from a virtual machine a.k.a RDP on your local machine.

Important note: This is for Development / System Integration (SIT) environment only.

The two (2) things:

  1. Configure to expose the two (2) SC instances to your network.
    1. Assumption: You’re connected on the same network.
  2. Connect from your local machine.
    1. Assumption: You’re connected to LAN. 🙂

The why? 

1. Easy to access

2. Less stress/processes on the virtual machine.

Let’s imagine you’re working with other 5 developers, and everyone are trying to connect to it. All of you may – for sure – experience the so-called ‘slowness’.

3. Easy to configure

The scenario:

Say you’re working on an upgrade, and you want to access both SC instances simultaneously . This time, not inside a virtual machine because your team should also connect to it and should be composed to the Project Manager, QA, FE and your boss. Amazing! 🙂

The variables:

Sitecore Instance 1: local.sitecore.com (eg. v. 7.2)

Sitecore Instance 2: upgraded.sitecore.net (eg. v.8.1 Update-3)

 

1.  Configure your two (2) SC instances from the virtual machine

In IIS, for local.sitecore.com, leave the Host Name empty, Port to 80 – default and IP Address to All Unassigned.

local.sitecore.com IIS bindings

In IIS, for upgrade.sitecore.com,

upgrade.sitecore.com:80 * : The binding when accessing the site inside RDP

upgrade.sitecore.com:80 203.130.253.230 : The binding when accessing the site outside RDP (This is what we want)

upgrade.sitecore.com:443 203.130.253.230 : The binding when accessing the site secured outside RDP (https)

More about creating self-assigned certificate here.

upgrade.sitecore.com IIS bindings

For hackers out there, FYI, the IP address is fake.

hacker everywhere

Leave as is. This is the default value of the SC instances upon installation.

File location : C:\Windows\System32\drivers\etc\host

host_file_entries

2.  Connect from your local machine

Update your host file.

File location : C:\Windows\System32\drivers\etc\host

local_host_file_entries.png

Note: For some cases, you need to put the website in your proxy settings, but for this case we don’t need to.

At this point, you would be able to access you site from your favorite browser in your local machine. What you only need to do is, just type the local.sitecore.com OR upgrade.sitecore.com in your browser.

Enjoy!

 

Fixed: Could not create instance of type: Sitecore.Data.SqlServer.SqlServerIDTable. No matching constructor was found.

Posted on Updated on

I’m playing around with the Sitecore configurations today, while setting up the content management & content delivery environments. Then suddenly, this error showed up.

Server Error in ‘/’ Application.


Could not create instance of type: Sitecore.Data.SqlServer.SqlServerIDTable. No matching constructor was found.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: Sitecore.Exceptions.ConfigurationException: Could not create instance of type: Sitecore.Data.SqlServer.SqlServerIDTable. No matching constructor was found.
Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[ConfigurationException: Could not create instance of type: Sitecore.Data.SqlServer.SqlServerIDTable. No matching constructor was found.]
   Sitecore.Configuration.Factory.CreateFromTypeName(XmlNode configNode, String[] parameters, Boolean assert) +272
   Sitecore.Configuration.Factory.CreateObject(XmlNode configNode, String[] parameters, Boolean assert, IFactoryHelper helper) +131
   Sitecore.Configuration.Factory.CreateObject(String configPath, String[] parameters, Boolean assert) +579
   Sitecore.Configuration.Factory.GetIDTable() +27
   Sitecore.Data.IDTables.IDTable.GetProvider() +11
   Sitecore.Data.IDTables.IDTable.GetKeys(String prefix, ID id) +46
   Sitecore.Strategy.Contacts.DataProviders.IDTableHelper.IsItem(String prefix, ID itemId) +73
   Sitecore.Strategy.Contacts.DataProviders.IDTableHelper.IsFacetItem(ID itemId) +65
   Sitecore.Strategy.Contacts.Pipelines.DataProviders.IsHandled.DefaultProcessor.Process(IsHandledArgs args) +327
   (Object , Object[] ) +177
   Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args) +484
   Sitecore.Pipelines.CorePipeline.Run(String pipelineName, PipelineArgs args) +28
   Sitecore.Strategy.Contacts.Pipelines.DataProviders.GetItemDefinition.CheckIfHandled.Process(GetItemDefinitionArgs args) +217
   (Object , Object[] ) +177
   Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args) +484
   Sitecore.Pipelines.CorePipeline.Run(String pipelineName, PipelineArgs args) +28
   Sitecore.Strategy.Contacts.DataProviders.ContactFacetDataProvider.GetItemDefinition(ID itemId, CallContext context) +130
   Sitecore.Data.DataProviders.DataProvider.GetItemDefinition(ID itemID, CallContext context, DataProviderCollection providers) +148
   Sitecore.Data.DataSource.GetItemInformation(ID itemID) +88
   Sitecore.Data.DataSource.GetItemData(ID itemID, Language language, Version version) +31
   Sitecore.Nexus.Data.DataCommands.GetItemCommand.GetItem(ID ƒ, Language „, Version , Database ) +92
   Sitecore.Nexus.Data.DataCommands.GetItemCommand.Execute(ID ƒ, Language „, Version , Database ) +496
   Sitecore.Data.Engines.DataCommands.GetItemCommand.DoExecute() +139
   Sitecore.Data.Engines.EngineCommand`2.Execute() +96
   Sitecore.Data.Managers.ItemProvider.GetItem(ID itemId, Language language, Version version, Database database) +292
   Sitecore.Data.Managers.ItemProvider.GetItem(ID itemId, Language language, Version version, Database database, SecurityCheck securityCheck) +141
   Sitecore.ContentTesting.Pipelines.ItemProvider.GetItem.GetItemUnderTestProcessor.Process(GetItemArgs args) +145
   (Object , Object[] ) +74
   Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args) +484
   Sitecore.Data.Managers.PipelineBasedItemProvider.ExecuteAndReturnResult(String pipelineName, String pipelineDomain, Func`1 pipelineArgsCreator, Func`1 fallbackResult) +64
   Sitecore.Data.Managers.ItemManager.GetItem(String itemPath, Language language, Version version, Database database) +142
   Sitecore.FXM.Matchers.DomainMatcherRepository.GetAllDomainMatchers(IDatabase database) +81
   Sitecore.FXM.Sites.FxmSiteProvider.GetFxmSites() +182
   Sitecore.FXM.Sites.FxmSiteProvider.get_FxmSites() +103
   Sitecore.FXM.Sites.FxmSiteProvider.GetSites() +88
   System.Linq.<SelectManyIterator>d__16`2.MoveNext() +244
   Sitecore.Sites.SiteCollection.AddRange(IEnumerable`1 sites) +138
   Sitecore.Sites.SitecoreSiteProvider.GetSites() +225
   Sitecore.Sites.SiteContextFactory.GetSites() +256
   Sitecore.Sites.SiteContextFactory.GetSiteContext(String hostName, String fullPath, Int32 portNumber) +121
   Sitecore.Pipelines.HttpRequest.SiteResolver.ResolveSiteContext(HttpRequestArgs args) +430
   Sitecore.Pipelines.HttpRequest.SiteResolver.Process(HttpRequestArgs args) +50
   (Object , Object[] ) +74
   Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args) +484
   Sitecore.Nexus.Web.HttpModule.(Object , EventArgs ) +529
   System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +142
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +92

My first impression was “huh?!, I’m just changing some configurations, so why it’s throwing no matching constructor“. I asked myself.

huh john depp

So I reverted back my changes one by one, and found out that the issue is because of the changes in the Sitecore.Strategy.Contacts.config. Because I replaced the word ‘master‘ to ‘web’ and that’s the reason I encountered the yellow page. Gotcha!

Sitecore.Strategy.Contacts config

If I proceed a little more further, it would be much harder for me to trace the issue, as it seems that the change in the configuration has no direct connection with the stack traces on the first look. So good thing, I am consistently refreshing the SC instance, every time I change something in the configuration.  😉