Tuesday, March 26, 2019

Sitecore 9.1 admin password is no longer 'b'?

Hi,

            I'm going to share my issue experience in getting admin default password in sitecore 9.1 installation.

Today i installed sitecore xp 9.1 and noted one important thing,that is default admin password is no longer 'b'.

Then i had one question "If no longer 'b' then what the default password is ?"
                           
                 After locating from installation guide,the default admin password is set to "SIF-Default" in XP0-SingleDeveloper file in the SitecoreAdminPassword parameter which means SIF generates a "Random Password" for you at the end of the script execution.






After reading this, you must have another question if i want to change back to 'b' what i need to do ?
                       
              Answer is simple , you can edit the SitecoreAdminPassword  before installation. or  you can simply copy the random password generated by SIF and change to what you want using user manager.









I hope you've enjoyed with this post. Thanks :)

Monday, March 25, 2019

Insert image to item field in MVC controller

Hi,

I'm going to share my issue experience here..

Issue:

While a time ago, 
i've ended up with one requirement "need to set image to item field in controller"

i searched in google and tried so many methods for this but not working.

After lot of research finally i found the work around.

Solution:
  
   imageField.SetAttribute("Src", imageItem.MediaPath);    

Src - Field name
imageItem.MediaPath - your image item

Thanks :)

"Got a No Service Error" from sitecore Rocks in VS

Hi,

I'm going to share my issue experience while using sitecore rocks in visual studio.

Issue :
  • I've installed sitecore rocks in my system then i'm going to create a connection to my sitecore instance.
  • During connection creation i've faced the below issue













Solution:
  • After investigation we found the reason for the issue.
  • It's an Permission Issue.

The below URL is helped me to quickly locate the issue
https://sitecore.stackexchange.com/questions/9659/create-connection-for-sitecore-9-instance-with-sitecore-rocks

we need to add the below line to Web.config to overcome the issue
<location path="sitecore/shell/WebService">
    <system.web>
        <authorization>
            <allow users="?,*" />
        </authorization>
    </system.web>
</location>
Thanks :)

Refused to get "Unsafe Header - Location" while getting response header in item service

Hi,
     
        Today i'm going to share my issue experience while creating item using item service in sitecore.services.client.


REST API is one of the key features in sitecore.

Sitecore provides two ways to use REST API
.
1. Item Service
2. Entitiy Service

If you want more explanation please refer the below url
https://doc.sitecore.com/developers/90/sitecore-experience-management/en/the-restful-api-for-the-itemservice.html

Issue: 
         
I'm trying to create an item using ItemService in Sitecore.Services.Client.
Item creation is working fine and response looks like this:
201 (Created).
Location: /item/0727f965-2338-43cc-bd88-5071ad3f7a12?database=master
My need is to get this location in the response header.
During that I'm facing this issue:
refused to get unsafe header "Location" Error
my code sample:
 request.setRequestHeader('Access-Control-Expose-Headers', 'Location');
            request.onreadystatechange = function () {
                if (this.readyState == 4) {
                    console.log(this.status); 
                    console.log(this.getResponseHeader('Location'));                                       
                }
            };
Solution:
I found the solution by adding the below line in web.config.
<httpProtocol>
      <customHeaders>
        <add name="Access-Control-Expose-Headers" value="*"/>
        <remove name="X-Powered-By" />
      </customHeaders>
 </httpProtocol>

Sitecore Tab is not appearing after installing sitecore rocks

Hi,

          Today i am going to share my issue experience while installing sitecore rocks.


why developer need sitecore rocks ?
  • Sitecore rocks brings the most of the content management functionality directly in visual studio will make developers happy.
  • It's open source.we can install  it from VS2017 extensions and updates.
  • Minimize the switch between browser and visual studio..

Issue:


I installed 

sitecore rocks from extensions and updates
. After i restarted my system.
  After i've checked in VS2017 , sitecore tab is not appearing.

 Solution:
     After so much of investigation finally i find the work around
 Steps to solve the issue :
  • uninstall Rocks
  • delete C:\Users\User\AppData\Local\Microsoft\VisualStudio\15.0_c2d19173\privateregistry.bin and privateregistry.user.bin file (please backup them first)
  • reinstall Rocks
  • start Visual Studio and problem should be solved

Thanks :)

Check the users Logged into the sitecore backend

Hi, Today I'm going to discuss about " how to check the concurrent users logged into the sitecore backend ? ". For this ...