Friday, November 27, 2009

Anonymous access to forms - the iTFA way

There are times when your anonymous user might need to submit data to you in SharePoint. You already know the best way to create forms is ... ta-daaa ... iTechnology Forms Accelerator (I know, I know ... shame on me for the free self-compliments ...).


After the shameless self-advertising campaign you saw let's get our hands dirty; the step-by-step way:




1. IIS


Yes, you probably know this but in order to access anonymously *any* ASP.NET website, IIS needs to be configured. Here you can find how to do it with Windows Server 2003 and IIS 6. The key element to remember here is the IUSER_ComputerName account which is assigned to every anonymous visitor to your website which later on we will see how to use it in iTFA.


2. SharePoint Central Administration


Going down the drain - MOSS. Let's go to Central Administration, then Application Management and open up Authentication Providers. Here is the time to mention iTFA works best with Windows Authentication so lets enable anonymous access to the Windows membership provider.


3. SharePoint site


IIS set, provider set. Next level? Right - site. In the site where you host your iTFA-enabled forms in Site Actions menu open up Site settings and follow the Advanced permissions link. In the page's toolbar you will see Settings item and Anonymous Access subitem - click on it. Here you can enable anonymous access to the whole site or only to libraries and lists - your choice here!




4. iTFA Management site


So far, so good. 3 done, 2 to go. In order for iTFA to be sure that you are 100% percent aware which users have the required access level we have added user access functionality. You can see how to play with it by watching our short video here. Fast forward now and go to "itfa" management site in SharePoint and User Access configuration section there. Let's focus on anonymity now. Remember user IUSER_ComputerName from step 1? Here is why I have told you to keep it in mind! You need to add it to any of the 4 groups that you see in order your anonymous users to access iTFA forms. I wouldn't recommend adding this user to any other group than iTFA Users because you will be giving your anonymous guests way too much power and honestly speaking - they don't deserve it. ;-)


5. My iTFA-enabled list (document library)


Tired? Bored? Bear with me please, you are just few clicks away from having your perfectly anonymous guests access your forms!


I know the first thing you did was to watch our Hello World video (if you have missed it, you can watch it here) where you have iTFA enabled a custom list (btw the same way you do it for document library). Now let's get those anonymous users see your shiny-easy-to-use-5-minute-built new form.


Open up your list, go to Settings -> List Settings -> Permissions for this list. In the Settings menu item click on Anonymous Access. Now you get to choose what permissions your anonymous users will have - Add / Edit / Delete / View. View is selected by default but enabling any of the other options will change the list's View page with the required functionality. Let's check them all and rock on.


Here I need to mention that if you are in document library and all the other options are grayed out, there is a nice workaround to enable them. Take a look at the URL of this page you will notice that after the .aspx page there is a query "obj=%listidhere….." followed by "DOCLIB". If you change this last part of the URL from "DOCLIB" to "LIST", you will notice that you now have all of the option that you've been missing. Note that by changing the URL query in your browser you are not damaging your library in any way. You are just telling SharePoint to present you with the anonymous access settings available for a list. You can change the setting back to the default by deselecting the "Add, Edit & Delete" options.


6. Finish line


Finished! Yes, I know it took less than 5 minutes, just like with everything else you do with iTechnology Forms Accelerator... Peace of cake, huh?!
Read more on this article...
Bookmark and Share

Thursday, November 26, 2009

SharePoint Console Application Requirements

By Hristo Yankov

So you have written a Console application which is working with the SharePoint Object Model (API), but you get an error. Something similar to:
Cannot open database "WSS_Content_{GUID}" requested by the login. The login failed.
Login failed for user 'DOMAIN\User'.

Or (* see additional notes below!):
FileNotFoundException: The web application at http://some.site could not be found. Verify that you have typed the URL correctly. If the URL should be serving existing content, the system administrator may need to add a new request URL mapping to the intended application.


That's because there are a couple of security requirements you need to meet. Basically, the user who is running the console application needs to:
  • Be an Administrator on the computer he is running the app from (certainly, that would be the SharePoint server). Just add the user to the (Local) Administrators group on the machine.
  • Have sufficient rights within the SharePoint site. If you are doing some administrative tasks, you would want this user to be given "Full Control" (group).
  • Needs to have read/write permissions on the content database in the SQL server (or just make it db.owner). The database name is usually WSS_Content_{GUID}.
After you have given those rights to the console application executing user, it should run fine. And by the way, if you think you can avoid giving those permissions, by running the API calls within SPSecurity.RunWithElevatedPrivileges, you are wrong. The call itself, to SPSecurity.RunWithElevatedPrivileges would require them.

* Additional note about FileNotFound:
Although this is not covered by this article, there might be other reasons for this error. For example: Site collection not existing on this location or you need to add Alternate Access Mapping.

Well, I hope this helps someone out there,
Hristo Yankov
Read more on this article...
Bookmark and Share

Wednesday, November 18, 2009

jQuery in SharePoint

By Hristo Yankov





There are rumors jQuery might be included as part of SharePoint 2010. In an anticipation for that, today's article aims to show what the integration between SharePoint 2007 and jQuery looks like, how to use it and what are the benefits.

So what is jQuery?
jQuery is a lightweight JavaScript library that emphasizes interaction between JavaScript and HTML. It was released in January 2006 at BarCamp NYC by John Resig. jQuery is free, open source software Dual-licensed under the MIT License and the GNU General Public License. Microsoft and Nokia have announced plans to bundle jQuery on their platforms, Microsoft adopting it initially within Visual Studio for use within Microsoft's ASP.NET AJAX framework and ASP.NET MVC Framework whilst Nokia will integrate it into their Web Run-Time platform.

Simply put, it is a high performance rapid development, AJAX-enabled library on top of JavaScript.


API
There are a lot of articles and tutorials out there, on how to use jQuery in general. Here is the most essential documentation you will need - the jQuery API.

SharePoint integration
Integration between jQuery and SharePoint boils down to finding a smart way to get a jQuery reference in your pages.

Basically you can do this 'manually', which is well described here or you can use an automated integration solution (see below).

The manual approach essentially consists of two steps:
1) Deploying the libraries (js) to a location which can be accessed by the pages - that would be the LAYOUTS folder in the 12 hive
2) Loading the libraries on the pages - by modifying the master page, load the library specifically in the page you want to use it or other... It is all well described in the posted article.

The automated solution is a better one. You can get "SmartTools jQueryLoader for SharePoint" which does the integration for you. There is a good article which walks you through the installation process, so we are not going to that here. Make sure you watch the video, though.



Just try it out

If you just want to quickly try the magic of jQuery in SharePoint out, without bothering with the full integration you can do what is described here. The example in this article uses jQuery library which is hosted on Google Code (rather than in your 12 hive) and it dynamically queries the SharePoint web service to retrieve your current tasks, then visualizes them on the page. No need to develop a web part, it is just as simple as that!

You should also check this out, although for some reason I couldn't get it to work. Basically this is supposed to let you test any jQuery code, from a small 'editor' on your home page.


Benefits
So what are the benefits of using jQuery in SharePoint?

AJAX
Well, obviously it adds AJAX functionality to your SharePoint web application. You can now retrieve and visualize data asynchronously, without putting any load on the SharePoint server. It also allows you to create more appealing and faster UI.

Page elements control and flexibility
Additionally, SharePoint allows you to change content structure for subsites, lists, libraries, views, columns, content types and the Web parts, but sometimes that's not enough. Sometimes developers/designers or users need to make changes to the functionality and appearance of a SharePoint site in a way that is not allowed by the IT department. Since SharePoint Designer is usually restricted, we need an alternative way. That would be jQuery. Just to give you a concrete example of such situation, here is a guy who had to make the corners of the quick launch menu rounded.

jQuery saves development time
jQuery simplifies the way you traverse HTML documents, handle events, perform animations, and add Ajax interactions to your web pages. To summarize it one sentence only: couple of lines in jQuery allow you to do better what you could do with over 20 lines of JavaScript.

Many other...
  • You don't have to check for null objects
  • CSS3 compliant and has a great CSS selector integration
  • Huge community which supports it. Many tutorials out there...
  • Simple and fast development
  • Lightweight!
  • etc...

Performance
jQuery 1.3 is fast. As in the "fastest JS framework out there". Here are some nice tips on how to write a fast jQuery code.


Debugging jQuery in SharePoint
FireBug is the preferred way to debug jQuery (and JavaScript in general). Here is a nice article which goes into details.


Examples
http://www.endusersharepoint.com/ - THE "jQuery & SharePoint" website.
jQuery sparklines
Showing random images in SharePoint 2007 using jQuery
Highlight SharePoint List rows conditionally
Paging large content in SharePoint using jQuery
Many other...


Read more on this article...
Bookmark and Share

Saturday, November 14, 2009

SPUG Orange County Nov 18: Forms in SharePoint

By Dmitry Ivahno

If you are in Orange County, CA or nearby, please don't miss an opportunity to visit SharePoint User Group meeting next Wednesday. The topic: "Forms in SharePoint".

This session will be of interest to both InfoPath and iTechnology forms users and designers and will help them make educated decisions when deciding which product to use. Also part of the presentation will display Forms integration with K2 workflow.

More information about iTechnology Forms Accelerator can be found here:
http://blog.myitechnology.com/2009/11/introducing-itechnology-forms.html

To register for SPUG Orange County meeting please visit its website:
http://www.officezealot.com/GroupZ/spug_ca_oc/Pages/default.aspx

Event details:
Location: QuickStart, 16815 Von Karman Ave, Suite 100, Irvine, CA 92606
Time: 11/18/2009 6:30 PM to 8:30 PM PST

Read more on this article...
Bookmark and Share

Monday, November 2, 2009

Introducing iTechnology Forms Accelerator 2

By Dmitry Ivahno

According to Gartner, 50% of the enterprises they surveyed use MOSS 2007 or WSS 3. Today millions of people have relied on Microsoft SharePoint technology for collaboration, records management, enterprise search, or other integration functions. We all know that SharePoint is both an ECM product suite and a great framework for building customized solutions. However, there's always been one problem: Once you're on the path of tailoring SharePoint to your business needs, customization of SharePoint just isn't that easy to use for non-IT professionals. Whenever you need to create a business process SharePoint Designer workflow is very limited or designed for software developers; Or you may decide to have electronic forms and use InfoPath, which is a great product. However, in case of Microsoft InfoPath, it has too many advanced features and over-complicated designer that put you in a risk of breaking a working solution. In general if you start customizing SharePoint, you're on your own.

Today we're excited to announce the next step for iTechnology Forms Accelerator: version 2 for Window SharePoint Services 3 and Microsoft Office SharePoint Server 2007.

This new version comes with everything you'd expect to find in a forms engine solution, like web-based designer, strict version control and one-click publishing process. But unlike most forms solutions, iTechnology Forms Accelerator was built based on real-life experiences we had with real clients – it is made for business users and it resolves many issues you may experience with other products.

Here are seven features that are possible because iTechnology Forms Accelerator V2 is tightly integrated with Windows SharePoint Services:

Web-based designer
When you use iTechnology Forms Designer, you browser automatically loads a Silverlight-based component. Using Silverlight 3 features makes designing forms easier. It also allows centralized no hassle deployment.

Version Control
If you work with InfoPath you probably face issues with versioning: InfoPath form templates are not versioned and you have to rely on third-party Source Version Control systems; and once InfoPath form is published to the SharePoint it starts auto-upgrade of existing instances of the electronic forms. With iTechnology Forms Accelerator you don’t have to worry about losing your changes. Each time you make a significant change a new version of the form is saved. You always can go back and load previous version. Also, once you publish your form to the list/document library, it won’t affect already created instances. Think of it as paper-based form with revision number. Just because there is a new revision you do not necessary want to “upgrade” previous filled in forms.

Easy Publishing
iTechnology Forms Accelerator integrates with any type of SharePoint document library or custom list. You start iTechnology Forms Designer from the SharePoint list you want to integrate with. When you think you are ready to publish the form you just click menu button “Publish” and publishing is done automatically. Now you don’t have to remember SharePoint URLs, manage credentials in corporate network, or worry what environment you are working now.

Windows SharePoint Services Support (WSS 3)
For those times when you do not have enterprise licenses of MOSS, iTechnology Forms Accelerator is a great alternative to InfoPath Form Services. iTechnology Forms Accelerator works with Windows SharePoint Services as well as with any MOSS editions.

Concurrent Form Design

Designing large forms with tens of Perspectives (we use term 'Perspective' which is analogous to InfoPath term 'View') can be very time consuming if you work with a form exclusively. iTechnology Forms Accelerator liberates you: now you can share form design time with other users. In contrast to other software products, iTechnology Forms Designer allows “locking” and “versioning” on smaller elements of the form.


Standard Browser Support
If you want to display your electronic forms in browsers such as FireFox, Safari, Chrome, or Internet Explorer, then iTechnology Forms Accelerator is for you. We do not have limitations on displaying web content in different browsers. It works with a simple Text Control as well as with a complex repeatable data grid with subsection.


Easy to Use

The ultimate idea behind iTechnology Forms Accelerator is to empower end-users of SharePoint (both business users and support IT personnel). We see an opportunity and challenge to make process of authoring and managing forms easy and intuitive. Here at iTechnology we spent thousands of hours designing software experiences we feel proud to share with you.

iTechnology Forms Accelerator has many other useful and important features. Here are a few:

  • Management Site. SharePoint administrators have access to many configuration settings which helps administering iTechnology Forms Accelerator in an easy manner. It also provides a comprehensive view of underlying data;
  • Workflow Integration. We integrate with all SharePoint-based workflows;
  • Straightforward data reporting. Non-SharePoint data is stored in SQL database which allows uncomplicated data retrieval and processing;
  • Embedded Rules Editor. Configure business rules instead of coding them. Test Rule allows validation of logic during the design time;
  • and many other great features.


Since there's nothing quite like seeing the product in action, we made this video to demonstrate a simple “Hello World” example:



iTechnology Forms Accelerator is free. There are no paid versions. There are no trial periods. Our clients needed this product and now we share this product with them and with you. We are being constantly asked “What is your business model? Why it is for free?”. We are proud to answer: “We want to help you. At in the same time we want people to know our company.” Please give it a try and see if you and your business will benefit with iTechnology Forms Accelerator. Of course, we provide a commercial support if your company needs it (check Technical Support page for more details).

Check out the iTechnology Forms Accelerator to learn more and browse a gallery of product screenshots.

Thank you and we always welcome comments.



Read more on this article...
Bookmark and Share