Monday, November 1, 2010

All about ASP.NET Inline Server Tags <%, <%# etc

<% %> An embedded code block is server code that executes during the page's render phase. The code in the block can execute programming statements and call functions in the current page class. http://msdn2.microsoft.com/en-gb/library/ms178135(vs.80).aspx

<%= %> most useful for displaying single pieces of information.
The Date is now <%= DateTime.Now.ToShortDateString() %>
The value of string1 is <%= string1 %>
http://msdn2.microsoft.com/en-us/library/6dwsdcf5(VS.71).aspx

<%# %> Data Binding Expression Syntax. http://msdn2.microsoft.com/en-us/library/bda9bbfx.aspx

<%$ %> ASP.NET Expression. http://msdn2.microsoft.com/en-us/library/d5bd1tad.aspx

<%@ %> Directive Syntax. http://msdn2.microsoft.com/en-us/library/xz702w3e(VS.80).aspx

<%-- --%> Server-Side Comments. http://msdn2.microsoft.com/en-US/library/4acf8afk.aspx


This is NOT possible; using server tags inside of control properties

or this(using the quotes)
/>

To be able to use inline tags in the properties, you have to write Expression Builders:
http://weblogs.asp.net/infinitiesloop/archive/2006/08/09/The-CodeExpressionBuilder.aspx

Very Detailed description of the tags:
http://weblogs.asp.net/ahmedmoosa/archive/2010/10/06/embedded-code-and-inline-server-tags.aspx

one more link:
http://naspinski.net/post/inline-aspnet-tags-sorting-them-all-out-(3c25242c-3c253d2c-3c252c-3c252c-etc).aspx

Thursday, October 28, 2010

Netvibes Platform(PHP + MooTools)

Netvibes is one the leading widget and homepage website. I was curious as to what are the frameworks they use; and found out they use: PHP + MooTools; I got it from their page source. The home page doesn’t have the php extension, but some other parts of their site, have it: http://about.netvibes.com/jobs.php and http://business.netvibes.com/premium-dashboard.php

 

 

Check out their job posting below.

 

PHP/JavaScript developer:

Netvibes is recruiting a senior web developer to join its "start page" development team and ensure rising http://www.netvibes.com/ site supports your areas of expertise:

•PHP 5 oriented object

•Standards Web (HTML, CSS, JavaScript, DOM, Ajax)

•Frameworks PHP (like Zend Framework)

•Frameworks JavaScript (such as prototype, jQuery MooTools)

You are curious and motivated, intervening inter alia on: •Mise implemented new features to the site

•Assistance in feasibility studies

•Scalability, code refactoring and caching data (memcached, APC)

•Work in client projects (such as orange, Sage, Ogilvy, Advertising Research Foundation, Numericable, Figaro, Les Echos)

A real experience in web development (minimum 2 years) and a keen interest in the following topics will be an asset: (REST) web •APIs &amp; protocols of web authentication (OpenID, oAuth…)

•Connaissance versioning (such as subversion, Git) tools

•Technologies XML (RSS, Atom)

•Web services with their API (Facebook, Twitter, LinkedIn, MySpace...)

Position based in Paris, France

Contract: Commission

Workplace English/French

 


**********************  IMPORTANT--PLEASE READ  ************************
This electronic message, including its attachments, is COMPANY CONFIDENTIAL
and may contain PROPRIETARY or LEGALLY PRIVILEGED information.  If you are
not the intended recipient, you are hereby notified that any use, disclosure,
copying, or distribution of this message or any of the information included
in it is unauthorized and strictly prohibited.  If you have received this
message in error, please immediately notify the sender by reply e-mail and
permanently delete this message and its attachments, along with any copies
thereof. Thank you.
************************************************************************

Wednesday, October 20, 2010

New SharePoint Resource Videos for Clients

From Mike Gannotti:

 

I have had two requests from a number of clients that I have started delivering to the web for general client access/re-use. The first came by way of last weeks Coffee Talk show. "Mike, I met you at ShareFest2010 Philly..I need to somehow sell the value of mysites on MOSS and upgrading to 2010 to mngmt..advice?"  [*ShareFest is the annual conference for clinical life science companies that I keynoted last year]. The other is one I have received from three separate clients in last month around building Knowledge Centers. I have uploaded the following for access via the links below. They will also be uploaded to http://www.seproductivity.com shortly where clients can also download them. Both address baseline capabilities that can help drive SharePoint deployment thereby providing a hedge against Google and other compete platforms.

·         Video: The Case for SharePoint MySites

·         Video: Building Enterprise Knowledge Centers 1 of 6

·         Video: Building Enterprise Knowledge Centers 2 of 6

For those clients who may have questions around MySites we will also be presenting this topic live as a part of this week’s Coffee Talk at 9am here http://www.seproductivity.com/Pages/Coffee-Talk.aspx

 


**********************  IMPORTANT--PLEASE READ  ************************
This electronic message, including its attachments, is COMPANY CONFIDENTIAL
and may contain PROPRIETARY or LEGALLY PRIVILEGED information.  If you are
not the intended recipient, you are hereby notified that any use, disclosure,
copying, or distribution of this message or any of the information included
in it is unauthorized and strictly prohibited.  If you have received this
message in error, please immediately notify the sender by reply e-mail and
permanently delete this message and its attachments, along with any copies
thereof. Thank you.
************************************************************************

How to Compare Software Products?

As a SharePoint Specialist,  I am frequently asked to compare products, e.g: SharePoint Vs. Documentum or SharePoint Vs. OpenText Livelink or between Workflow Tools,  When my customers are comparing applications, I recommend that they DO NOT do a direct features comparison. Features comparisons can take a substantial amount of time and provide very little information about each product’s suitability to the task, which is what the customer really needs.

Instead, I recommend that the customer put some time into generating a list (10-20) of use cases or usage scenarios that they need a product to enable. Once the customer has the list, the customer can now do a comparison between the products in the context of the use cases. This method provides a good way to see which product features are actually relevant to the customer’s needs and which features, while sounding good, are just fluff.

 

Once the customer has the product comparison in the context of the use cases (the functional comparison), the customer then needs to do a non-functional comparison between the products. The goal of the non-functional comparison is to determine the organizational impact of each product. For example,
* How does each product handle scaling, load balancing, fail-over?
* What backup / recovery models does each product support?
* How does each product handle security and identity management?
* To what extent does each product integrate with and extend the customer’s existing infrastructure (on-premises or hosted)?
* What resources (human and non-human) does the sustainment team for each product consist of?
* What are the associated costs of each product, both up-front and ongoing?

 

Combining the functional and non-functional comparisons of each product allows the customer to ultimately reach a value comparison between each product. The value comparison should be the determining factor in deciding one product vs. another.

 


**********************  IMPORTANT--PLEASE READ  ************************
This electronic message, including its attachments, is COMPANY CONFIDENTIAL
and may contain PROPRIETARY or LEGALLY PRIVILEGED information.  If you are
not the intended recipient, you are hereby notified that any use, disclosure,
copying, or distribution of this message or any of the information included
in it is unauthorized and strictly prohibited.  If you have received this
message in error, please immediately notify the sender by reply e-mail and
permanently delete this message and its attachments, along with any copies
thereof. Thank you.
************************************************************************

Monday, October 18, 2010

Farm Unavailable and incorrect credentials

I had a harrowing day at work; my password keeps getting locked everytime I do a SharePoint deployment and I had to do multiple deployments using stsadm commands. I had to change my password this morning when my password expired.

I error I was getting was: "The farm is unavailable" and in the Application event log: "Cannot generate SSPI context."

I figured, that the WFE was trying to log onto the SharePoint Database server and it wasn't able to do that. Almost all of the STSADM commands have to access the content database server. But I was lost for quite some time since I logged onto the WFE with my newer credentials and not sure where the older creds are picked up.

What I finally found out was one of the application pool running a SharePoint webapplication was using my credential as the identity account(where the password is not changed). When the stsadm command was running it will use the app pool account, so its trying to use the wrong crentials and after three retries the account is locked. It is really a bad practice to have an application pool running a personal account than a service account. I paid a price of two to three hours for this.

Wednesday, September 22, 2010

RE: Secure Token Service Basics

Just what is an STS anyway:

A Security Token Service (STS) is the plumbing that builds, signs, and issues security tokens using the interoperable protocols.

 

Difference between Active STS and Passive STS:

 

Active STS mode

Passive STS mode

Definition(sort of)

In Active Federation your Relying Party (RP) has its login window (web page) and asks the STS for security token. "Active" to anything capable of using WS-Trust which is the protocol you use to obtain a token from an STS.

Passive Federation is when Relying Party (RP) does not have a login page and redirected to the login page located on STS. Since Web browsers cannot directly make SOAP calls they dumbly redirect to an STS and get the tokens.

Examples

Web Services/WCF

web applications(ASP.NET)

Hosting

Self-hosted / IIS

IIS/or any web server.

What protocol is involved?

WS-Trust protocol

WS-Federation passive protocol.

 

The lack of SOAP capabilities forced some creative solution for "emulating" WS-Trust on top of GET, POST and cookies: the result is the above mentioned dance of redirects, where the browser goes back & forth between previously established addresses on the resource and requestor domains and using cookies for communicating authentication information. THIS is what is meant by passive federation.

 

 

 

 

http://blogs.msdn.com/b/vbertocci/archive/2008/06/05/active-passive-and-passive-aggressive.aspx


**********************  IMPORTANT--PLEASE READ  ************************
This electronic message, including its attachments, is COMPANY CONFIDENTIAL
and may contain PROPRIETARY or LEGALLY PRIVILEGED information.  If you are
not the intended recipient, you are hereby notified that any use, disclosure,
copying, or distribution of this message or any of the information included
in it is unauthorized and strictly prohibited.  If you have received this
message in error, please immediately notify the sender by reply e-mail and
permanently delete this message and its attachments, along with any copies
thereof. Thank you.
************************************************************************

Tuesday, September 7, 2010

View PropertyBag using SharePoint Designer

The Property Bag Settings can store any metadata as Key-Value pairs such as connection strings, server names, file paths, and other miscellaneous settings needed by your SharePoint application.

In SharePoint Designer: To view the property bag. Go to Site -> Site Settings. Then click on the Parameters tab (not sure why they didn't just call it Property Bag). On this tab, you can see the values of all of your custom property bag values (it doesn't show anything built-in). If you need to, you can also modify and remove values from the property bag here. Hopefully this tip is useful sometime in the future when you need to check the values of your property bag. It sure beats the alternative of writing code to display it or firing up the debugger.

There is also a CodePlex project that adds a page in central admin to set the property bag at various levels(server,farm, webapp, site collection)
http://pbs.codeplex.com/
This one for SP2010:
http://pbs2010.codeplex.com/

Thursday, September 2, 2010

Cancel a blocked SharePoint Jobs

If a SharePoint solution deployment fails, yet the timer job is created and not running, you will be unable to redeploy or retract the solution. The retract / deploy buttons will not be present in Central Admin and stsadm will declare that a "deployment or retraction is already under way for the solution". You can find yourself in this state if the “Windows SharePoint Services Administration” service is stopped when you first attempt to deploy, but even after you realise your mistake and start that service, the solution deployment is still stuck.
The answer is hidden in that long list of stsadm operations:
use the stsadm -o enumdeployments to get a list of running jobs and the id's and then use the
stsadm –o canceldeployment –id

This command will cancel the timer job that is meant to deploy the solution. Once it has been cleared, you can deploy successfully. Obtain the id parameter from the url to the appropriate deployment timer job in the Operations -> Timer Job Definitions page

Monday, July 19, 2010

Get the List of users in an AD group

1.       First get the AD path of the object you are trying to the members:

dsquery * -filter (cn=WWAPP-A-CPAAZDashboard)

You can even do like this: dsquery * -filter (userPrincipalName=user123*) or dsquery * -filter (cn=computername)

 

2.       Use the dsget and pass in the path:

dsget group "CN=WWAPP-A-CPAAZDashboard,OU=Groups,OU=WWCRO,OU=WorldWide,DC= companyname,DC=net" -members

3.       Now you can pipe the result of this command to another dsget to get the other AD attributes; Final command:

dsget group "CN=WWAPP-A-CPAAZDashboard,OU=Groups,OU=WWCRO,OU=WorldWide,DC=companyname,DC=net" -members | dsget user -samid –display

 **********************  IMPORTANT--PLEASE READ  ************************ This electronic message, including its attachments, is COMPANY CONFIDENTIAL and may contain PROPRIETARY or LEGALLY PRIVILEGED information.  If you are  not the intended recipient, you are hereby notified that any use, disclosure, copying, or distribution of this message or any of the information included in it is unauthorized and strictly prohibited.  If you have received this message in error, please immediately notify the sender by reply e-mail and permanently delete this message and its attachments, along with any copies thereof. Thank you.  ************************************************************************  

Tuesday, April 27, 2010

Making SharePoint Offline Solutions(during Site Maintenance)

ASP.NET 2.0 introduced the ability to take an application offline by placing a html file named app_offline.htm at the root of the web application. When this file is present, all requests are routed to the static html page. SharePoint Offline extends this ASP.NEt 2.0 feature to SharePoint, and enables you to schedule when an application will be online/offline as well as the ability to set a custom offline message for each web application.

Thursday, April 22, 2010

SharePoint feature activation problem.

If you are one of those who are having problems with feature activation even when you made sure that the dll is in the GAC and everything is looks good while SharePoint gives the following error:

Failed to create feature receiver object from assembly "xyzzyFeatureReceiver_0", type "Conchango.xyzzyFeatureReceiver" for feature b2cb42e3-4f0a-4380-aaba-1ef9cd526f20: System.ArgumentNullException: Value cannot be null.
Parameter name: type
at System.Activator.CreateInstance(Type type, Boolean nonPublic)
at System.Activator.CreateInstance(Type type)
at Microsoft.SharePoint.Administration.SPFeatureDefinition.get_ReceiverObject()

In my case the feature activation works fine in the Test environment but not on the Dev Environment.

I don't think its a true statement: "Your feature and it's feature receiver must have the same root namespace or the solution will not deploy."

In my application design, I have a feature receiver and the feature in separate namespaces and it still works.

Solution: It worked when I use the -force option while activating the feature.

STSADM -o activatefeature -n Quintiles.SDMConfigChanges -url http://entportdlb.inet.quintiles.com/SDMMapping -force

Saving an existing word document to Sharepoint

Solution to the following problems:

"while i am trying to save the document using save as dialog box,unable to save it to document library.but instead it is getting saved under my documents folder"

"UNC Path of SharePoint Document library not valid"

"We have a user that is having issues with word documents in document
libraries. When she opens a Word Document on SharePoint site and makes
changes to it and then wants to save it back to SharePoint document library,
she is getting prompted for "MyDocuments" on her personal C drive instead of
being provided the path to the SharePoint document library. The user has
Windows XP SP2 and Office 2003 SP2 installed on her machine. She has also
added the Sharepoint site as a trusted site to IE."

The Solution:
•On Windows Server 2003, set the WebClient service startup to automatic, then start the service. You may need to reboot the server for this to fully take effect.

•On Windows Server 2008, install the Desktop Experience feature, then restart the server.

Problem:
"The Folder is no longer available. The web server is busy. Please try again later."
Solution:
Issue turned out to be the ISA server - if you ensure that your Sharepoint Site is excluded from the ISA, you should find the issue disappears!
The issue could also with users using VPN.

Friday, March 26, 2010

Ping + Kerberos + SharePoint

Ping Basics: IdP, SP, adapters
http://www.pingidentity.com/tech-answers/integration/

Ping + Citrix Docs:
http://www.pingidentity.com/support-and-downloads/product-documentation/citrix-integration-kit/2-0/loader.cfm?csModule=security/getfile&pageid=5900

Ping + SharePoint
http://www.pingidentity.com/support-and-downloads/product-documentation/iis-integration-kit/2-2/loader.cfm?csModule=security/getfile&pageid=5917

Use Impersonation and Delegation
http://msdn.microsoft.com/en-us/library/ms998351.aspx

Delegation of authentication

In Windows, a server can be marked as “trusted for delegation.” This means a server can authenticate to services as if it were a user. The services cannot tell that the request is being made by a server rather than directly by a user.

There are two types of delegation:

Unconstrained delegation: If you select the Trust this computer for delegation to any service (Kerberos Only) check box, the server can access any other service as the user as long as the user authenticated to it using Kerberos.
Note: This setting does not work with ADFS deployments.

Constrained delegation: If you select the Trust this computer to specified services only check box, the server can access only certain services as the user.

http://support.citrix.com/article/ctx110784
The setup for Citrix for Ping must involve Kerberos and is similar to setup for SharePoint front endservers and sql server.

Kerberos Issues:
http://support.microsoft.com/kb/907272

Thursday, January 21, 2010

Page Viewer Web Part with 100% height for the IFrame

In nutshell, how to display a Page Viewer Web Part with 100% height of the available screen estate.


http://blogs.msdn.com/malag/archive/2008/09/15/story-of-a-mischievous-page-viewer-web-part.aspx


<script language="javascript">
var a = MSO_ContentTable.getElementsByTagName("table");
MSO_ContentTable.setAttribute("height","100%");
for(i=0;i<a.length;i++)
{
a[i].setAttribute("height","100%");
}
var z = document.getElementsByTagName("div");
for(i=0;i<z.length;i++)
{
if(z[i].id.indexOf("WebPartWPQ",0) >=0 )
{
if(z[i].hasChildNodes())
{
if(z[i].firstChild.nodeName.toUpperCase() == "IFRAME")
{
z[i].firstChild.setAttribute("height","100%");
}
}
}
}</script>

Thursday, January 7, 2010

Cost of Maintaining an Employee: FICA and Unemployment taxes.

The Cost of maintaining an employee:
FICA:
The FICA on an Employee is: 7.65%

UnEmployment:
The Texas unemployment rate is 2.7% of the first $9000, this is the max per year.
The Federal unemployment amount is : $56/yr