tag:blogger.com,1999:blog-63608325515207262542024-03-14T00:39:50.549-07:00Rhythmic CodingA random burst of technology notesUnknownnoreply@blogger.comBlogger77125tag:blogger.com,1999:blog-6360832551520726254.post-21800366094963361792012-06-26T03:33:00.002-07:002012-06-26T03:33:34.172-07:00Error occurred in deployment step 'Add Solution': Property 'SiteUrl' contains an invalid URLYou encounter this error when trying to deploy a BCS solution package in a different environment than where it was developed and tested.<br />
Cause: in the feature xml there is this property which is set with your previous site url and it will fail in the new environment.<br />
<br />
<blockquote class="tr_bq">
Resolution</blockquote>
Know where you have to deploy the solution, get the new site url and update the feature xml and build new solution package and use it in the new environment.Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-6360832551520726254.post-36498336779857335742011-07-19T13:26:00.000-07:002011-07-19T13:26:04.706-07:00acer iconia A500 honeycomb update 3.1 for India available now!hey all!<br />
I am happy to say that I finally got honeycomb 3.1 update today via ota.<br />
Actually i got the message yesterday about the update via popup notification but tho I repeteadly tried installing the update, it just downloaded itself and was not doing anything.<br />
<br />
the update was quite huge with size of 377.04mb and the number was 4.010.04<br />
now understand the trouble of just downloading it over wifi 4 times without much success and that too in India where you are lucky if you get good speed even if you have a broadband!<br />
<br />
anyways i was able to install it finally over the fifth try and it installed properly!<br />
there are few applications ans some other updates which i may post about later but then this is it.<br />
<br />
by the way this post is coming straight from my iconia A500 and I have just upgraded it to honeycomb 3.1!Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-6360832551520726254.post-17872330257507628272011-07-12T01:37:00.000-07:002011-07-12T01:37:41.735-07:00Office SharePoint Server Search service in stopping modeI got this error when I was trying to get a old system using MOSS 2007 to update. I restarted the 'Office SharePoint Server Search' service but it just froze on stopping mode and won't do anything.<br />
<br />
I searched online and most of the posts asked to restart the server, which I was not ready to do as it was a production environment.<br />
<br />
I got this nice work around and it worked for me:<br />
<br />
The service is basically 'OSearch' so what I did was<br />
<br />
* Opened a command prompt on the server and type: tasklist /svc<br />
* From the list, check which one you need to close. I checked it was mssearch.exe for 'OSearch' . (remember there will be two mssearch.exe one for moss and wss I guess.)<br />
* Note down its process id<br />
* Run another command to kill that process from command line: taskkill /PID ABCD /F<br />
(where ABCD is your port number)<br />
<br />
Once this is done, run services.msc from run prompt and start your search service, it will not be in a hanged state anymore!Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-6360832551520726254.post-80749807954389314382011-07-08T03:40:00.000-07:002011-07-08T03:40:02.307-07:00Unable to upgrade SharePoint Products and Technologies because an upgrade is already in progress. Upgrade progress can be monitored using the Central Administration Web Application or by monitoring the upgrade log on server...I got this error while trying to upgrade a SharePoint server with WSS SP2.<br />
<br />
It was so that since the visual upgrade using configuration wizard failed, I had started the upgrade using stsadm command line. But that failed too. Then when I again tried the visual upgrade, it said that an upgrade is already in place hence it will not update. So I was in a fix like how to upgrade it then.<br />
<br />
<span class="Apple-style-span" style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px;">Unable to upgrade SharePoint Products and Technologies because an upgrade is already in progress. Upgrade progress can be monitored using the Central Administration Web Application or by monitoring the upgrade log on server...</span><br />
<span class="Apple-style-span" style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px;"><br />
</span><br />
<span class="Apple-style-span" style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px;">This link was of a great help, its a failsafe method (and only to be used if nothing else works) : <a href="http://64.4.11.252/en-us/library/cc288357(office.12).aspx">Microsoft Technet link</a></span><br />
<br />
What you have to do basically is fire this command up using stsadm:<br />
<br />
<blockquote>stsadm -o setproperty -pn command-line-upgrade-running -pv No</blockquote>What it does is basically sets a property to 'No' which will allow the visual Configuration Wizard to continue!Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-6360832551520726254.post-17008838225714529892011-03-22T23:16:00.000-07:002011-03-22T23:20:05.270-07:00GetCustomListTemplates returns 0 valuesOne of my colleague encountered this issue where he was trying to create list on feature activation based on a custom list template uploaded to the list template gallery.<br />
We tried different ways to check why the GetCustomListTemplates method of SPSite retunred empty values even if there are custom list templates uploaded to the gallery.<br />
<br />
It is because we didn't set the Version property while uploading the templates via Feature. SharePoint 2010 expects version to be '4' for the list template.<br />
So this did the trick for us:<br />
<br />
<br />
<br />
<br />
<?xml version="1.0" encoding="utf-8"?><br />
<Elements xmlns="http://schemas.microsoft.com/sharepoint/"><br />
<Module Name="TestModule1" Url="_catalogs/lt" List="114"><br />
<File Path="TestModule1\MyList1.stp" Url="MyList1.stp" Type="GhostableInLibrary" IgnoreIfAlreadyExists="FALSE" ><br />
<Property Name="Product Version" Value="4" /><br />
</File><br />
</Module><br />
</Elements><br />
<br />
<br />
<br />
<blockquote>Resolution: Setting the 'Product Version' property of File object in the elements xml file to value '4' allowed us to access that template via GetCustomListTemplates property of SPSite object in SharePoint 2010</blockquote>Unknownnoreply@blogger.com1tag:blogger.com,1999:blog-6360832551520726254.post-19954156020328949682011-02-20T08:30:00.000-08:002011-02-20T08:30:47.844-08:00The remote certificate is invalid according to the validation procedureWhen you get this error while trying to send email using gmail's account id and your own custom code, just paste below line before you call .Send method of the smtp client like this:<br />
<br />
<blockquote>ServicePointManager.ServerCertificateValidationCallback =<br />
delegate(object s, <br />
X509Certificate certificate, <br />
X509Chain chain, <br />
SslPolicyErrors sslPolicyErrors) { return true; };<br />
<br />
// write smtp client's .send here</blockquote><br />
Once you do this, you will see the error disappears!Unknownnoreply@blogger.com1tag:blogger.com,1999:blog-6360832551520726254.post-70730465794618265892011-02-20T05:37:00.000-08:002011-02-20T05:37:04.301-08:00How To Allow Anonymous Access on a SharePoint Application PageIf you want to allow anonymous access on a SharePoint application page, simply override this property and return true:<br />
<br />
<blockquote>protected override bool AllowAnonymousAccess<br />
{<br />
get<br />
{ <br />
return true;<br />
}<br />
}</blockquote><br />
Next time onwards you will be allowed to browse the page anonymously. This will be useful in sharing anonymous information with users. The best example would be to use a custom Sign/In page or something which you want unauthenticated users to access.Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-6360832551520726254.post-53646416883751518602011-01-11T10:25:00.000-08:002011-01-11T10:25:45.106-08:00The 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machineIf you happen to get this error when you are trying to import data from excel using a .net application , you need to install Microsoft Data Connectivity Components.<br />
<br />
Resolution:<br />
Install Microsoft Data Connectivity Components from <a href="http://www.microsoft.com/downloads/en/confirmation.aspx?familyId=7554f536-8c28-4598-9b72-ef94e038c891&displayLang=en">here</a>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-6360832551520726254.post-46120408423656873302011-01-11T10:22:00.000-08:002011-01-11T10:22:09.729-08:00External table is not in the expected formatI got this error while I was writing down a small utility to import data from excel. The error was in connection string which I used:<br />
<div>strdbConn = "Provider=Microsoft.Jet.OLEDB.<wbr></wbr>4.0;" + "Data Source=" +</div><div> strFilePath</div><div> + "; Jet OLEDB:Engine Type=5;"</div><div> + "Extended Properties=Excel 8.0;";</div><div> </div><div>Now I had windows 7 x64 bit and similarly Office 2010 professional plus and the above connection string didn't work.</div><div>Resolution: </div><div>Finally you need to use the following connection string in here:</div><div> </div><div><blockquote><div>strdbConn = "Provider=Microsoft.ACE.OLEDB.<wbr></wbr>12.0;Data Source=" </div><div><span style="white-space: pre-wrap;"> </span>+ strFilePath + </div><div><span style="white-space: pre-wrap;"> </span>";Extended Properties=Excel 12.0;";</div></blockquote><div> </div><div>And the error was resolved! </div></div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-6360832551520726254.post-48448081130133058662010-12-03T08:23:00.000-08:002010-12-03T08:23:50.363-08:00Unable to display this Web Part. To troubleshoot the problem, open this Web page in a Microsoft SharePoint Foundation-compatible HTML editor such as Microsoft SharePoint Designer. If the problem persists, contact your Web server administratorI got this error while working on a SharePoint 2010 - Business Connectivity Services Project. The full error read like:<br />
<br />
<blockquote>Unable to display this Web Part. To troubleshoot the problem, open this Web page in a Microsoft SharePoint Foundation-compatible HTML editor such as Microsoft SharePoint Designer. If the problem persists, contact your Web server administrator</blockquote><br />
It was so that there was mismatch between business data model and the entity defined therein the project.<br />
The resolution:<br />
<br />
<blockquote>MisMatch was there between the TypeDescriptors provided by you in the business data model entity's methods and the entity class file (.cs file).<br />
<br />
<div>Setting 'The Identifier represented by this TypeDescriptor' wherever applicable.</div><br />
<div>Also mark the identifier in the typedescriptor wherever it is encountered. Like you will be having two type descriptors customer_id and customer_name of which </div><div>customer_id might be identifier so set it up like that.</div></blockquote>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-6360832551520726254.post-73781186388807248222010-10-29T21:26:00.000-07:002010-10-29T21:35:43.475-07:00The list cannot be displayed in Datasheet view for one or more of the following reasonsThe full error popup reads like:<br />
<br />
<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="http://3.bp.blogspot.com/_z2gPWep6fqg/TMueENJsHBI/AAAAAAAAAO8/Mbv9jmjGnkY/s1600/list-cannot-be-displayed.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="200" nx="true" src="http://3.bp.blogspot.com/_z2gPWep6fqg/TMueENJsHBI/AAAAAAAAAO8/Mbv9jmjGnkY/s400/list-cannot-be-displayed.png" width="400" /></a></div><br />
The list cannot be displayed in Datasheet view for one or more of the following reasons<br />
<br />
- A datasheet component compatible with Microsoft SharePoint Foundation is not installed.<br />
- Your Web browser does not support ActiveX controls.<br />
- A component is not properly configured for 32-bit or 64-bit support.<br />
<br />
And if you've setup environment like me which has<br />
<br />
SharePoint 2010 , Office 2010 x64, SharePoint designer x64 then you are bound to get this error!<br />
<br />
The resolution<br />
<blockquote>In order to use the datasheet view, download this <a href="http://www.microsoft.com/downloads/en/details.aspx?familyid=7554F536-8C28-4598-9B72-EF94E038C891&displaylang=en">2007 Office System Driver: Data Connectivity Component</a> <br />
Once you set it up, reopen the internet explorer and edit in datasheet view!</blockquote>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-6360832551520726254.post-75048936650234395792010-10-16T07:30:00.000-07:002010-10-16T07:30:54.027-07:00Shared folder not visible in Virtual Box machineIf you find that your shared folder is not visible as a drive in your virtual box virtual machine, just fire off the following command inside the virtual machine after which your folder will be accessible along with your other driver:<br />
<br />
Assuming you have shared a folder called ABC.<br />
<br />
Open a command prompt in the virtual box machine and type in:<br />
<br />
<blockquote>net user z: \\vboxsvr\ABC</blockquote> And it will say "The command completed successfully" and you have your folder!Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-6360832551520726254.post-2517112826570881972010-10-15T11:44:00.000-07:002010-10-15T11:44:28.133-07:00How to encrypt connection string in web.configLets say you want to encrypt the connection string you stored in the '<connectionstring>' element in your ASP.NET website's web.config file.</connectionstring><br />
<blockquote>To encrypt the connection string, you have to use the 'aspnet_regiis' utility.</blockquote>Open visual studio command prompt and type in the following line (obviously you'll have to provide your website's path!) <br />
<br />
<blockquote>aspnet_regiis -pef "connectionStrings" "fully-qualified-path-to-website-folder"</blockquote>The above command will encrypt the web.config file at the location provided by you.<br />
<br />
Now what if you want to roll back and decrypt the connection ?<br />
Well then just open visual studio command prompt again and fire in this command:<br />
<br />
<blockquote> aspnet_regiis -pdf "connectionStrings" "fully-qualified-path-to-website-folder"</blockquote> Happy Coding!Unknownnoreply@blogger.com1tag:blogger.com,1999:blog-6360832551520726254.post-53758950873879563802010-10-11T11:08:00.000-07:002010-10-11T11:08:30.390-07:00How to debug filter link data in Performance Point ServerThis post shows how one can debug filter links with web page report in Performance Point Server 2007 with minimal coding: http://nickbarclay.blogspot.com/2008/02/debugging-filter-links-with-web-page.htmlUnknownnoreply@blogger.com0tag:blogger.com,1999:blog-6360832551520726254.post-71179243250260908172010-09-27T06:05:00.000-07:002010-09-27T06:05:02.062-07:00This page contains content or formatting that is not valid. You can find more information in the affected sectionsYou get this error when you are trying to update a SharePoint webpart tool part or something like that and you click on 'Publish' page button. This only happens if you have any <strong>Validation Controls</strong> on your webpart.<br />
<br />
Resolution: As you have validation controls on your webpart UI and you are not filling in anything, it is not letting your page to postback and you need to disable rendering the webpart while you are modifying the toolpart. You can do that by writing down code as below in your 'CreateChildControls method of webpart<br />
<br />
<blockquote>protected override void CreateChildControls()<br />
<br />
<br />
{ <br />
... <br />
WebPartManager wp = WebPartManager.GetCurrentWebPartManager(this.Page); <br />
if (wp.DisplayMode == WebPartManager.BrowseDisplayMode)<br />
<br />
<br />
{<br />
<br />
base.CreateChildControls(); <br />
//Render your code here <br />
} <br />
<br />
}</blockquote><br />
Once you do this, while you are editing the webpart (toolpart properties that is) your webpart won't load t he required field validators and you can safely publish the page with updated webpart propertiesUnknownnoreply@blogger.com0tag:blogger.com,1999:blog-6360832551520726254.post-19085552837862229772010-09-07T03:58:00.000-07:002010-09-07T03:58:47.446-07:00'~/Telerik.Web.UI.WebResource.axd' is missing in web.configYou might get this telerik exception while developing against software involving telerik rad controls in SharePoint 2010.<br />
<br />
Full exception reads like:<br />
<br />
<br />
<blockquote>Exception information: </blockquote><blockquote> Exception type: InvalidOperationException </blockquote><blockquote> Exception message: '~/Telerik.Web.UI.WebResource.axd' is missing in web.config. RadScriptManager requires a HttpHandler registration in web.config. Please, use the control Smart Tag to add the handler automatically, or see the help for more information: Controls > RadScriptManager </blockquote><div>Well, you need to do some entries for supporting telerik controls in SharePoint 2010 but I missed following entry, modifying web.config upon it resolved my issue:</div><div><br />
</div><div><div><system.webserver></system.webserver></div><div> <handlers></handlers></div><div> <add ="" path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource, Telerik.Web.UI, Version=2009.3.1314.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4" name="Telerik.Web.UI.WebResource" verb="*"></add></div><div><br />
</div><div>Please note there are few more entries you need to do inorder to support telerik controls in a custom aspx page under SharePoint 2010 ( you can safely ignore the MS Ajax related entries as 2010 already contains AJAX inbuilt)</div></div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-6360832551520726254.post-42129994326795665422010-09-01T22:02:00.001-07:002010-09-01T22:02:35.363-07:00How To: Programmatically add a List as a webpart in a SharePoint page in WSS 3.0This post explains exactly what you need to do if you want to add a particular list to a webpart page programatically: <br />
<br />
http://stackoverflow.com/questions/1588019/programmatically-insert-a-list-as-a-webpart-in-a-webpart-page-in-wss-3-0Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-6360832551520726254.post-62370375346132118262010-09-01T21:58:00.000-07:002010-09-01T21:58:37.771-07:00Set default page for SharePoint Publishing SiteJust follow the steps shown in the sample function in the post below to set default page from code<br />
<br />
http://chrisbarba.wordpress.com/2010/01/11/set-default-page-for-sharepoint-publishing-site/Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-6360832551520726254.post-87637366672101502762010-09-01T21:56:00.000-07:002010-09-01T21:56:06.727-07:00The type or namespace name 'Publishing' does not exist in the namespace 'Microsoft.SharePoint' (are you missing an assembly referenceThis error crops up if you try to use publishing assembly reference in your SharePoint 2010 projects using Visual Studio 2010.<br />
<br />
To resolve you have to do few steps mainly adding reference to System.Web.DataVisualization.dll .<br />
Perform all steps listed in this link and you should be good:<br />
<br />
http://social.technet.microsoft.com/Forums/en/sharepoint2010programming/thread/586e3c4e-5936-42f5-9752-e6ac8c92d4c0Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-6360832551520726254.post-66667808337167414712010-08-27T07:20:00.000-07:002010-08-27T07:20:27.449-07:00Empty SharePoint Recycle bin in one goIt happened that I had around thousands of items in sharepoint site recycle bin and deleting it with sharepoint default delete items button was simply not possible as it would take forever to delete all items.<br />
<br />
This nice little hack was very userful to me which deleted all items in a second!<br />
As mentioned in this post<br />
http://itfootprint.wordpress.com/2008/03/14/empty-sharepoint-user-recycle-bin/<br />
<br />
you just have to navigate to recycle bin page and type javascript:emptyItems();<br />
which will delete all items.Unknownnoreply@blogger.com7tag:blogger.com,1999:blog-6360832551520726254.post-5910211910372171762010-08-27T07:15:00.000-07:002010-08-27T07:15:59.506-07:00The Zone of the assembly that failed was: MyComputerIf you get this error while running any of your custom windows installer or exe files, make sure you unblock the file or package (even if it is a zip file) before you actually use it. By default windows blocks the files downloaded on the computer from internet, because of which security issues occurs. Unblocking the file will allow user to run the program normally.Unknownnoreply@blogger.com2tag:blogger.com,1999:blog-6360832551520726254.post-12660614089439096132010-08-27T05:44:00.001-07:002010-08-27T05:44:04.569-07:00HTML Form Hack for disable default button clickI had this requirement that IE by default selected a default button when it is not set by me and when I pressed enter in any of textboxes, the button's click event was triggered. To avoid that and as it is the default IE behaviour and if you don't use panels to set default buttons, here's a nice little html hack that you can do available on this page<br />
<br />
http://tapestryjava.blogspot.com/2005/06/html-form-trick.html<br />
<br />
<br />
<br />
What is to be done is basically just keeping a default button which does nothing before any other button. So that if by chance any user happens to press enter on your form text fields, this button will be clicked and no logic will be triggeredUnknownnoreply@blogger.com0tag:blogger.com,1999:blog-6360832551520726254.post-13386722312672044282010-08-09T22:10:00.000-07:002010-08-09T22:10:18.657-07:00How to get list of all stored procedures from SQL databaseIf you want to get list of all stored procedures from the database you are working on, just fire this query in one of the query window and all procedure names will be returned.<br />
<br />
<blockquote>SELECT DISTINCT object_name(id) from sys.syscomments</blockquote><br />
You can further customize the query and filter stored procedures based on its name like the following query will return storec procedures that has 'add' in its name:<br />
<br />
<blockquote>SELECT DISTINCT object_name(id) from sys.syscomments WHERE TEXT like '%add%'</blockquote>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-6360832551520726254.post-58301412468547275622010-08-06T23:56:00.000-07:002010-08-06T23:56:57.916-07:00Regular expressions for CSV File ParsingI had a requirement to parse the csv file which was actually generated for reading in Excel into a c# application. The server didn't have any drivers for OLEDB/ODBC hence I did it with regular expressions<br />
and here's a good link (http://www.blackbit.net/node/12) which has regular expressions for parsing comma and semicolon delimited records.Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-6360832551520726254.post-49210797348161550212010-07-02T04:48:00.000-07:002010-07-02T04:48:14.161-07:00EditorPart does not have an IDFull Error Reads:<br />
<br />
EditorPart does not have an ID<br />
<br />
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.<br />
<br />
Exception Details: System.InvalidOperationException: EditorPart does not have an ID.<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="http://3.bp.blogspot.com/_z2gPWep6fqg/TC3Q4Y_WDtI/AAAAAAAAAOs/QroOmg2qBbs/s1600/EditorPartErr1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="287" src="http://3.bp.blogspot.com/_z2gPWep6fqg/TC3Q4Y_WDtI/AAAAAAAAAOs/QroOmg2qBbs/s400/EditorPartErr1.png" width="400" /></a></div><br />
Resolution:<br />
Just set the id of the tool part in its constructor to some string!Unknownnoreply@blogger.com0