Jul 20, 2012

SPThumbMaker-Example for an Auto-Hosted Azure SharePoint App

To dig a little bit deeper into the possibilities of auto-hosted and provider hosted SharePoint 2013 apps, I’ve created a small example called “SPThumbMaker”. The app generates thumbnails for images that are stored in a picture library on the host site. To see how to get started with Auto-Hosted Azure apps read my previous post or the post Creating Provider Hosted Apps from my MVP mate Thorsten Hans.

Extend the Ribbon and the ECB to add the actions for the thumbnail generation

Ribbon Button “Create Thumbnails”

image

ECB Action

image

Elements XML of the two actions:

image

To only show the actions in picture libraries only I registered the actions on the list template type 109 (Picture Library). The “~remoteAppUrl” token points to the dynamically hosted ASP.NET site. Because my ASP.NET site must know for which image it should generate templates I’ve also appended the tokens “{ListId}” and “{ItemId}”. Beside the “~remoteAppUrl” token there is no difference to how you to SharePoint 2010 ribbon extension. But there this one restriction:
You can’t make use of JavaScript in the CommandAction. This is not allowed by design.

Get SharePoint Look and Feel on your ASP.NET Site

To integrate remote apps seamless into SharePoint the product team added the possibility to add the SharePoint chrome to our remote app.

Add the jQuery and ASP.NET AJAX Libraries

image

Dynamically load the “SP.UI.Controls.js” script. The scripts contains everything you need to render the SharePoint chrome on your site. This way you can load any other SharePoint script and CSS from within your app.

image

Render the SharePoint Chrome. You can customize the chrome via the options parameter. For example set the icon, title, add links…

image

Add a div container to render the chrome

image

Now the site header looks like this Smile

image

Server-side Thumbnail Generation

The generation works as follows:

I in the code behind of the ASP.NET form I extract the URL parameters, valid the SharePoint Context Token and get an OAuth AccessToken.

image

In the markup of the page I render image tags with a dynamically generated urls to a custom HttpHandler that generates the thumbnails.

image

I append to the URL all the parameters that I’ve got from the action (SPHostWeb, ListId, ItemId), the AccessToken and the size of the thumbnail.

image

In the HttpHandler I extract the query parameters and use the AccessToken to get a CSOM ClientContext to load the target  image from the host site and generate the thumbnail.

image

Finally the result looks like this

image

I hope this post helps to get a little bit better understanding of what you can do with auto-hosted and provider hosted apps.

You can download the source code here.

834 comments:

«Oldest   ‹Older   801 – 834 of 834
Manish Packers and Movers Pvt Ltd said...

Packers and Movers Kolkata - Best Movers and Packers in Kolkata offers home, office and local shifting services at affordable price. Call 09329580002, Visit @
Packers and Movers Kolkata

India Movers Packers said...

This is very useful information, Thank you for sharing your experience.

Get best moving companies quote and charges on Call2Move Affordable house or office shifting.

movers and packers bangalore
movers and packers hyderabad
movers and packers delhi

Obat Penurun Serum Kolesterol said...

Thank you for sharing the information, the article is very interesting to read and may be useful for everything

Obat Anak Panas Dalam
Obat Gangguan Fungsi Pernapasan (Sesak Nafas)
Obat Penyakit Rematik Tradisional
Pengobatan Penyakit Gula Darah
Cara Alami Mengobati Psoriasis
Obat Nyeri Pinggang Belakang

Pengobatan Atasi Bursitis said...

Nice Article ;)

Tips Untuk Mengobati Radang Amandel
Obat Radang Paru-Paru Basah
Pengobatan Atasi Radang Usus Buntu
Obat Untuk Mengikis Batu Ginjal
Tips Untuk Mengobati Kencing Batu
Pengobatan Atasi Penyakit Kencing Manis

sam krik said...

Installing your Microsoft Office365 may be you can see the message like, Stop, you should wait to install Office 2016.www.office.com/setup

Pengobatan Atasi Blefaritis (Radang Kelopak Mata) said...

Thank you for the various information, hopefully useful for everyone

Pengobatan Atasi Masalah Dispepsia
Cara Mengobati Emboli Paru
Pengobatan Atasi Penyakit Fibrosis Paru
Cara Alami Menghancurkan Batu Empedu
Obat Infeksi Saluran Empedu
Cara Mengobati Infeksi Kandung Kemih

Manish Packers and Movers Pvt Ltd - Call 09303355424 said...

Packers and Movers Indore
Packers and Movers Gurgaon
Packers and Movers Kolkata
Packers and Movers Mumbai
Packers and Movers Bhopal
Packers and Movers Delhi
Packers and Movers Jaipur
Packers and Movers Raipur
Packers and Movers Pune
Packers and Movers Ahmedabad

Manish Packers and Movers Pvt Ltd - Call 09303355424 said...

Packers and Movers Indore
Packers and Movers Gurgaon
Packers and Movers Kolkata
Packers and Movers Mumbai
Packers and Movers Bhopal
Packers and Movers Delhi
Packers and Movers Jaipur
Packers and Movers Raipur
Packers and Movers Pune
Packers and Movers Ahmedabad

blog said...

کسب و کار اینترنتی
بازاریابی اینترنتی
بازاریابی محتوا
ایمیل مارکتینگ
کسب و کار
سئو
دیجیتال مارکتینگ
بازاریابی ویروسی
تبلیغات اینترنتی
رتبه الکسا
کاهش رتبه الکسا
تولید محتوا
آموزش سئو
بهینه سازی سایت
تبلیغات گوگل
تبلیغات در گوگل
فروشگاه اینترنتی
فروشگاه های اینترنتی
موتورهای جستجو
کسب درآمد ایننترنتی
کسب درآمد از اینترنت
بک لینک
افزایش بازدید سایت
کار در منزل
بازاریابی
استارتاپ
ایده های کسب و کار
ایده های کسب و کار اینترنتی
کسب و کار اینترنتی خانگی
استراتژی بازاریابی محتوا
استراتژی کسب و کار اینترنتی
قیف بازاریابی
قیف فروش
درآمد اینترنتی
کار اینترنتی
راه اندازی کسب و کار اینترنتی
بازاریابی شبکه های اجتماعی
بازاریابی شبکه ای
مارکتینگ
نتورک مارکتینگ
افزایش رتبه گوگل
کسب و کار اینترنتی در ایران
راه اندازی کسب و کار جدید

sweeti sinhaa said...

Sweetisinhaa offering Jaipur escorts service at affordable rates with 5% GST.
http://www.sweetisinhaa.com/
http://www.sweetisinhaa.com/services.html
http://www.sweetisinhaa.com/gallery.html
http://www.fahimaanaz.com/
http://www.anjeelaseth.com/

sweeti Sinhaa said...

All TYPES FEMALE ESCORTS SERVICE, HYDERABAD CALL GIRL, VIP INDEPENDENT ESCORT IN HYDERABAD, HYDERABAD ESCORTS, HOUSEWIFE ESCORTS IN HYDERABAD, AIRHOSTESS HYDERABAD ESCORTS

http://vipno1escorts.com/


HYDERABAD ESCORTS


ESCORTS IN HYDERABAD


HYDERABAD ESCORTS GIRLS


HYDERABAD FEMALE ESCORT GIRL


INDEPENDENT HYDERABAD ESCORTS


INDEPENDENT ESCORTS IN HYDERABAD


HYDERABAD INDEPENDENT ESCORTS


INDEPENDENT ESCORTS HYDERABAD


HYDERABAD ESCORTS SERVICES


HYDERABAD ESCORTS SERVICE


ESCORTS SERVICE IN HYDERABAD


VIP No1 ESCORTS HYDERABAD


HYDERABAD ESCORTS AGENCY


ESCORTS HYDERABAD CALL GIRLS


http://vipno1escorts.com/


HYDERABAD ESCORTS


HYDERABAD ESCORTS


HYDERABAD ESCORTS


HYDERABAD ESCORTS


HYDERABAD ESCORTS

Tips Untuk Mengobati Pembengkakan Hati said...

A very interesting article to read

Cara Mengobati Kista Bartholin
Cara Mengobati Polip Rahim
Cara Mengobati Bursitis Alami
Cara Mengobati Usus Turun/Turun Berok
Cara Mengatasi Bengkak Di Leher
Tips Pengobatan Untuk Atasi Saraf Terjepit

Rupshika Rai said...

Very Nice Blogs.
http://www.rupshikarai.com/

Baju Anak Branded said...

Thank you so much for your information ya min. Nice and very great information. I'm so lucky hear that

anonymous said...

hey nice info thanks for shareShahrukh Khan Upcoming Movies
Best wedding planning company in delhi ncr
Best event management company in delhi ncr
Event organisers in delhi ncr
Led wall rental in delhi ncr
lights and sound rental in delhi ncr

Sharon Wood said...

Canon Printer Help Number
Malwarebytes Contact Number
HP Printer Customer Care Number
Brother Printer Customer Care Phone Number

Soniya Mitra said...

Pune Escorts
Escorts In Pune
Escort Service In Pune
Independent Pune Escorts
Female Pune Escorts
Call Girls in Pune
Female Escort in Pune
Pune Escorts Girls
Escort Pune
Pune Escort Services
Best Pune Escorts
VIP Pune Escorts
Celebrity Pune Escorts
Model Escorts in Pune
Russian Escort in Pune
High Profile Pune Escorts
Escorts in Jaipur
Escorts in Nashik
Jaipur Escorts
Nashik Escorts
Escort Service in Jaipur
Escort Service in Nashik

Rani Anggraeni said...

I am happy to be here and this wonderful article. I have found here lots of interesting information for my knowledge I need. all the details you provide to us, it was very helpful and useful, thanks for sharing this amazing post.

cara menormalkan penglihatan yang buram
cara mengatasi maag saat hamil
cara mengobati sakit perut bagian kanan bawah
cara mengobati sakit pinggang sebelah kanan
cara mengobati ambeien atau wasir secara alami
cara menyembuhkan kejang kejang
cara menghilangkan cairan di paru paru

Anonymous said...

For Latest updates of Bollywood, Hollywood and Tollywood Check this blog
Newsvx
Shahrukh khan upcoming movies

We are the best event organisers in delhi ncr
Event organisers in delhi ncr
social media marketing company in delhi
Most of the people want graphic design in india to grow there product and brand
Graphic design in delhi
Best event management company in delhi ncr
Webslogin is the best web designing company in india
best web designing company in India
Best wedding planning company in delhi ncr
We are the best web designers in delhi ncr
web designers in delhi

jolly said...

good one!!
mcafee.com/activate

jolly said...

great one..
mcafee.com/activate

www.office.com/setup said...

excellent job...cheers
http://office-helps.com

mcafee.com/activate said...

fantastic job...loved it
http://mcafee-activation.com

Anonymous said...

social media marketing company in delhi
Most of the people want graphic design in india to grow there product and brand
Graphic design in delhi
Best event management company in delhi ncr
Webslogin is the best web designing company in india
best web designing company in India
Best wedding planning company in delhi ncr
We are the best web designers in delhi ncr

pavithra dass said...

I am really liked reading your nice articles. It looks like you spend a lot of time on your blog. I have saved it and I am looking forward to reading new articles. Keep it up the good work.
Hadoop Training in Chennai
Big Data Training in Chennai
Selenium Training in Chennai
Software Testing Training in Chennai
Java Training in Chennai
big data training in chennai anna nagar
hadoop training in Velachery

ram ramky said...

Excellent info...Thanks admin for the wonderful post.

Loadrunner Training in Chennai
JAVA Training in Chennai
Hadoop Training in Chennai
Selenium Training in Chennai
German Classes in chennai
web designing Training in chennai
DOT NET Training in Chennai
Best DOT NET Training institute in Chennai

regina razz said...



We are providing a step by step guide to set up Office along with independent support service for installation and activation issues.

www.office.com/setup

acker009 said...

Installing your Microsoft Office365 may be you can see the message like, Stop, you should wait to install Office 2016.www.office.com/setup

annejames said...



Microsoft Office365 may be you can see the message like, Stop, you should wait to install Office .
www.office.com/setup

Seojasa.com said...

Thank you for sharing good information ... And for those of you who are currently looking for the best and quality SEO services, you can directly visit our website Seojasa.com

التسويق الاكترونى said...

افضل شركة تنظيف منازل بالرياض
شركة تنظيف فلل بالرياض
شركة تنظيف شقق بالرياض
شركة تنظيف موكيت بالرياض
شركة تنظيف كنب بالرياض
شركة تنظيف مجالس بالرياض
شركة تنظيف واجهات بالرياض
شركة تنظيف مساجد بالرياض
شركة تنظيف مكيفات بالرياض
شركة تسليك مجارى بالرياض

Sophie Grace said...

Thanks for sharing this information. I really like your blog post very much. You have really shared a informative and interesting blog post. picbear

على جمال said...


شركة تنظيف بالرياض
تقدم شركتنا افضل الخدمات المنزلية علي الاطلاق حيث انها تقدم خدمات التنظيف المتكاملة مثل تنظيف المنازل والبيوت والفلل والقصور وتنظيف الموكيت وتنظيف الكنب وتنظيف الستائر وغير من العمل النظافة يمكنك زيارة موقعنا لانها هي الافضل علي الاطلاق حيث انها توفر كل الخدمات التاليه:
شركة تنظيف منازل بالرياض
شركة غسيل كنب بالرياض
شركة تنظيف ستائربالرياض
شركة تنظيف سجاد بالرياض
شركة تنظيف مكيفات بالرياض
شركة تنظيف شقق بالرياض
شركة تنظيف مجالس بالرياض

Gino Leo said...

I agree with you. Thank you for sharing the update. It is interesting to have it discussed widely so that we can gain more objective opinions.
best web design company

«Oldest ‹Older   801 – 834 of 834   Newer› Newest»