Cobranding-Related Problems
Cobranding-Related Problems
When you register your site as a Microsoft® .NET Passport participating site, you provide a cobranding template file location. The file can be text only, JavaScript, an ISAPI extension, Active Server Pages (ASP) or common gateway interface (CGI) code, or anything that produces a simple JavaScript file that goes to a given browser client. A JavaScript file is required in order to accommodate most of the targeted browsers. The file should output a range of string cobranding variables with global scope.
General Cobranding Troubleshooting Tips
In order to customize the cobranding experience for your .NET Passport users, your site must be fully registered. If you need to troubleshoot .NET Passport single sign-in (SSI) cobranding template issues, begin by verifying information that you provided when registering your site and then verify that the cobranding template file was constructed correctly. The following questions and tips will help:
- Is your site fully registered as a .NET Passport participating site?
- On requests to the .NET Passport network, are you passing the Site ID that you were given when you registered your site?
- Did you supply the file location for a JavaScript cobranding template file (CoBrandURL) when your site was registered?
- Does your cobranding template output create the correct cobranding variables at a global scope?
- When assigning string values to your cobranding variables in JavaScript, single quotes must be used to enclose the string, rather than double quotes, to avoid problems when writing the strings to the .NET Passport network pages. In general, make sure that your quotes nest and balance.
- HTML tags are allowed in the CBSigninTxt1 variable, but are not recommended due to size restrictions. The entire string should be less than 200 characters long, including the tags themselves; characters beyond the 200-character limit will be truncated and this may cause imbalance of tags.
- Test any HTML tags provided as cobranding values for cross-browser issues before using them in your cobranding template. If you break cobranding, you may be preventing your users from signing in to your site.
- Verify that your site does not return <SCRIPT> tags in your cobranding template output. Cobranding is already enclosed by network-generated <SCRIPT> tags. Inserting another level of script will cause namespace and execution problems.
How can I troubleshoot context-sensitive cobranding?
Troubleshooting context-sensitive cobranding techniques is beyond the scope of this document but some general troubleshooting tips are listed below. You can also review the cobranding documentation for further information about context-sensitive cobranding.
- Verify that calls to the AuthURL2 and LogoTag2 methods of the Passport Manager object include the optional coBrandArgs parameters. This is how context is passed to your cobranding template's query string.
- Most .NET Passport pages inform the participating site's <CobrandURL> what the user is being shown through the use of two query string parameters: PP_Service and PP_Page.
- Make certain that the cobranding template you have written will accept the GET query string and return different cobranding information as JavaScript variables through branching based on values passed with the coBrandArgs parameter.
- Verify that coBrandArgs query string variables are reasonably short.
- Make sure that coBrandArgs are URL-encoded.
- Work backwards: what happens if no coBrandArgs is specified? Does the cobranding template give the expected results?
- Hit your cobranding template URL directly using a browser rather than relying on the network pages to load them. Try this with different query string values that you expect your file to handle and save the results as text files. Make sure the resulting text files use valid JavaScript syntax and would not produce syntax errors if given verbatim as a <script SRC>.
How do I troubleshoot cascading style sheet cobranding?
Troubleshooting cascading style sheet cobranding features is relatively simple. When you begin troubleshooting, first make sure that style sheets are supported in the browser that your user is using. Some targeted browsers do not support all aspects of style sheet cobranding.
If you still have not solved your problem, review the following tips:
- Make sure that your cascading style sheet is at the URL specified by the CoBrandCSSURL that you provided at registration time.
- For a list of classes and their descriptions, see .NET Passport Cobranding Style Sheets.
- Many sites that use style sheets also "sniff" for browser capability. If browser-sniffing capability is required, build the sniffing code into the CoBrandCSSURL file as a script, so that different style sheet-formatted text is returned for the style sheet based on the result of the sniffing. This requires that the CoBrandCSSURL actually point to an ASP file or an equivalent server-side solution rather than to a fixed, text-only .css file.
- Debugging style sheets that check for the lid and cb parameters being passed is somewhat more complex. For more information, see Query Strings on the Style Sheet URL.
How do I get a new or default .NET Passport style sheet?
To assure that you are getting the latest version of the style sheet, it is recommended that you copy it directly from the .NET Passport servers.
On computers running operating systems other than Windows XP
On a computer running an operating system other than Microsoft® Windows® XP, you can obtain a default .NET Passport style sheet by directing your browser to any .NET Passport Sign-in page (for example, the page pointed to by one of your sign-in tags as produced by the LogoTag2 method). View the source on that page and find the last <LINK REL="stylesheet"> tag listed. Load that URL directly in your browser. Depending on your system settings, you will be prompted either to save or view the style sheet (.css) file. Save the style sheet as a file on your computer's hard disk.
Note This solution is not currently available to servers running Windows XP.
The .NET Passport Sign-in page is displaying unintended cobranding information.
Cobranding is displayed on the .NET Passport network pages based on the Site ID passed with requests. This Site ID is passed to the .NET Passport Login server on the URL query string. If you have not registered your site or you have not properly configured the Site ID using the Passport Manager Administration utility, a Site ID of 1 will be passed to the network pages. The cobranding information that matches this Site ID is the default sample site cobranding. You must register your site and enter the Site ID provided at registration in the Passport Manager Administration utility's Site ID field for users to see the pages using your site's cobranding information. If you have just changed your Site ID, you may need to stop and start your servers for the new Site ID to take effect.
See Also
.NET Passport Cobranding Overview | Context-Sensitive Cobranding | Passport Manager Administration Utility