Good link to learn SharePoint 2010
Tuesday, January 31, 2012
Thursday, December 15, 2011
WF Rule Engine
If you are trying to author Rules using the WF rule engine than 2 samples are must for reference . These are old samples but works like charm :
Samples :
External ruleset toolkit
Ruleset analyzer
Monday, November 21, 2011
MVVM Basics
Pretty Good one if you are looking for a webcast explaining MVVM pattern .
http://channel9.msdn.com/Events/TechEd/NorthAmerica/2010/DEV322
http://channel9.msdn.com/Events/TechEd/NorthAmerica/2010/DEV322
Thursday, October 27, 2011
Access Denied while writing to EventLog
This happens due to permission issues. Check the below article.
http://support.microsoft.com/default.aspx?scid=kb;en-us;329291
!!!!!
http://support.microsoft.com/default.aspx?scid=kb;en-us;329291
!!!!!
Thursday, October 20, 2011
SOAP Request Testing Tool
I am been using the SoapUI tool for quite some time and it's pretty impressive.
You can get it from :
http://www.soapui.org/
In order to work with Soap Request which needs authentication , there is a tab "AUT" wherein your can specify credential.
http://www.soapui.org/SOAP-and-WSDL/authenticating-soap-requests.html
You can get it from :
http://www.soapui.org/
In order to work with Soap Request which needs authentication , there is a tab "AUT" wherein your can specify credential.
http://www.soapui.org/SOAP-and-WSDL/authenticating-soap-requests.html
Saturday, October 15, 2011
Resource not found 404 error ( WCF Data service hosted with MVC ASP.NET)
Scenario: MVC ASP.NET application containing WCF data services. When you try to browse WCF data service .svc page you might get the error
"Resource not found -404 error" .
Reson for such behavior : When you try to browse to data service page , the request is sent to MVC framework first rather than data service . As the controller is not defined for such request , error is send back.
Resolution :Ignore request redirection to MVC framework when WCF data service is requested .In order to achieve this add following to global.asax RegisterRoute function.
routes.IgnoreRoute("{resource}.svc/{*pathInfo}");
"Resource not found -404 error" .
Reson for such behavior : When you try to browse to data service page , the request is sent to MVC framework first rather than data service . As the controller is not defined for such request , error is send back.
Resolution :Ignore request redirection to MVC framework when WCF data service is requested .In order to achieve this add following to global.asax RegisterRoute function.
routes.IgnoreRoute("{resource}.svc/{*pathInfo}");
Friday, September 30, 2011
System.Data.Entity.DbUpdateException
{System.Data.Entity.DbUpdateException: An error occurred while saving entities that do not expose foreign key properties for their relationships. The EntityEntries property will return null because a single entity cannot be identified as the source of the exception. Handling of exceptions while saving can be made easier by exposing foreign key properties in your entity types. See the InnerException for details. ---> System.Data.UpdateException: An error occurred while updating the entries. See the inner exception for details. ---> System.ArgumentException: Parameter value '12.50000' is out of range.
at System.Data.SqlClient.TdsParser.TdsExecuteRPC(_SqlRPC[] rpcArray, Int32 timeout, Boolean inSchema, SqlNotificationRequest notificationRequest, TdsParserStateObject stateObj, Boolean isCommandProc)
at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at System.Data.Mapping.Update.Internal.DynamicUpdateCommand.Execute(UpdateTranslator translator, EntityConnection connection, Dictionary`2 identifierValues, List`1 generatedValues)
at System.Data.Mapping.Update.Internal.UpdateTranslator.Update(IEntityStateManager stateManager, IEntityAdapter adapter)
--- End of inner exception stack trace ---
at System.Data.Mapping.Update.Internal.UpdateTranslator.Update(IEntityStateManager stateManager, IEntityAdapter adapter)
at System.Data.EntityClient.EntityAdapter.Update(IEntityStateManager entityCache)
at System.Data.Objects.ObjectContext.SaveChanges(SaveOptions options)
at System.Data.Entity.Internal.InternalContext.SaveChanges()
--- End of inner exception stack trace ---
Got above error while performing database.save() of Entity Model .
The reason for failure was the decimal field in DB which was set for DECIMAL(6,5) whereas the value trying to be saved was 12.00000 .
This is how it works :
e.g.
decimal of (4,1) can hold upto 999.9
decimal of (3,1) can hold upto 99.9
at System.Data.SqlClient.TdsParser.TdsExecuteRPC(_SqlRPC[] rpcArray, Int32 timeout, Boolean inSchema, SqlNotificationRequest notificationRequest, TdsParserStateObject stateObj, Boolean isCommandProc)
at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at System.Data.Mapping.Update.Internal.DynamicUpdateCommand.Execute(UpdateTranslator translator, EntityConnection connection, Dictionary`2 identifierValues, List`1 generatedValues)
at System.Data.Mapping.Update.Internal.UpdateTranslator.Update(IEntityStateManager stateManager, IEntityAdapter adapter)
--- End of inner exception stack trace ---
at System.Data.Mapping.Update.Internal.UpdateTranslator.Update(IEntityStateManager stateManager, IEntityAdapter adapter)
at System.Data.EntityClient.EntityAdapter.Update(IEntityStateManager entityCache)
at System.Data.Objects.ObjectContext.SaveChanges(SaveOptions options)
at System.Data.Entity.Internal.InternalContext.SaveChanges()
--- End of inner exception stack trace ---
Got above error while performing database.save() of Entity Model .
The reason for failure was the decimal field in DB which was set for DECIMAL(6,5) whereas the value trying to be saved was 12.00000 .
This is how it works :
e.g.
decimal of (4,1) can hold upto 999.9
decimal of (3,1) can hold upto 99.9
Tuesday, September 13, 2011
Executing Java .jar within .NET
using System.Diagnostics;
Process process = new Process();
//Path wherein Java is installed in your machine
process.StartInfo.FileName = "java.exe";
//.jar file to be executed
process.StartInfo.Arguments = @"-jar Sample.jar";
process.StartInfo.UseShellExecute = false;
process.StartInfo.RedirectStandardOutput = true;
process.StartInfo.RedirectStandardError = true;
process.Start();
//Get the output from stream
Console.WriteLine(process.StandardOutput.ReadToEnd());
//in case of no error ExitCode will be zero
if(process.ExitCode)
{
//In case of error , get error description
string error = process.StandardError.ReadToEnd();
}
Console.WriteLine(error);
process.WaitForExit();
Process process = new Process();
//Path wherein Java is installed in your machine
process.StartInfo.FileName = "java.exe";
//.jar file to be executed
process.StartInfo.Arguments = @"-jar Sample.jar";
process.StartInfo.UseShellExecute = false;
process.StartInfo.RedirectStandardOutput = true;
process.StartInfo.RedirectStandardError = true;
process.Start();
//Get the output from stream
Console.WriteLine(process.StandardOutput.ReadToEnd());
//in case of no error ExitCode will be zero
if(process.ExitCode)
{
//In case of error , get error description
string error = process.StandardError.ReadToEnd();
}
Console.WriteLine(error);
process.WaitForExit();
Tuesday, August 16, 2011
An entity object cannot be referenced by multiple instances of IEntityChangeTracker.
I got this error due to using separate context object for an entity. I had to use same context object to perform multiple operations in Entity .
Friday, August 12, 2011
Request Error
Specified named connection is either not found in the configuration, not intended to be used with the EntityClient provider
I got this error when i was trying to browse the WCF data Services. The resolution for this issue was to define the connection string for database defined in in app.config file to the web.config file of the web application.
In Nutshell , below is my scnerio :
Project 1 : Contains the .edmx and app.config file
Project 2 : Contains the .SVC referencing entity model defined in project 1 and web.config file
Resolution :
Copy the Db connection defined in app.config to web.config under configuration section .
Thursday, July 21, 2011
Format ComboBox ExtJS
items: [
{
xtype: 'combobox',
fieldLabel: 'State',
store: 'TestStore',
queryMode: 'local',
displayField: 'State',
listConfig: {
getInnerTpl: function () {
return '
{State}:{status}
'; }
}
}
Tab Inside a Tab ExtJS
Ext.create('Ext.TabPanel', {
renderTo: Ext.getBody(),
id: 'main-tabs',
height: 300,
width: 600,
activeTab: 0,
defaults: {
padding: 10
},
items: [{
xtype: 'tabpanel',
title: 'Tab 1',
id: 'tab1',
activeTab: 0,
padding: 5,
border: true,
plain: true,
defaults: {
padding: 10
},
items: [{
title: 'Sub-tab 1',
id: 'subtab1',
html: 'Sub-tab 1 content'
},{
title: 'Sub-tab 2',
id: 'subtab2',
html: 'Sub-tab 2 content'
},{
title: 'Sub-tab 3',
id: 'subtab3',
html: 'Sub-tab 3 content'
}]
},{
title: 'Tab 2',
id: 'tab2',
html: 'Tab 2 content'
},{
title: 'Tab 3',
id: 'tab3',
html: 'Tab 3 content'
},{
title: 'Tab 4',
id: 'tab4',
html: 'Tab 4 content'
},{
title: 'Tab 5',
id: 'tab5',
html: 'Tab 5 content'
}]
});
});
Adding panel to ViewPort (ExtJS)
Add Panels to ViewPort on the fly
1) Define ViewPort
viewport = Ext.create('Ext.container.Viewport', {
layout: {
type: 'border'
},
defaults: {
split: false
},
items: [{
region: 'center',
layout: 'border',
frame: false,
padding: '0 5 0 0',
border: false,
items: [{
region: 'center',
items: [
{
xtype: 'grid1'
}
]
}]
},
{
region: 'south',
frame: false,
padding: '0 5 0 0',
border: false
}
]
});
2) Add panel on the fly to defined region. In our example we are adding panel to "South" region
southRegion = viewport.getComponent(1);
southRegion .add(myPanel);
southRegion .setWidth(200);
southRegion .doLayout();
Tuesday, July 19, 2011
Regular Expression for YYYYMM
Well i managed to make this one for now. If you have better one please share .
YYYYMM
(^(19|20)\d{2})((0[1-9])|(1[0-2])$)
e.g.
PASS : 200901 , 201012 ...
FAILS :211001 , 200913 ...
YYYYMM
(^(19|20)\d{2})((0[1-9])|(1[0-2])$)
e.g.
PASS : 200901 , 201012 ...
FAILS :211001 , 200913 ...
Sunday, July 17, 2011
Friday, July 08, 2011
Get Security Information from Client
In order to get the security information from client in a Service , use the following Class :
ServiceSecurityContext Class
ServiceSecurityContext.Current.WindowsIdentity.Name
ServiceSecurityContext.Current.PrimaryIdentity.Name
More Information:
http://msdn.microsoft.com/en-us/library/system.servicemodel.servicesecuritycontext.aspx
ServiceSecurityContext Class
ServiceSecurityContext.Current.WindowsIdentity.Name
ServiceSecurityContext.Current.PrimaryIdentity.Name
More Information:
http://msdn.microsoft.com/en-us/library/system.servicemodel.servicesecuritycontext.aspx
Wednesday, June 22, 2011
Message: Expected identifier, string or number
If you get this error in your Ext JS page , then there is big possibility that you have added a extra comma which is not required .
E.g.
Incorrect entry
{
title: 'Main Content',
collapsible: false,
region: 'center',
layout: 'fit',
margins: '5 0 0 0',
xtype: 'panelbais' , }
Correct entry
{
title: 'Main Content',
collapsible: false,
region: 'center',
layout: 'fit',
margins: '5 0 0 0',
xtype: 'panelbais' }
Check out the last comma before the closing curly braces .
Monday, June 20, 2011
'undefined' is null or not an object in ext-all.js
One more ext-all.js error . This time it was due to extra comma in object literal definition.
Resolution :
Find and remove extra comma.
Subscribe to:
Posts (Atom)
Design a Zero Trust pipeline using Confidential Computing
Check out reference diagram to design a zero trust pipeline https://blogs.oracle.com/cloud-infrastructure/designing-zero-trust-and-resilie...
-
Ever wanted to have a people picker kind of control in Infopath form and that too in browser mode. Did i heard yes :) , well there is a Acti...
-
Am sure lot's of people would be wondering how to hide menu items of a list eg document libraries "Send to " menu item . In o...
-
Ever thought of printing a content of web part rather than complete page in sharepoint ? Follow the Steps: Create Print Button : Add content...