Hoffentlich versteht dies heuer nicht mancher anders#

Ein Fachmann ist ein Mann, der einige der gröbsten Fehler kennt, die man in dem betreffenden Fach machen kann, und der sie deshalb zu vermeiden versteht.

Werner Karl Heisenberg

Wednesday, 31 March 2010 10:39:16 (W. Europe Daylight Time, UTC+02:00) #     | 

 

SharePoint 2010 beta uninstall#

is not an easy one ..

maybe your system not uninstall complete, if you than again start the uninstall, it says.. the app is corrupt..

yes! you lost the folder inetpub\temp\apppools and yes your app and iis server role is also broken.. found with sysinternals’s processmonitor.. wy the hell..

and now ~21h the rc is running atom driven;)

and yes the PageViewerReloaded webpart is able to import, but there comes an error if i will add the part to the Home page: “No available sandboxed code execution server could be found.”.. but i must now a little bit do sleep..

Monday, 29 March 2010 18:35:40 (W. Europe Daylight Time, UTC+02:00) #     | 

 

SharePoint 2010 (beta) -real visual studio ‘Kindergarden’ app-#

at first at the time this was written, we have only a beta version from SharePoint 2010 foundation and also a beta from visual studio 2010 with SharePoint templates

Microsoft had many news blogged around the world and you will also found many open powell points to inform you about the news:

  • pro
    • one great news: visual studio now allows F5 deployment out of the box
    • the sp templates are build in and are able to extend by the community
    • and we must wait for the release too..
  • con
    • there is now not really a renewed solution deployment tool included
    • the auto-naming for the feature- and solution files are at this time a little bit strange
    • the developer should know, there are now two different object models
      • solutions deployed from farm admin have access to the full object model
      • solutions deployed from site collection admin have access to a subset of this sp om
    • i’m missing a tool to export contenttypes and lists from this (farm (new))contenttypes build by SP UI to a visual studio project, rolling this solution to a check-, q- or p-system and lock all my Table Names = SP ListNames and Column Names against changes..

Now after my niggling i will show to you my first adaption of an real app we have buid at first for sp v2: ViewHtmlDocument is an small web part to extent the PageViewer web part delivered with sp and also now with spv4.

At first i have checked if the actual wsp (for spv3) file is importable at collection solution uploader - no there was an error in the manifest.xml cabed in the wsp file..

The second step was to build an new web part with vs2010 beta like the original derivated from Microsoft.SharePoint.WebPartPages.WebPart. all builds went fine, i was able to import it to the collection solution store and also the activation was ok. I was able to select the wp from wp_store in the UI but saving to the page finished with nothing, no error no wp.. Maybe i missed something importent so i build it from scratch like all the other examples found in the new renewed sp sdk:

 

Now we open visual studio:

vs2k10sp2k10_kg_1

And select a new empty SharePoint project, and i have named it SuTor.PageViewerReloaded:

vs2k10sp2k10_kg_2

And yes i have selected a sandboxed version, because now i will have the largest target where my app will run in the feature, the intellicense will disable all not supportrd namespaces for me, but i'm able to use them.

Maybe we build apps in the future to check if the code is running inside a sandbox, so we not stress the sitecollection admins new point system too lot.

vs2k10sp2k10_kg_3

The next step is, to add a new web part item to this project, i named it PageViewerWebPart

vs2k10sp2k10_kg_4

Now we add some internal fields to our new class:

#region  Fields

private string _sContentLink = string.Empty;
private int _iIFrameHeight = 300;
private bool _bIFrameScrolling = false;

#endregion

vs2k10sp2k10_kg_5

For our fields we need some public properties, without we are not able to configure the new web part like all other web parts do:

 

#region Properties

        [Personalizable(), WebBrowsable, WebDisplayName("Content Link"), WebDescription("http://.. .html or .htm or .mht or .pdf")]
        public string ContentLink
        {
            get
            {
                return _sContentLink;
            }
            set
            {
                _sContentLink = value;
            }
        }

        [Personalizable(), WebBrowsable, WebDisplayName("IFrame Height"), WebDescription("height of the IFrame object")]
        public int IFrameHeight
        {

            get
            {
                return _iIFrameHeight;
            }
            set
            {
                _iIFrameHeight = value;
            }
        }

        [Personalizable(), WebBrowsable, WebDisplayName("IFrame Scrolling"), WebDescription("switch on or off the scroller for the IFrame")]
        public bool IFrameScrolling
        {
            get
            {
                return _bIFrameScrolling;
            }
            set
            {
                _bIFrameScrolling = value;
            }
        }

        #endregion

vs2k10sp2k10_kg_6

And after finishing this, we need some logic to do something, that maybe should be a improvement over the original PageViewer web part: we will allow to show pdf and mht files in an iframe.

#region Methods

        protected override void CreateChildControls()
        {
            Panel pl = new Panel();

            // web part is fresh added to page, or misconfigured, we will only alow .htm .html .mht .pdf files
            if (string.IsNullOrEmpty(ContentLink) ||
                (ContentLink.EndsWith(".htm") && ContentLink.EndsWith(".html") && ContentLink.EndsWith(".mht") && ContentLink.EndsWith(".pdf")))
            {
                pl.Controls.Add(new LiteralControl(
                    string.Format("To link to allowed content, {0}open the tool pane{1} and then type a URL in the {2}ContentLink{3} text box you will find in {2}Miscellaneous{3}.", 
                        string.Concat(", 
                        this.ID.ToString(), "');>"), 
                        "", 
                        "", 
                        "")));
            }
            else // we build an iframe literal here
            {
                pl.Controls.Add(new LiteralControl(
                    string.Format("", 
                        ContentLink, 
                        IFrameHeight > 0 ? " HEIGHT=\"" + IFrameHeight + "\"" : "", 
                        IFrameScrolling ? "YES" : "NO")));
            }

            this.Controls.Add(pl);

            pl.Style.Add(HtmlTextWriterStyle.Width, "100%");
        }

        #endregion

vs2k10sp2k10_kg_7

Now we change the description for our new feature a little bit:

vs2k10sp2k10_kg_8 

With the famous F5 deployment we will get our dev box website, maybe there are some speller in the code so you will got not so speedy a luckily face;)

vs2k10sp2k10_kg_9 

We must now add our web part to the page. How we will do that? We select at first the small Edit button and navigate after this with Insert | WebPart to our new web part group SuTor, where we find our new PageViewerWebPart. After pressing the Add button we are able to find the wp on the select area. the wp is not configured at first time, so it's show a text and link to go for configuration:

vs2k10sp2k10_kg_10

I have changed the place where the wp is sitting on my page here, and in the next step i will add the url to the only pdf file in my doc lib on this page.., its by you to set a cosher http link to an existing file..

vs2k10sp2k10_kg_11

And yes its working, “isch weeerd verrueckt, eh dasch geeht doch”:

vs2k10sp2k10_kg_12

If we now close our browser and reopen them manuelly we will get this error message:

vs2k10sp2k10_kg_13

Why? what’s wrong here? “isch weerd noch wirschlisch verrueckt by der ”..

After we eneded the browser instance, started by F5 deployment, visual studio was deinstalling our solution from the target url, that’s why the web part site cant find our solution anymore.

But against this new vs feature, we have now a real sharepoint solution file, we will find them in the bin\debug folder inside our project.

We import the file to the collection store and activate them also there.

vs2k10sp2k10_kg_14

All went fine from now.

project download: SuTor.PageViewerReloaded.zip (27.53 KB)

wsp file download:SuTor.PageViewerReloaded.wsp (4.43 KB)

.net | ms | Sharepoint
Sunday, 28 March 2010 21:18:13 (W. Europe Daylight Time, UTC+02:00) #     | 

 

Dali und SharePoint 2010#

haben eine Gemeinsamkeit, sie waren die Reise nach Berlin wert, wobei die Ausstellung von Dalis Werken am Potzdammer Platz mir persoenlich half, die Entwicklersicht auf SP2K10beta wieder ein stueck weit positiv zu verklaeren.

mit etwas experimentierfreude ist alles zum laufen zu bewegen, man sollte nur genauestens hinschauen, dann gibt es auch genug neues zu entdecken, und das deployment bekommen wir mit community unterstuetzung auch noch hin.. alles ist schoen.

Wednesday, 17 March 2010 21:30:35 (W. Europe Standard Time, UTC+01:00) #     | 

 

All content © 2017, Torsten Schuster
On this page
This site
Calendar
<2017 August>
SunMonTueWedThuFriSat
303112345
6789101112
13141516171819
20212223242526
272829303112
3456789
Archives
 Full Archives By Category
August, 2017 (1)
July, 2017 (2)
February, 2017 (1)
September, 2016 (1)
May, 2016 (1)
March, 2016 (3)
February, 2016 (3)
January, 2016 (4)
December, 2015 (3)
November, 2015 (4)
August, 2015 (4)
July, 2015 (6)
June, 2015 (2)
May, 2015 (1)
April, 2015 (1)
March, 2015 (1)
February, 2015 (2)
January, 2015 (3)
December, 2014 (2)
November, 2014 (3)
October, 2014 (9)
September, 2014 (10)
August, 2014 (15)
July, 2014 (21)
June, 2014 (19)
May, 2014 (16)
April, 2014 (20)
March, 2014 (10)
February, 2014 (3)
January, 2014 (5)
December, 2013 (2)
November, 2013 (5)
October, 2013 (3)
September, 2013 (2)
August, 2013 (1)
July, 2013 (2)
May, 2013 (5)
April, 2013 (1)
March, 2013 (2)
January, 2013 (1)
December, 2012 (1)
October, 2012 (2)
April, 2012 (1)
March, 2012 (1)
February, 2012 (2)
January, 2012 (3)
December, 2011 (5)
October, 2011 (1)
September, 2011 (1)
August, 2011 (4)
July, 2011 (2)
June, 2011 (1)
May, 2011 (4)
April, 2011 (4)
January, 2011 (2)
December, 2010 (2)
November, 2010 (2)
October, 2010 (2)
September, 2010 (10)
August, 2010 (3)
July, 2010 (1)
June, 2010 (1)
May, 2010 (7)
April, 2010 (5)
March, 2010 (4)
February, 2010 (4)
January, 2010 (3)
December, 2009 (3)
November, 2009 (2)
October, 2009 (4)
September, 2009 (5)
August, 2009 (5)
July, 2009 (2)
June, 2009 (3)
May, 2009 (4)
April, 2009 (2)
March, 2009 (3)
February, 2009 (2)
January, 2009 (1)
December, 2008 (1)
November, 2008 (4)
September, 2008 (5)
August, 2008 (5)
July, 2008 (3)
June, 2008 (3)
May, 2008 (3)
April, 2008 (3)
March, 2008 (4)
February, 2008 (3)
January, 2008 (6)
December, 2007 (5)
November, 2007 (5)
October, 2007 (8)
September, 2007 (6)
August, 2007 (5)
July, 2007 (4)
June, 2007 (6)
May, 2007 (1)
April, 2007 (5)
March, 2007 (2)
February, 2007 (3)
January, 2007 (4)
December, 2006 (3)
October, 2006 (3)
August, 2006 (1)
July, 2006 (4)
May, 2006 (2)
March, 2006 (4)
February, 2006 (3)
January, 2006 (1)
November, 2005 (1)
September, 2005 (4)
August, 2005 (8)
July, 2005 (10)
June, 2005 (7)
May, 2005 (5)
April, 2004 (6)
March, 2004 (2)
February, 2004 (4)
January, 2004 (14)
December, 2003 (3)
November, 2003 (8)
October, 2003 (9)
September, 2003 (9)
August, 2003 (10)
July, 2003 (3)
June, 2003 (7)
May, 2003 (4)
April, 2003 (4)
March, 2003 (5)
February, 2003 (11)
Sitemap
Blogroll OPML
Disclaimer

Powered by: newtelligence dasBlog 2.3.12105.0

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

© Copyright 2017, Torsten Schuster

Send mail to the author(s) E-mail