Showing posts with label Sharepoint. Show all posts
Showing posts with label Sharepoint. Show all posts

Friday, May 11, 2012

In the Esri's ArcGIS for SharePoint SDK, you can create buttons in the SharePoint ribbon.  In this example, I will talk about the OnHidden event.  This event fires when the Hide() is called on the floating window after it is displayed.  This can be used to signal a process that the event is finished, and now you can do some other process or show another form etc...

Here I just implemented ICommand, and kept everything default.  I created a custom event EventHandler called OnHidden that will get call when the floating window is hidden or closed by a user.

    [Export(typeof(ICommand))]
    [DisplayNameAttribute("This is a Demo")]
    [DefaultIcon("/DemoFun;component/Images/Demo.png")]
    public class cmdGenerateExcelTemplate : ICommand
    {
        public bool CanExecute(object parameter)
        {
            return true;
        }

        public event EventHandler CanExecuteChanged;
        public event EventHandler OnHidden;
     
        public void Execute(object parameter)
        {
         
            MapApplication.Current.ShowWindow("This is my control",
                 <controlobject>,
                false,
                null,
                OnHidden,
                WindowType.Floating);
            this.OnHidden += new EventHandler(cmdGenerateExcelTemplate_OnHidden);

        }

        void cmdGenerateExcelTemplate_OnHidden(object sender, EventArgs e)
        {
            MessageBox.Show("I'm hidden now!");
        }
That's It.  It's very easy to do, and helpful in some instances.

Enjoy


Thursday, March 24, 2011

Two Great Books

Two great books that I've been reading lately are:
  1. Microsoft Silverlight 4 and SharePoint 2010 Integration by Packt Publishing 
  2. Expert Python Programming by Packt Publishing
I don't work for Packt nor am paid to promote any of these books.  I just like the way the material is presented.  I find the books easy to read, information is presented in a meaningful way, and the material/examples are top notch.

These are two resources any programmer should have on the old bookshelf, or in the e-reader.

Friday, October 8, 2010

Alternate Access Mapping for SharePoint

Alternate Access Mapping enables you to access your Sharepoint site via a typical URL like http://mysharepoint.com instead of hitting the server name at http://mysharepointserver. In combination with DNS A host entries you can also define URLs like http://mysite.mysharepoint.com even though your My Site web application is hosted on a different port.


Let's start:

  1. Go to Central Administration 
  2. Click on the Operations Tab
  3. Click on Alternate Access Mappings under Global Configuration
  4. You should now see a list of your web applications, switch over to the one you want to map to the new URL by selecting it from the drop down on the right side.
  5. Click on Edit Public URLs and change the desired zone URL type to your new domain name. You can also change your internal URLs also by clicking Add Internal URLs.
  6. Now you’ll have to switch over to your DNS server.
  7. Within the DNS Management Console and Under Forward Look up Zones:
  8. Add a new Primary Zone with your new domain name.
  9. Add a new Host (A) to the records and point the IP Address to the SharePoint server.
Enjoy

SharePoint 2007 - Enable Anonymous Access

1). To enable anonymous on the IIS web site do the following:
  • Launching Internet Information Services Manager from the Start -> Administration Tools menu
  • Select the web site, right click and select Properties
  • Click on the Directory Security tab
  • Click on Edit in the Authentication and access control section
1a). Or enable anonymous in SharePoint using the Central Administration section:
  • First get to your portal. Then under “My Links” look for “Central Administration” and select it.
  • In the Central Administration site select “Application Management” either in the Quick Launch or across the top tabs
  • Select “Authentication Providers” in the “Application Security” section
  • Click on the “Default” zone (or whatever zone you want to enable anonymous access for)
  • Under “Anonymous Access” click the check box to enable it and click “Save”
NOTE: Make sure the “Web Application” in the menu at the top right is your portal/site and not the admin site.
You can confirm that anonymous access is enabled by going back into the IIS console and checking the Directory Security properties.
2). Enable anonymous access in the site.
  • Return to your sites home page and navigate to the site settings page. In MOSS, this is under Site ActionsSite SettingsModify All Site Settings. In WSS it’s under Site ActionsSite Settings.
  • Under the “Users and Permissions” section click on “Advanced permissions”
  • On the “Settings” drop down menu (on the toolbar) select “Anonymous Access”
  • Select the option you want anonymous users to have (full access or documents and lists only)
Now users without logging in will get whatever option you allowed them.
A couple of notes about anonymous access:
  • You will need to set up the 2nd part for all sites unless you have permission inheritance turned on
  • If you don’t see the “Anonymous Access” menu option in the “Settings” menu, it might not be turned on in Central Admin/IIS. You can manually navigate to “_layouts/setanon.aspx” if you want, but the options will be grayed out if it hasn’t been enabled in IIS
  • You must do both setups to enable anonymous access for users, one in IIS and the other in each site

Thursday, April 29, 2010

The Joys of Installs

Today I decided to roll up my sleeves and install SharePoint 2010 beta.
First I decided that I wanted to use Windows 7 64-bit, which was a mistake. All the documents point to the fact that you can do an install on win7-64bit, but you can't. You need to alter the config.xml file.

So I alter everything, and now the setup likes it, yippee, and get the 300 prerequisites installed. (See: http://blogs.msdn.com/opal/archive/2009/10/25/sharepoint-2010-pre-requisites-download-links.aspx for pre-reqs) Now I'm ready to install SP 2010 and configure it. Oh wait, I'm not... error after error, and most of the answers are found here, www.google.com because Microsoft's help is crap.

Getting sick of the errors, and a glutton for punishment, I decided to format my HD and install Windows 2008, which is the desired OS for sharepoint.

Installation was long, but it went like a breeze, and I did have one funny moment when this appeared:

Take a close look, it says the file should be less than 1 mb, but it was well over 6 mb and growing. Thanks Microsoft.

Now on to installing Silverlight and the MapIt Demo.