tag:blogger.com,1999:blog-36719820172177755652024-03-13T09:17:52.634+05:30Akshaya MashankarMy Work, My Finding, My Exploring & Development in today's Technology Akshaya Mashankarhttp://www.blogger.com/profile/07577627289456606624noreply@blogger.comBlogger71125tag:blogger.com,1999:blog-3671982017217775565.post-44602091729105102442018-04-13T03:50:00.001+05:302018-04-13T04:03:46.213+05:30PowerShell : Find user exist in AD -GROUP<div dir="ltr" style="text-align: left;" trbidi="on">
Some times we do need to find users exist in AD group we assign any tickets and perform any activity<br />
here is a sudo code i created in powershell to help you.<br />
<br />
<b>Code Step 1 Should be part of input</b><br />
<code><br />
<span style="color: #38761d;"><br />
$cmdOutput = net group YOURADGROUPNAME /domain ;<br />
$var = "USERNAME";<br />
</span></code><br />
<br />
<b><br />
<i>Code Step 2 : loop users and check for user</i></b><br />
<br />
<code><span style="background-color: white;"><span style="color: #38761d;"><br />
function finduser() { <br />
for($i = 0; $i -lt $cmdOutput.Count; $i++) {<br />
if($cmdOutput[$i] -eq $var){ <br />
$found="T"<br />
write-host "--FOUND-->" $cmdOutput[$i]}<br />
}<br />
if($found -eq "T"){ <br />
write-host -ForegroundColor Green "Wow user found " $var}<br />
else {<br />
write-host -ForegroundColor Magenta "SORRY -Scanned records "$cmdOutput.Count " But " $var " not Found"<br />
}<br />
}</span></span>
<br />
finduser<br />
</code><br />
<br />
<br />
<script src="https://www.google-analytics.com/urchin.js" type="text/javascript">
</script> <script type="text/javascript">
try {
_uacct = "UA-9669869-1";
urchinTracker();
} catch(err) {}</script> <iframe allowtransparency="true" frameborder="0" scrolling="no" src="https://www.facebook.com/plugins/like.php?href=http://akshaya-m.blogspot.com/&layout=button_count&show_faces=true&width=500&action=like&font=arial&colorscheme=light&height=21" style="border: none; height: 21px; overflow: hidden; width: 100%;"></iframe></div>
Akshaya Mashankarhttp://www.blogger.com/profile/07577627289456606624noreply@blogger.com0tag:blogger.com,1999:blog-3671982017217775565.post-83862622654788871942018-04-13T03:45:00.000+05:302018-04-13T03:45:16.216+05:30Angular 4/5 & SignalR connection <div dir="ltr" style="text-align: left;" trbidi="on"><script src="https://www.google-analytics.com/urchin.js" type="text/javascript">
</script><br />
Signal R is one of the most widely used <br />
<br />
Step1:install i @aspnet/signalr-client --save<br />
Step 2: include needed import in your component.<br />
<code><br />
import { HubConnection } from '@aspnet/signalr-client';<br />
</code><br />
now in your component<br />
<code><br />
//HUB connection<br />
this.connection = $.hubConnection(this.signalRURL);<br />
this.connection.logging = true;<br />
this.proxy = this.connection.createHubProxy('HUBNAME');<br />
<br />
this.proxy.on('broadcastMessage', (data: any) => {<br />
var msg = (JSON.parse(data)); Alert(msg); });<br />
this.connection.start().done((data: any) => {<br />
console.log(data.id); <br />
}).catch((error: any) => {<br />
this.connectionStatus = "Connection Failed";<br />
console.log('Hub error -> ' + error);<br />
});<br />
</code><br />
<br />
<script type="text/javascript">
try {
_uacct = "UA-9669869-1";
urchinTracker();
} catch(err) {}</script> <iframe allowtransparency="true" frameborder="0" scrolling="no" src="https://www.facebook.com/plugins/like.php?href=http://akshaya-m.blogspot.com/&layout=button_count&show_faces=true&width=500&action=like&font=arial&colorscheme=light&height=21" style="border: none; height: 21px; overflow: hidden; width: 100%;"></iframe></div>Akshaya Mashankarhttp://www.blogger.com/profile/07577627289456606624noreply@blogger.com0tag:blogger.com,1999:blog-3671982017217775565.post-88468399866346178072017-11-15T00:46:00.001+05:302017-11-15T00:49:47.204+05:30Angular build error : Hashingcrypto.js<div dir="ltr" style="text-align: left;" trbidi="on">
Angular is for rapid development and its more frustrating with stuck on unconventional exception during build.<br />
once of the instance I encounted was at hashingcryto.js failed at 86%<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhweoNQf9em8pt3gwlYUDDvdsSc1BFaKcGm6YordXTw6bnc70vLPjYUkTzv-_hF21M1jvKT4Ykj74qxOemuzsHneOb3w3d742W0I-3jxlB2Q7DAtp4VcVz19tD55GwBYcnWx9HEWcRy7a8A/s1600/error.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="103" data-original-width="471" height="86" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhweoNQf9em8pt3gwlYUDDvdsSc1BFaKcGm6YordXTw6bnc70vLPjYUkTzv-_hF21M1jvKT4Ykj74qxOemuzsHneOb3w3d742W0I-3jxlB2Q7DAtp4VcVz19tD55GwBYcnWx9HEWcRy7a8A/s400/error.PNG" width="400" /></a></div>
after ample research I figured a way to normalize the error to have more generic outcome to pin point troubleshoot.<br />
all you need to do is find file HarmonyExportImportedSpecifierDependency.js which would be present at<br />
<ul style="text-align: left;">
<li> <project directory=""> <b>node_modules\webpack\lib\dependencies\HarmonyExportImportedSpecifierDependency.js </b></project></li>
</ul>
edit the file (pref. Notepad) and go to line number 144.<br />
current function <code><br />
updateHash(hash) {<br />
super.updateHash(hash);<br />
const hashValue = this.getHashValue(this.importDependency.module);<br />
hash.update(hashValue);<br />
}<br />
</code><br />
<br />
<br />
replace with <b><code><br />
updateHash(hash) {<br />
super.updateHash(hash);<br />
const hashValue = this.getHashValue(this.importDependency.module);<br />
<br />
if (this.importDependency.module != null){<br />
// console.log('Module resource: ', this.importDependency.module.resource);<br />
}else{<br />
console.log('\n Akx added Error File not found: ', this.importDependency);<br />
}</code></b><br />
<br />
now rebuild & vola you have gunned down the culprit to fix against<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgrPwqIbx1d1EkqYiDLIe-kf_WifZrQlyQyjwuOghUpR-n5wiakZMCwERgDsjO7NUxodQI9dMkZJwD3wZZeQSbUcGMr6pSJAUEqIs2Ihv8oV4khV4bD4lZXtLe-kBcXVq5heiU39j9rIDS0/s1600/error2.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="244" data-original-width="470" height="207" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgrPwqIbx1d1EkqYiDLIe-kf_WifZrQlyQyjwuOghUpR-n5wiakZMCwERgDsjO7NUxodQI9dMkZJwD3wZZeQSbUcGMr6pSJAUEqIs2Ihv8oV4khV4bD4lZXtLe-kBcXVq5heiU39j9rIDS0/s400/error2.PNG" width="400" /> </a></div>
<div class="separator" style="clear: both; text-align: center;">
Hope this resolves your exception.</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<br />
<br />
<div dir="ltr" style="text-align: left;" trbidi="on">
<script src="https://www.google-analytics.com/urchin.js" type="text/javascript">
</script> <script type="text/javascript">
try {
_uacct = "UA-9669869-1";
urchinTracker();
} catch(err) {}</script> <iframe allowtransparency="true" frameborder="0" scrolling="no" src="https://www.facebook.com/plugins/like.php?href=http://akshaya-m.blogspot.com/&layout=button_count&show_faces=true&width=500&action=like&font=arial&colorscheme=light&height=21" style="border: none; height: 21px; overflow: hidden; width: 100%;"></iframe></div>
</div>
Akshaya Mashankarhttp://www.blogger.com/profile/07577627289456606624noreply@blogger.com2tag:blogger.com,1999:blog-3671982017217775565.post-76009604903164674872017-02-16T02:02:00.002+05:302017-02-22T02:46:37.546+05:30SSIS & MS Dynamics CRM using Kingsway <div dir="ltr" style="text-align: left;" trbidi="on">
<br />
Connecting to the CRM entities for loading or fetching data would be the tedious job if done from scratch, Kingsway ( <a href="http://www.kingswaysoft.com/products/ssis-integration-toolkit-for-microsoft-dynamics-365/download"> Download from here</a> ) came up with an intermediate connector to help or streamline the connectivity.<br />
<u>SET YOU DEV MACHINE</u><br />
(1) Installed the Visual Studio (BITS) for BI development (<a href="https://www.visualstudio.com/downloads/"> Download from here</a> )<br />
(2) Install the Kingsway SSIS Integration Toolkit for Microsoft Dynamics 365( <a href="http://www.kingswaysoft.com/products/ssis-integration-toolkit-for-microsoft-dynamics-365/download"> Download from here</a> )<br />
(3) DataBase Driver which needs to be connected for data pull/push (SQL/ORACLE/MYSQL etc.)<br />
<br />
Now we have the development environment set let connect to data sources:<br />
<br />
For CRM connection:<br />
(1) Right click on the connection manager<br />
(2) Select new Connection<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgpTzCDmYZ38BC2_y8_GnLbX8iBttqZi1pSAabUWoE4tNL2HWfbPLyidRIqNs7wXaTSKJGyzRPrdwCLOi3ZDOvj7arBma3Nz6FE1hA3ZX_FS3VRjWSQjxRAYNGl_g5l8c05ojARYZamy2dI/s1600/1.PNG" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="145" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgpTzCDmYZ38BC2_y8_GnLbX8iBttqZi1pSAabUWoE4tNL2HWfbPLyidRIqNs7wXaTSKJGyzRPrdwCLOi3ZDOvj7arBma3Nz6FE1hA3ZX_FS3VRjWSQjxRAYNGl_g5l8c05ojARYZamy2dI/s320/1.PNG" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
Select Type Dynamics CRM (as Shown below)</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhANoQIrY1X6-G7i5TL066nrGGzYHCDAGWYQytwfjSwmAZPFrDqZCF8Ombvq1tD5n0dWA2DfuZctjM_2PuWqx0733bxIcJiBnIuV7uOE2jOnWopqM1MjyMnUrUhrMnG6oTjjC7yewQG2giZ/s1600/2.PNG" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="316" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhANoQIrY1X6-G7i5TL066nrGGzYHCDAGWYQytwfjSwmAZPFrDqZCF8Ombvq1tD5n0dWA2DfuZctjM_2PuWqx0733bxIcJiBnIuV7uOE2jOnWopqM1MjyMnUrUhrMnG6oTjjC7yewQG2giZ/s320/2.PNG" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
Provide needed CRM URL and the Organization name </div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi-c5Gkb4ERbGjQK7mrjD1GhyMuJvDBD6lHlCuMtX3riGjTN0Fw-pspPnaZPZBRgmJHHzq0ixVsVHWNpSR81HF_-VXqvcNTwKDkmXH6fIOBlFDxqrSE-IfvKwuORSMc5O4PBvKUOIp6Jja4/s1600/3.PNG" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="310" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi-c5Gkb4ERbGjQK7mrjD1GhyMuJvDBD6lHlCuMtX3riGjTN0Fw-pspPnaZPZBRgmJHHzq0ixVsVHWNpSR81HF_-VXqvcNTwKDkmXH6fIOBlFDxqrSE-IfvKwuORSMc5O4PBvKUOIp6Jja4/s320/3.PNG" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
Drop the Data Flow Task to perform needed BI operation</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEikKHPSgsIqTL-qYG3lCM6voIrJwPI4Q40BMD_McdrSI3nwPx7fBJJB9BazD8fJbwZ05lOqViRf180rrwk2NhJAdccjeeukJhIPl8TCjIIPqdUQUlfSARdVaX5FPwUvI8qSjh6jDxsxfFtK/s1600/4.PNG" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="182" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEikKHPSgsIqTL-qYG3lCM6voIrJwPI4Q40BMD_McdrSI3nwPx7fBJJB9BazD8fJbwZ05lOqViRf180rrwk2NhJAdccjeeukJhIPl8TCjIIPqdUQUlfSARdVaX5FPwUvI8qSjh6jDxsxfFtK/s320/4.PNG" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
Within data Flow Task you will observe 3 new tool items added for dynamics CRM as shown below</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3J59FSCHfXWaKIT_vEOnxpTodfN41oAjy4Psvq9SvfdKJ-eRi7M6MNlmhbovjXaonogEKYl-823JAdzum287aJfdpYInZ3W-8JXK9I8ayVZS4tf6Q79sTYfilPHLCJ08RhVEi6ohZHe4t/s1600/5.PNG" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="166" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3J59FSCHfXWaKIT_vEOnxpTodfN41oAjy4Psvq9SvfdKJ-eRi7M6MNlmhbovjXaonogEKYl-823JAdzum287aJfdpYInZ3W-8JXK9I8ayVZS4tf6Q79sTYfilPHLCJ08RhVEi6ohZHe4t/s320/5.PNG" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
Select desired based on the business needed, here I've selected as source which has the needed source type as an entity-entity name (source Entity)</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiVvlbBA28zZxYIfsIuAXvVkAof7NZqJjoZAoSYeup5rW8i8Ijv__dWjrtEVq81FR8bQ-FO0JpbsJmETB_18K8u9Py4G2giBTfzALed5JTFJczUZYpU3EVOoCE2kpwSvktbdc7dF0jeBKRt/s1600/6.PNG" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="260" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiVvlbBA28zZxYIfsIuAXvVkAof7NZqJjoZAoSYeup5rW8i8Ijv__dWjrtEVq81FR8bQ-FO0JpbsJmETB_18K8u9Py4G2giBTfzALed5JTFJczUZYpU3EVOoCE2kpwSvktbdc7dF0jeBKRt/s400/6.PNG" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
For any further details please don't hesitate to drop an comment happy to respond </div>
</div>
Akshaya Mashankarhttp://www.blogger.com/profile/07577627289456606624noreply@blogger.com0tag:blogger.com,1999:blog-3671982017217775565.post-24706012987823863692017-02-08T05:28:00.000+05:302017-02-22T02:46:59.564+05:30SSIS Script Task : ConnectionString for ADO.Net & OleDb ConnectionManager<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
In the switching world developer often needs to toggle between connection managers and wish the code operates as its expected.However, the execution engine is yet to be smart enough to undertake the difference.<br />
<table responsive="true" style="border-collapse: collapse; border: 1px solid rgb(187, 187, 187); color: black; font-family: "Segoe UI", "Lucida Grande", Verdana, Arial, Helvetica, sans-serif; font-size: 13px; margin-bottom: 20px; margin-top: 20px; word-break: break-word;" summary="table"><thead>
<tr responsive="true"><th scope="col" style="border: 1px solid rgb(187, 187, 187); padding: 10px 8px; text-align: left;"><span style="background-color: white;"><span style="color: blue;">Connection Manager Type</span></span></th><th scope="col" style="border: 1px solid rgb(187, 187, 187); padding: 10px 8px; text-align: left;"><span style="background-color: white;"><span style="color: blue;">Connection Manager Name</span></span></th></tr>
</thead><tbody>
<tr><td data-th="Connection Manager Type" style="border: 1px solid rgb(187, 187, 187); color: #2a2a2a; min-width: 80px; padding: 10px 8px; vertical-align: top;">ADO</td><td data-th="Connection Manager Name" style="border: 1px solid rgb(187, 187, 187); color: #2a2a2a; min-width: 80px; padding: 10px 8px; vertical-align: top;">ADO Connection Manager</td></tr>
<tr><td data-th="Connection Manager Type" style="border: 1px solid rgb(187, 187, 187); color: #2a2a2a; min-width: 80px; padding: 10px 8px; vertical-align: top;">MSOLAP90</td><td data-th="Connection Manager Name" style="border: 1px solid rgb(187, 187, 187); color: #2a2a2a; min-width: 80px; padding: 10px 8px; vertical-align: top;">Analysis Services Connection Manager</td></tr>
<tr><td data-th="Connection Manager Type" style="border: 1px solid rgb(187, 187, 187); color: #2a2a2a; min-width: 80px; padding: 10px 8px; vertical-align: top;">EXCEL</td><td data-th="Connection Manager Name" style="border: 1px solid rgb(187, 187, 187); color: #2a2a2a; min-width: 80px; padding: 10px 8px; vertical-align: top;">Excel Connection Manager</td></tr>
<tr><td data-th="Connection Manager Type" style="border: 1px solid rgb(187, 187, 187); color: #2a2a2a; min-width: 80px; padding: 10px 8px; vertical-align: top;">FTP</td><td data-th="Connection Manager Name" style="border: 1px solid rgb(187, 187, 187); color: #2a2a2a; min-width: 80px; padding: 10px 8px; vertical-align: top;">FTP Connection Manager</td></tr>
<tr><td data-th="Connection Manager Type" style="border: 1px solid rgb(187, 187, 187); color: #2a2a2a; min-width: 80px; padding: 10px 8px; vertical-align: top;">HTTP</td><td data-th="Connection Manager Name" style="border: 1px solid rgb(187, 187, 187); color: #2a2a2a; min-width: 80px; padding: 10px 8px; vertical-align: top;">HTTP Connection Manager</td></tr>
<tr><td data-th="Connection Manager Type" style="border: 1px solid rgb(187, 187, 187); color: #2a2a2a; min-width: 80px; padding: 10px 8px; vertical-align: top;">ODBC</td><td data-th="Connection Manager Name" style="border: 1px solid rgb(187, 187, 187); color: #2a2a2a; min-width: 80px; padding: 10px 8px; vertical-align: top;">ODBC Connection Manager</td></tr>
<tr><td data-th="Connection Manager Type" style="border: 1px solid rgb(187, 187, 187); color: #2a2a2a; min-width: 80px; padding: 10px 8px; vertical-align: top;">OLEDB</td><td data-th="Connection Manager Name" style="border: 1px solid rgb(187, 187, 187); color: #2a2a2a; min-width: 80px; padding: 10px 8px; vertical-align: top;">OLE DB Connection Manager</td></tr>
</tbody></table>
<br />
For those pin point here a code that worked for me and happy if works for you as well.<br />
FOR ADO.NET Connection Manager<br />
<code><br />
SqlConnection sConnection = new SqlConnection();<br />
sConnection = (SqlConnection)(Dts.Connections["MyConnectionManagerADO.NETName"].AcquireConnection(Dts.Transaction) as SqlConnection);<br />
var connection = sConnection.ConnectionString.ToString()<br />
</code><br />
<br />
FOR OLEDB Connection Manager<br />
<code><br />
var oConnection = Dts.Connections["MyConnectionManagerOLEDBName"].ConnectionString.ToString().Trim();<br />
oConnection = oConnection.Replace("Provider=SQLNCLI10.1;", "").Replace("Provider=SQLNCLI11;", "").Replace("Provider=SQLNCLI11.1;", "").Replace("Auto Translate=False;", "");<br />
</code><br />
<br />
<script src="https://www.google-analytics.com/urchin.js" type="text/javascript">
</script> <script type="text/javascript">
try {
_uacct = "UA-9669869-1";
urchinTracker();
} catch(err) {}</script> <iframe allowtransparency="true" frameborder="0" scrolling="no" src="https://www.facebook.com/plugins/like.php?href=http://akshaya-m.blogspot.com/&layout=button_count&show_faces=true&width=500&action=like&font=arial&colorscheme=light&height=21" style="border: none; height: 21px; overflow: hidden; width: 100%;"></iframe></div>
Akshaya Mashankarhttp://www.blogger.com/profile/07577627289456606624noreply@blogger.com2tag:blogger.com,1999:blog-3671982017217775565.post-88114212883086657842016-12-31T02:58:00.003+05:302017-02-23T22:18:31.176+05:30SSIS Exception Handling via script task C# <div dir="ltr" style="text-align: left;" trbidi="on">
Writing a 'Script task' with c# code behind is a walk in the park, however, when the package is scheduled as Job the exception handling is vital key.<br />
There are various permutations needs c# script is included to have needed outcome achieved.<br />
Here is code snippet which can be included either in Catch block of try catch or as success/ failure condition as logic demands<br />
<br />
<code><br />
try<br />
{//your Code logic<br />
}<br />
catch (Exception ex)<br />
{<br />
Dts.Events.FireError(0, "- FAILED.", string.Concat("Oops! -", ex.Message.ToString(), "Inner Exception -",ex.InnerException.ToString() ), null, 0);<br />
Dts.TaskResult = (int)ScriptResults.Failure;<br />
}<br />
<br />
</code><br />
<br />
<script src="https://www.google-analytics.com/urchin.js" type="text/javascript">
</script> <script type="text/javascript">
try {
_uacct = "UA-9669869-1";
urchinTracker();
} catch(err) {}</script> <iframe allowtransparency="true" frameborder="0" scrolling="no" src="https://www.facebook.com/plugins/like.php?href=http://akshaya-m.blogspot.com/&layout=button_count&show_faces=true&width=500&action=like&font=arial&colorscheme=light&height=21" style="border: none; height: 21px; overflow: hidden; width: 100%;"></iframe></div>
Akshaya Mashankarhttp://www.blogger.com/profile/07577627289456606624noreply@blogger.com0tag:blogger.com,1999:blog-3671982017217775565.post-12027780460984478422015-03-09T23:48:00.000+05:302015-07-31T09:07:08.696+05:30Elegant way to SWITCH & If Else<div dir="ltr" style="text-align: left;" trbidi="on"><script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
</script> <br />
<script src="https://google-code-prettify.googlecode.com/svn/loader/run_prettify.js"></script><br />
<script type="text/javascript">
try {
_uacct = "UA-9669869-1";
urchinTracker();
} catch(err) {}</script> <br />
<br />
Switch Case is one of the most traditional way of having conditional break up performed. Here is the new way which directs, delegates and performs the action as needed.<br />
<br />
Ideally I have seen developer opting for If Else statements, adding my source code were I need to set a check bit based on the parameter Range.<br />
<br />
<br />
<pre class="prettyprint"><code class="language-cs">
int mynumbercheck=1000;
//Your number to be checked
var myswitch = new Dictionary <Func<int,bool>, Action>
{
{ x => x < 10 , () => //Do this!... },
{ x => x < 100 , () => //Do this!... },
{ x => x < 1000 , () => //Do this!... },
{ x => x < 10000 , () => //Do this!... } ,
{ x => x < 100000 , () => //Do this!... },
{ x => x < 1000000 , () => //Do this!... }
};
</code></pre>Now to call our conditional switch <br />
<pre class="prettyprint"><code class="language-cs">
myswitch.First(sw => sw.Key(mynumbercheck)).Value();
</code></pre><br />
Hope this Help you and reduces if else code block<br />
<br />
<iframe allowtransparency="true" frameborder="0" scrolling="no" src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fakshaya-m.blogspot.com%2F&layout=button_count&show_faces=true&width=500&action=like&font=arial&colorscheme=light&height=21" style="border: none; height: 21px; overflow: hidden; width: 100%;"></iframe></div>Akshaya Mashankarhttp://www.blogger.com/profile/07577627289456606624noreply@blogger.com12tag:blogger.com,1999:blog-3671982017217775565.post-74734632185490851772014-12-20T05:31:00.000+05:302015-04-06T11:34:54.926+05:30Fetch Application Pool Identity <div dir="ltr" style="text-align: left;" trbidi="on"><script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
</script> <br />
<script src="https://google-code-prettify.googlecode.com/svn/loader/run_prettify.js"></script><br />
<script type="text/javascript">
try {
_uacct = "UA-9669869-1";
urchinTracker();
} catch(err) {}</script> <br />
<br />
Web Application requires the database operation to be performed by service account which is configured in AppPool. <br />
When ever the user hits the web application the request is received at IIS and CRUD operation is performed against database.<br />
<br />
Here's my code snippet to have transaction performed by APPPool Identity<br />
<br />
Add this code <br />
<pre class="prettyprint"><code class="language-cs">
using System.Runtime.InteropServices;
using System.Security.Principal;
private static WindowsIdentity _appPoolIdentity;
public static WindowsIdentity AppPoolIdentity
{
get { WindowsIdentity result;
if (_appPoolIdentity != null){result = _appPoolIdentity;}
else {result = (_appPoolIdentity = GetAppPoolIdentity());}
return result;
}
}
[DllImport("advapi32.dll", SetLastError = true)]
private static extern bool RevertToSelf();
private static WindowsIdentity GetAppPoolIdentity()
{
WindowsIdentity identity = null;
Win32Exception win32Exception = null;
Thread thread = new Thread(delegate(object o)
{
if (!Config.RevertToSelf())
{
int lastWin32Error = Marshal.GetLastWin32Error();
win32Exception = new Win32Exception(lastWin32Error);
}
identity = WindowsIdentity.GetCurrent();
});
thread.Start();
thread.Join();
if (win32Exception != null)
{
throw win32Exception;
}
return identity;
}
</code></pre><br />
<br />
From your code just call the <br />
<pre class="prettyprint"><code class="language-cs">
using(AppPoolIdentity.Impersonate())
{
//your Execution Block under AppPool Id
}
</code></pre><br />
Hope this Helps you<br />
<br />
<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fakshaya-m.blogspot.com%2F&layout=button_count&show_faces=true&width=500&action=like&font=arial&colorscheme=light&height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:100%; height:21px;" allowTransparency="true"></iframe></div>Akshaya Mashankarhttp://www.blogger.com/profile/07577627289456606624noreply@blogger.com0tag:blogger.com,1999:blog-3671982017217775565.post-55767696217527388732014-09-09T03:21:00.000+05:302014-09-09T03:23:43.970+05:30SQL Server Query :Sort Ordering Query<div dir="ltr" style="text-align: left;" trbidi="on">Sorting and re-ordering is one of the most common requirement in today's demanding industry and there are many approaches to achieve the same. <br />
<br />
Here I'm sharing one of the easiest back-end solution to over come re-Ordering from database function/Store Procedure.<br />
<br />
The advantage of having a database driven ordering would help is saving the processing call from application to database, & can have control over the functionality at ease. <br />
<br />
Below shows the ordering after removing few titles.<br />
<table><tbody>
<tr><td><br />
Current Ordering<br />
----------------------<br />
Title -- Order<br />
Link 01-- 1<br />
link 02 -- 2<br />
link 03 -- 4<br />
link 04 -- 6<br />
link 05 -- 7<br />
link 06 -- 8</td><td><br />
<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEBCylXYkh2wJPs0qv_GNe86QB5m65HL_UtxJs-qgszizeQje3JhfzEXR3gwIEuSl9zN_eCyYOm1kGd4tX4H0uXca5_uJk7NAKiPzeWLp_iulG8X1P7wVzfoaBIsNynhcK48xCDHTXf_6T/s1600/Ordering+01.PNG" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEBCylXYkh2wJPs0qv_GNe86QB5m65HL_UtxJs-qgszizeQje3JhfzEXR3gwIEuSl9zN_eCyYOm1kGd4tX4H0uXca5_uJk7NAKiPzeWLp_iulG8X1P7wVzfoaBIsNynhcK48xCDHTXf_6T/s1600/Ordering+01.PNG" /></a></td></tr>
</tbody></table><br />
To have current order in place we can have a database Function create to get corrected Ordering update to table /Column.<br />
<u>STEP 01 : GET CORRECT ORDER.</u><br />
<br />
SQL function : <span style="color: magenta;"> ROW_NUMBER()</span><span style="color: white;"></span><br />
<br />
Creating Code Block to get needed Ordering :<br />
<blockquote class="tr_bq"><code> SELECT Title,SortOrder, </code><br />
<code> ROW_NUMBER() OVER (ORDER BY (select 1)) </code><br />
<code> AS NEW_SORTORDER </code><br />
<code> FROM dbo.tablename</code></blockquote><br />
ROW_NUMBER needs to have Over followed ORDER BY attributes<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEivtEBJs3i6oEVhs86XBMBzulTHwY6U2S1iQecwJ-Pcm0dZ3rymT3KnOxzmkqWodJeEDlTgF4KWWd28IIkVZqxIlgguGW26ApKe7sH1fEjFSMkrLvuaabM1VBzfitBAmuIgF8mXj5Au_480/s1600/NewSortOrder.PNG" imageanchor="1"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEivtEBJs3i6oEVhs86XBMBzulTHwY6U2S1iQecwJ-Pcm0dZ3rymT3KnOxzmkqWodJeEDlTgF4KWWd28IIkVZqxIlgguGW26ApKe7sH1fEjFSMkrLvuaabM1VBzfitBAmuIgF8mXj5Au_480/s1600/NewSortOrder.PNG" /></a><br />
<br />
<u>STEP 02 : ORDER & UPDATE WITH TABLE </u><br />
<br />
(a) Create a With Block<br />
(b) Update with join on WITH black<br />
<br />
<blockquote class="tr_bq"><code>WITH Correct_SortOrder AS </code><br />
<code>( </code><br />
<code>SELECT Title,SortOrder, </code><br />
<code>ROW_NUMBER() OVER (ORDER BY (select 1))AS NEW_SORT_ORDER </code><br />
<code>FROM dbo.tablename<br />
<code>) </code><br />
<code>Update </code><br />
<code>dbo.tablename</code><br />
<code>SET</code><br />
<code>dbo.tablename.SortOrder=Correct_SortOrder.NEW_SORT_ORDER</code><br />
<code>FROM</code><br />
<code>tablename</code><br />
<code>INNER JOIN</code><br />
<code>Correct_SortOrder</code><br />
<code>ON</code><br />
<code>tablename.Title=Correct_SortOrder.Title;</code><br />
</blockquote><br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgGS4iXE_d8BRYE3JGoBgG5uSpy16TIhyAIAAvvmSBl299CwCMyIaihwbwpR3k5Kq_cpo5C-MYWZUNit06ejzM5VgZKqpMxuqHlBx3QB6-VKugVHUh7RzgECmEgJUWUNT0CKVR7G22kzIy2/s1600/final.PNG" imageanchor="1" ><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgGS4iXE_d8BRYE3JGoBgG5uSpy16TIhyAIAAvvmSBl299CwCMyIaihwbwpR3k5Kq_cpo5C-MYWZUNit06ejzM5VgZKqpMxuqHlBx3QB6-VKugVHUh7RzgECmEgJUWUNT0CKVR7G22kzIy2/s1600/final.PNG" /></a><br />
<br />
<br />
Hope this Help you. Happy Coding :)<br />
<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
</script> <script type="text/javascript">
try {
_uacct = "UA-9669869-1";
urchinTracker();
} catch(err) {}</script> <iframe allowtransparency="true" frameborder="0" scrolling="no" src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fakshaya-m.blogspot.com%2F&layout=button_count&show_faces=true&width=500&action=like&font=arial&colorscheme=light&height=21" style="border: none; height: 21px; overflow: hidden; width: 100%;"></iframe></div>Akshaya Mashankarhttp://www.blogger.com/profile/07577627289456606624noreply@blogger.com0tag:blogger.com,1999:blog-3671982017217775565.post-60647757935159703502013-09-26T09:39:00.004+05:302013-09-26T09:39:55.319+05:30Failed to initiate the upgrade sequence. An exception of type System.IO.IOException was thrown.<div dir="ltr" style="text-align: left;" trbidi="on">
<h2 style="text-align: left;">
"Failed to upgrade SharePoint Products."</h2>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHQUEmUtvfOk9EzFBCjGg9IV_T-kWb9PD5b9wLAtcRt7vyDX0Q19bOEhO7AgIILVaDVjPVJDmXttodJqrRh1W3YUQlA4VgtyiVStaddBVK4oSEUOdCjlojzhuQopulsJCBoegIo9kBbdbL/s1600/upgradeFailed.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHQUEmUtvfOk9EzFBCjGg9IV_T-kWb9PD5b9wLAtcRt7vyDX0Q19bOEhO7AgIILVaDVjPVJDmXttodJqrRh1W3YUQlA4VgtyiVStaddBVK4oSEUOdCjlojzhuQopulsJCBoegIo9kBbdbL/s320/upgradeFailed.png" /></a></div>
<span style="font-family: inherit;"><br />
</span> <span style="font-family: Courier New, Courier, monospace; font-size: x-small;">I have installed the office web app patch & re-run the configuration wizard when I encountered this exception </span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">Please Note the <b>GUID </b>is vital for clearing cache.</span><br />
<code><br />
</code><br />
<ol style="background-color: white; color: #333333; font-size: 12px; line-height: 18.15625px;">
<li><code><span style="font-family: inherit;">Stop the Timer service. To do this, follow these steps:<br />
<ol style="list-style-type: lower-alpha;">
<li>Click <b>Start</b>, point to <b>Administrative Tools</b>, and then click <b>Services</b>.</li>
<li>Right-click <b>SharePoint 2010 Timer</b>, and then click <b>Stop</b>.</li>
<li>Close the Services console.</li>
</ol>
</span></code></li>
<code><span style="font-family: inherit;">
<li>On the computer that is running Microsoft SharePoint Server 2010 and on which the Central Administration site is hosted, click <b>Start</b>, click <b>Run</b>, type <b>explorer</b>, and then press ENTER.</li>
<li>In Windows Explorer, locate and then double-click the following folder:</li>
<li>%SystemDrive%\ProgramData\Microsoft\SharePoint\Config\<i>GUID</i></li>
<li><b>Notes</b></li>
<ol style="list-style-type: lower-alpha;">
<li>The %SystemDrive% system variable specifies the letter of the drive on which Windows is installed. By default, Windows is installed on drive C.</li>
<li>The <i>GUID</i> placeholder specifies the GUID folder. There may be more than one of these.</li>
<li>The ProgramData folder may be hidden. To view the hidden folder, follow these steps:</li>
<ol style="list-style-type: upper-alpha;">
<li>On the <b>Tools</b> menu, click <b>Folder Options.</b></li>
<li>Click the <b>View</b> tab.</li>
<li>In the <b>Advanced settings</b> list, click <b>Show hidden files and folders</b> under <b>Hidden files and folders</b>, and then click <b>OK</b>.</li>
<li>You can also simply type this directly in the path if you do not want to show hidden files and folders.</li>
</ol>
</ol>
<li>Back up the Cache.ini file. (Make a copy of it. <b>DO NOT DELETE THIS FILE</b>, Only the XML files in the next step)</li>
<li>Delete all the XML configuration files in the GUID folder (<b>DO NOTE DELETE THE FOLDER</b>). Do this so that you can verify that the GUID folders content is replaced by new XML configuration files when the cache is rebuilt.<br />
<b>Note</b> When you empty the configuration cache in the GUID folder, make sure that you <b>do </b><b><u>NOT</u></b><b>delete the GUID folder and the Cache.ini</b> file that is located in the GUID folder.</li>
<li>Double-click the Cache.ini file.</li>
<li>On the <b>Edit </b>menu, click <b>Select All</b>.</li>
<li>On the <b>Edit</b> menu, click <b>Delete</b>.</li>
<li>Type <b>1</b>, and then click <b>Save</b> on the <b>File</b> menu. (Basically when you are done, the only text in the config.ini file should be the number 1)</li>
<li>On the <b>File</b> menu, click <b>Exit</b>.</li>
<li>Start the Timer service. To do this, follow these steps:<ol style="list-style-type: lower-alpha;">
<li>Click <b>Start</b>, point to <b>Administrative Tools</b>, and then click <b>Services</b>.</li>
<li>Right-click <b>SharePoint 2010 Timer</b>, and then click <b>Start</b>.</li>
<li>Close the Services console.</li>
</ol>
</li>
<li><b>Note</b> The file system cache is re-created after you perform this procedure. Make sure that you perform this procedure on all servers in the server farm.</li>
<li>Make sure that the Cache.ini file in the GUID folder now contains its previous value. For example, make sure that the value of the Cache.ini file is not 1.</li>
<li>Check in the GUID folder to make sure that the xml files are repopulating. This may take a bit of time.</li>
</span></code></ol>
--------------------------------------------------------------<br />
<br />
<br />
<div dir="ltr" style="text-align: left;" trbidi="on">
<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
</script> <script type="text/javascript">
try {
_uacct = "UA-9669869-1";
urchinTracker();
} catch(err) {}</script> <iframe allowtransparency="true" frameborder="0" scrolling="no" src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fakshaya-m.blogspot.com%2F&layout=button_count&show_faces=true&&action=like&font=arial&colorscheme=light&height=21" style="border: none; height: 21px; overflow: hidden; width: 100%;"></iframe></div>
</div>
Akshaya Mashankarhttp://www.blogger.com/profile/07577627289456606624noreply@blogger.com0tag:blogger.com,1999:blog-3671982017217775565.post-2222239685425458232013-07-18T01:40:00.000+05:302013-07-18T10:32:32.277+05:30SharePoint-GridView & PeopleEditor control.<div dir="ltr" style="text-align: left;" trbidi="on">
<div dir="ltr" style="text-align: left;" trbidi="on">
Developer usually invest much time when the control are sharepoint and binding data is not made straight forward.<br />
<br />
Below is simple example to get SharePoint:PeopleEditor control in SPGridView Control on application page.<br />
<br />
Step 01: Add SPGridView control on Application /Webpart page.<br />
Step 02: Add needed columns in the Sp GridView<br />
Step 03 : Add Sharepoint PeopleEditor column<br />
Step 04: Add Title Property in PeopleEditor with binded column from data source<br />
Ex: - <span style="color: #660000;"><code> Title='<%# Bind("AUTHOR") %>'</code></span><br />
Step 05: Add OnRowDataBound property in SPGridView<br />
Ex : - <span style="color: #660000;">OnRowDataBound="spGridViewRowEventHandler"</span><br />
Step 06: Add your picker validate code to resolve the user/Author on databound.<br />
<code><br />
protected void spGridViewRowEventHandler(object sender, GridViewRowEventArgs e)<br />
{<br />
if (e.Row.RowType == DataControlRowType.DataRow)<br />
{ <br />
PeopleEditor ppAuthor = (PeopleEditor)e.Row.FindControl("Control<yourpeopleeditorcontrol>");<br />
string userid= ppAuthor.Title.ToString();<br />
ppAuthor.CommaSeparatedAccounts =userid<br />
ppAuthor.Validate();<br />
}<br />
<br />
}<br />
</yourpeopleeditorcontrol></code></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNDXK4jHcN7JmrugCOxrIFn7pxW5tn2XS3UiGudBvOhVY5GXTiY1FN2Xm1Rn39-53WwsS8zPFbWV7J7-rF0FB5ecd9x5CVLppjngMwoiylRaunvXuAbVRbbwCgqV8l9jOgngh4W56uPgO2/s1600/picker.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="132" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNDXK4jHcN7JmrugCOxrIFn7pxW5tn2XS3UiGudBvOhVY5GXTiY1FN2Xm1Rn39-53WwsS8zPFbWV7J7-rF0FB5ecd9x5CVLppjngMwoiylRaunvXuAbVRbbwCgqV8l9jOgngh4W56uPgO2/s400/picker.PNG" width="400" /></a></div>
<br />
That's it your control is done<br />
<br />
<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
</script> <script type="text/javascript">
try {
_uacct = "UA-9669869-1";
urchinTracker();
} catch(err) {}</script> <iframe allowtransparency="true" frameborder="0" scrolling="no" src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fakshaya-m.blogspot.com%2F&layout=button_count&show_faces=true&width=500&action=like&font=arial&colorscheme=light&height=21" style="border: none; height: 21px; overflow: hidden; width: 500px;"></iframe></div>
Akshaya Mashankarhttp://www.blogger.com/profile/07577627289456606624noreply@blogger.com0tag:blogger.com,1999:blog-3671982017217775565.post-75988199626774811232013-03-21T02:05:00.001+05:302013-03-21T02:14:05.382+05:30SharePoint People-picker Slowness<div dir="ltr" style="text-align: left;" trbidi="on">
<script src="http://www.google-analytics.com/urchin.js" type="text/javascript"></script><script type="text/javascript">try {_uacct = "UA-9669869-1";urchinTracker();} catch(err) {}</script>Recently my SharePoint portal seems to slowing from end user information entering. The User entry box people-picker was really taking forever to resolve name. The slowness was recorded across whole site collection and there was no customization involved which might have affected this issue.<br />
<br />
In order to resolve this slowness following steps needs to be performed.<br />
1. Execute following command on the WFE server.<br />
<pre style="background-image: URL(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEye3Mu1xH5Pbv-UuFlOKwBrQAacQwydY4jykNgRENXjU6w_2jU_4-CGUc-SPtqA0AYO_sBzNC6QQ52PxNwIAb447vUH9oEhTzIc3MSwu9hHYrN0Bwb_AfSkUU4sKATfy539zqF5jbgxmd/s320/codebg.gif); background: #f0f0f0; border: 1px dashed #CCCCCC; color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"><code style="color: black; word-wrap: normal;">
Stsadm–o setapppassword –password <enterpassword>
</enterpassword></code></pre>
<br />
Please note - the password here is not the server.<br />
<br />
2. Now execute following command on APP server.<br />
<code style="color: black; word-wrap: normal;"><br />
Stsadm –o setproperty –pn peoplepicker -searchadforests –pv "forests:i.domain.com, Domain:i.domain.com" -url "http://Sharepointsite/" <web application="" url=""><br />
</web></code><br />
<br />
This will do the trick. repeat same for Sub-site as well. <br />
<br />
<div dir="ltr" style="text-align: left;" trbidi="on">
<br /></div>
</div>
Akshaya Mashankarhttp://www.blogger.com/profile/07577627289456606624noreply@blogger.com0tag:blogger.com,1999:blog-3671982017217775565.post-32122588369211358582013-03-05T09:57:00.001+05:302013-03-21T02:12:25.399+05:30SharePoint User Profile Synchronization.<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
<div style="margin-bottom: .0001pt; margin: 0in;">
<span style="font-size: 13.5pt;">SharePoint portals are tightly integrated with Active Directory and since SharePoint has a additional Database to maintain user profiling, However many times user alias names are shown inconsistent on welcome.ascx section For some it's show :<o:p></o:p></span></div>
<div style="margin: 0in 0in 0.0001pt 0.5in; text-indent: -0.25in;">
<!--[if !supportLists]--><span style="font-size: 13.5pt;">•<span style="font-size: 7pt;"> </span></span><!--[endif]--><span style="font-size: 13.5pt;">first name , last name<o:p></o:p></span></div>
<div style="margin: 0in 0in 0.0001pt 0.5in; text-indent: -0.25in;">
<!--[if !supportLists]--><span style="font-size: 13.5pt;">•<span style="font-size: 7pt;"> </span></span><!--[endif]--><span style="font-size: 13.5pt;">last name, first name <o:p></o:p></span></div>
<div style="margin: 0in 0in 0.0001pt 0.5in; text-indent: -0.25in;">
<!--[if !supportLists]--><span style="font-size: 13.5pt;">•<span style="font-size: 7pt;"> </span></span><!--[endif]--><span style="font-size: 13.5pt;">domain\userID <o:p></o:p></span></div>
<div style="margin: 0in 0in 0.0001pt;">
<span style="font-size: 13.5pt;"> This means AD-Profile Synchronization is not enabled or not happening for some reasons.<o:p></o:p></span></div>
<div style="margin-bottom: .0001pt; margin: 0in;">
<span style="font-size: 13.5pt;"><b><u>SOLUTION:</u></b><o:p></o:p></span></div>
<div style="margin: 0in 0in 0.0001pt;">
<br /></div>
<div style="margin-bottom: .0001pt; margin: 0in;">
<span style="font-size: 13.5pt;">Manually run following SharePoint PowerShell Command which synchronizes AD Accounts.<o:p></o:p></span></div>
<br />
<code><b>Get-SPUser –Web <a href="http://sharepointserver/" target="_blank"><span style="color: black; text-decoration: none; text-underline: none;">http://SharePointServer</span></a> | Set-SPUser –SyncFromAD</b><o:p></o:p></code><br />
<br />
Execute command for each Site collection to reflect these changes. </div>
Akshaya Mashankarhttp://www.blogger.com/profile/07577627289456606624noreply@blogger.com0tag:blogger.com,1999:blog-3671982017217775565.post-78840858582973078712013-02-15T02:16:00.000+05:302013-03-05T10:11:25.916+05:30SharePoint Error :The form cannot be rendered. This may be due to a misconfiguration of the Microsoft SharePoint Server State Service<div dir="ltr" style="text-align: left;" trbidi="on">
InfoPath forms are giving following exception when trying to
activate or add any new workflow<br />
<div class="MsoNormal">
<o:p></o:p></div>
<blockquote class="tr_bq">
<b>“The form cannot be rendered. This may be due to a
misconfiguration of the Microsoft SharePoint Server State Service. For more
information, contact your server administrator.”</b></blockquote>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhE9J8Ws188H7JmkQCMCTM8pX7Ls0kBL3mhhH9mSky2TGnNZpUyxpLjRLcT1u2TbgOIn-rnYL_v2GVHOV61RaeNTjp4hFXWWPoYE0kiOzs3_qYsg6Lt-6H_KckUylPZOTOGJqgbRyFeV2It/s1600/inforpath+Error.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="168" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhE9J8Ws188H7JmkQCMCTM8pX7Ls0kBL3mhhH9mSky2TGnNZpUyxpLjRLcT1u2TbgOIn-rnYL_v2GVHOV61RaeNTjp4hFXWWPoYE0kiOzs3_qYsg6Lt-6H_KckUylPZOTOGJqgbRyFeV2It/s640/inforpath+Error.PNG" width="640" /></a></div>
<b><br /></b>
<b> Solution : </b><br />
<br />
As I checked for the found State Service was not started, in order to
start this service go to:<br />
<br />
<ol style="text-align: left;">
<li><b>Central administration </b></li>
<li><b>Configuration Wizards </b></li>
<li><b>Click “<span style="font-family: 'Times New Roman', serif; font-size: 12pt;">Launch
the Farm Configuration Wizard” </span></b></li>
<li><b><span style="font-family: 'Times New Roman', serif; font-size: 12pt;">click “Start the Wizard”</span></b></li>
</ol>
<br />
<div class="MsoNormal" style="margin: 5pt 0in;">
To
confirm state services is started go to<br />
<b>1. Application Management >></b><br />
<b>2. Manage
service applications</b> you will see the status. </div>
<div class="MsoNormal">
<o:p></o:p>
<br />
<div dir="ltr" style="text-align: left;" trbidi="on">
<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
</script>
<script type="text/javascript">
try {
_uacct = "UA-9669869-1";
urchinTracker();
} catch(err) {}</script>
<iframe allowtransparency="true" frameborder="0" scrolling="no" src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fakshaya-m.blogspot.com%2F&layout=button_count&show_faces=true&width=500&action=like&font=arial&colorscheme=light&height=21" style="border: none; height: 21px; overflow: hidden; width: 500px;"></iframe>
</div>
</div>
</div>
Akshaya Mashankarhttp://www.blogger.com/profile/07577627289456606624noreply@blogger.com0tag:blogger.com,1999:blog-3671982017217775565.post-21158436196688078062012-11-01T07:53:00.001+05:302013-03-05T01:21:15.788+05:30Silverlight and SharePoint connection with MVVM<div dir="ltr" style="text-align: left;" trbidi="on">
<pre code="csharp"> BasicHttpBinding binding = new BasicHttpBinding();
EndpointAddress Address = new EndpointAddress(new Uri("http://<site_name>/_vti_bin/lists.asmx"));
// Required to initialize variables
ListsSoapClient proxy = new ListsSoapClient(binding, Address);
proxy.GetListItemsCompleted += new EventHandler<getlistitemscompletedeventargs>(proxy_GetListItemsCompleted);
//Define the parameters for the service call
XElement query = new XElement("Query");
XElement queryOptions = new XElement("QueryOptions");
XElement viewFields = new XElement("ViewFields");
proxy.GetListItemsAsync("<list name="">",
null,
query,
viewFields,
null,
queryOptions,
null);
Handler :
void proxy_GetListItemsCompleted(object sender, GetListItemsCompletedEventArgs e)
{
XDocument doc = XDocument.Parse(e.Result.ToString());
var rst = from item in doc.Descendants(XName.Get("row", "#RowsetSchema"))
select new OpenTktValue
{
Column1 = item.Attribute("ows_Column1").Value.ToString(),
ColumnN = item.Attribute("ows_ColumnN").Value.ToString()
};
rst.First().Column1.ToString() + "-" + rst.First().Column1.ToString());
}
</list></getlistitemscompletedeventargs></site_name></pre>
<div dir="ltr" style="text-align: left;" trbidi="on">
<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
</script><script type="text/javascript">
try {
_uacct = "UA-9669869-1";
urchinTracker();
} catch(err) {}
</script>
<iframe allowtransparency="true" frameborder="0" scrolling="no" src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fakshaya-m.blogspot.com2F&layout=button_count&show_faces=true&width=500&action=like&font=arial&colorscheme=light&height=21" style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none; height: 21px; overflow: hidden; ">
</iframe>
</div>
</div>
Akshaya Mashankarhttp://www.blogger.com/profile/07577627289456606624noreply@blogger.com0tag:blogger.com,1999:blog-3671982017217775565.post-77921639589435869972012-10-04T10:00:00.000+05:302013-01-18T09:18:17.262+05:30SharePoint 2010 -SVC service Exception :'System.Data.Services.Providers.IDataServiceUpdateProvider'<div dir="ltr" style="text-align: left;" trbidi="on">
SharePoint 2010 has List data web service However many users trying to access get following exception :<b> <a href="http://yoursite/_vti_bin/ListData.svc">http://yoursite<site_name>/_vti_bin/ListData.svc</site_name></a> <i></i></b><br />
<div>
</div>
<b></b><br />
<blockquote>
<b>Could not load type 'System.Data.Services.Providers.IDataServiceUpdateProvider' from assembly 'System.Data.Services, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. </b></blockquote>
<b>
</b><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgCKCPZAINL-RwojD-DWZLYz2XK2Qz1LIr8Rxb-vP11AhV_Y2_XGXsRqdeF0W-QWNj52geexZWC5OolthGy9MsIIp0mL_3U1XRUuNWhG1Wmsql5xNMIAcG2oZAakOlLB7jVm6umEewO1Dd0/s1600/Error.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="207" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgCKCPZAINL-RwojD-DWZLYz2XK2Qz1LIr8Rxb-vP11AhV_Y2_XGXsRqdeF0W-QWNj52geexZWC5OolthGy9MsIIp0mL_3U1XRUuNWhG1Wmsql5xNMIAcG2oZAakOlLB7jVm6umEewO1Dd0/s400/Error.JPG" width="400" /></a></div>
<i><u>Remedy</u></i>:<br />
<br />
Installation needed on SharePoint web front end servers: ADO.NET Data Services Update for .NET Framework 3.5 SP1 for Windows 7 and Windows Server 2008 R2 <br />
<br />
<a href="http://www.microsoft.com/downloads/en/details.aspx?familyid=79d7f6f8-d6e9-4b8c-8640-17f89452148e&displaylang=en">Click to Download -- ADO.NET Data Services Update for .NET Framework.</a><br />
<div dir="ltr" style="text-align: left;" trbidi="on">
<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
</script><script type="text/javascript">
try {
_uacct = "UA-9669869-1";
urchinTracker();
} catch(err) {}</script><iframe allowtransparency="true" frameborder="0" scrolling="no" src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fakshaya-m.blogspot.com%2F&layout=button_count&show_faces=true&width=500&action=like&font=arial&colorscheme=light&height=21" style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none; height: 21px; overflow: hidden; width: 500px;"></iframe></div>
</div>
Akshaya Mashankarhttp://www.blogger.com/profile/07577627289456606624noreply@blogger.com1tag:blogger.com,1999:blog-3671982017217775565.post-43913339546980506122012-09-18T11:10:00.000+05:302013-03-05T10:20:51.269+05:30Remove line with keyword from Text file :C#<div dir="ltr" style="text-align: left;" trbidi="on">Requirement : Huge text file needs to be parsed and the output file needs should eliminate<br />
lines having special characters/words.<br /><br />
Solution: This is a 3 step solution : (1) reade file (2) Parse File with key word<br />
(3) Output as required<br /><br />
<br /><br />
Declare Source & Destination file - Setting parameter:<br />
<br /><br />
<pre style="background-image: URL(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEye3Mu1xH5Pbv-UuFlOKwBrQAacQwydY4jykNgRENXjU6w_2jU_4-CGUc-SPtqA0AYO_sBzNC6QQ52PxNwIAb447vUH9oEhTzIc3MSwu9hHYrN0Bwb_AfSkUU4sKATfy539zqF5jbgxmd/s320/codebg.gif); background: #f0f0f0; border: 1px dashed #CCCCCC; color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"><code style="color: black; word-wrap: normal;">
string _SourceFile= @"c:\Sample_IN.txt";
string _DestinationFile= @"c:\Sample_OUT.txt"; </code></pre><br /><br />
<b>// Reading Source file </b><br />
<br /><br />
<pre style="background-image: URL(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEye3Mu1xH5Pbv-UuFlOKwBrQAacQwydY4jykNgRENXjU6w_2jU_4-CGUc-SPtqA0AYO_sBzNC6QQ52PxNwIAb447vUH9oEhTzIc3MSwu9hHYrN0Bwb_AfSkUU4sKATfy539zqF5jbgxmd/s320/codebg.gif); background: #f0f0f0; border: 1px dashed #CCCCCC; color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"><code style="color: black; word-wrap: normal;">
string line =string.Empty;
StringBuilder StrBld= new StringBuilder();
WrdFound = true;
//READ the file and display it line by line. System.IO.StreamReader
file = new System.IO.StreamReader(filename);
while ((line = file.ReadLine()) !=
null)
{ if (!(line))
StrBld.AppendLine(line.Replace(' ',','));
} </code></pre><br /><br />
<b>//CHECK Key word against which the line to be dropped Ex my key words are "AKSHAYA"<br />
or "MASHANKAR")</b><br />
<br /><br />
<pre style="background-image: URL(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEye3Mu1xH5Pbv-UuFlOKwBrQAacQwydY4jykNgRENXjU6w_2jU_4-CGUc-SPtqA0AYO_sBzNC6QQ52PxNwIAb447vUH9oEhTzIc3MSwu9hHYrN0Bwb_AfSkUU4sKATfy539zqF5jbgxmd/s320/codebg.gif); background: #f0f0f0; border: 1px dashed #CCCCCC; color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"><code style="color: black; word-wrap: normal;">
CheckKeyWord(string _eachLine)
{
if (_eachLine == null || _eachLine.Length
== 0) return false; else
{ Regex regex = new Regex(@"(AKSHAYA|MASHANKAR)", RegexOptions.IgnoreCase);
return regex.IsMatch(_eachLine); }
} </code></pre><br /><br />
//WRITING DESTINATION File<br />
<br /><br />
<pre style="background-image: URL(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEye3Mu1xH5Pbv-UuFlOKwBrQAacQwydY4jykNgRENXjU6w_2jU_4-CGUc-SPtqA0AYO_sBzNC6QQ52PxNwIAb447vUH9oEhTzIc3MSwu9hHYrN0Bwb_AfSkUU4sKATfy539zqF5jbgxmd/s320/codebg.gif); background: #f0f0f0; border: 1px dashed #CCCCCC; color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"><code style="color: black; word-wrap: normal;">
//WRITE the file and display it line by line.
using (StreamWriter sw = new StreamWriter(tempFilename))
{
sw.WriteLine(StrBld.ToString());
}
file.Close();
</code></pre><br /><br />
<br />
<pre class="CSHARP" name="code">Please share your thoughts and comments for the dame</pre><script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
</script><br />
<script type="text/javascript">
try {
_uacct = "UA-9669869-1";
urchinTracker();
} catch (err) { }</script><br />
<iframe allowtransparency="true" frameborder="0" scrolling="no" src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fakshaya-m.blogspot.com%2F&layout=button_count&show_faces=true&width=500&action=like&font=arial&colorscheme=light&height=21" style="border: none; height: 21px; overflow: hidden; width: 500px;"></iframe><br />
</div>Akshaya Mashankarhttp://www.blogger.com/profile/07577627289456606624noreply@blogger.com2tag:blogger.com,1999:blog-3671982017217775565.post-77978285450930299092012-07-28T07:57:00.000+05:302013-01-18T09:19:56.558+05:30SharePoint 2010 -MS LYNC Integration.<div dir="ltr" style="text-align: left;" trbidi="on">
SharePoint - a collaborative platform to have mash up functional is always fun. Recently I found can across well drafted article published by J.D. Wade on Sharepoint and Microsoft Lync.<br />
<br />
<a href="http://wadingthrough.com/2012/04/04/lync-and-sharepoint-integration-more-than-presence-information/" target="_blank">Lync and SharePoint Integration</a><br />
<br />
Special thanks : J.D Wade.<br />
<br />
<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
</script>
<script type="text/javascript">
try {
_uacct = "UA-9669869-1";
urchinTracker();
} catch(err) {}
</script>
<iframe allowtransparency="true" frameborder="0" scrolling="no" src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fakshaya-m.blogspot.com%2F&layout=button_count&show_faces=true&width=500&action=like&font=arial&colorscheme=light&height=21" style="border: none; height: 21px; overflow: hidden; width: 500px;"></iframe></div>
Akshaya Mashankarhttp://www.blogger.com/profile/07577627289456606624noreply@blogger.com0tag:blogger.com,1999:blog-3671982017217775565.post-44416869704508380052012-07-21T02:57:00.000+05:302013-02-04T01:52:57.195+05:30ORACLE : WITH Block statement<div dir="ltr" style="text-align: left;" trbidi="on">
Query writing is fun but can be complex when we are referring multiple tables/views
which has inlet/Joins /sub-query referred. on the best solution & organized
way of writing such query in Oracle is using WITH Blocks.
<br />
Below I'm using simple example to help you get started with WITH-blocks<br />
<b><u>Tutorial </u></b>: First block starts with "WITH" keyword <code><span style="color: blue;">
</span></code><br />
<code><span style="color: blue;">WITH block_name AS ( ),</span></code> Final statement
includes Select statement with in query or join as needed treating each block as
table. Below are 2 example showing with block usage.<br />
<br />
<u><b>Example : </b></u>Consider 4 tables/views having needed information blinded
with a connecting factor and say ID. Normal Query States :<br />
<br />
<pre style="font-family: arial; font-size: 12px; border: 1px dashed #CCCCCC; width: 99%;
height: auto; overflow: auto; background: #f0f0f0; background-image: URL(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEye3Mu1xH5Pbv-UuFlOKwBrQAacQwydY4jykNgRENXjU6w_2jU_4-CGUc-SPtqA0AYO_sBzNC6QQ52PxNwIAb447vUH9oEhTzIc3MSwu9hHYrN0Bwb_AfSkUU4sKATfy539zqF5jbgxmd/s320/codebg.gif);
padding: 0px; color: #000000; text-align: left; line-height: 20px;">
<code style="color: #000000; word-wrap: normal;">SELECT T1.Col1, T1.col2, T2.col3, T2.col4,
T2.col5 FROM Table1 T1 JOIN Table2 T2 ON Col6 = col7
WHERE col6 IN ( SELECT TA.COLA FROM TableA TA JOIN TableB TB ON TA.COLA1 = tb.ColB1 ) </code></pre>
Now to have more organized way to get this query executed using WITH Block <b> </b><br />
<br />
<b>CONDITION 01: Using blocks in WHERE clause</b>
<br />
<pre style="font-family: arial; font-size: 12px; border: 1px dashed #CCCCCC; width: 99%;
height: auto; overflow: auto; background: #f0f0f0; background-image: URL(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEye3Mu1xH5Pbv-UuFlOKwBrQAacQwydY4jykNgRENXjU6w_2jU_4-CGUc-SPtqA0AYO_sBzNC6QQ52PxNwIAb447vUH9oEhTzIc3MSwu9hHYrN0Bwb_AfSkUU4sKATfy539zqF5jbgxmd/s320/codebg.gif);
padding: 0px; color: #000000; text-align: left; line-height: 20px;">
<code style="color: #000000; word-wrap: normal;">WITH BLOCK1 AS (SELECT TA.COLA FROM
TableA TA JOIN TableB TB ON TA.COLA1 = tb.ColB1),
SELECT T1.Col1, T1.col2, T2.col3, T2.col4, T2.col5 FROM Table1 T1 JOIN Table2 T2 ON Col6 = col7 WHERE col6 IN
( --Note:with block added as select statement & can be used at multiple places.
SELECT block1.cola FROM BLOCK1
) </code></pre>
<br />
<b>CONDITION 02: JOINING WITH blocks all together. </b>
<br />
--Note : block starts from "WITH" statement
<pre style="font-family: arial; font-size: 12px; border: 1px dashed #CCCCCC; width: 99%;
height: auto; overflow: auto; background: #f0f0f0; background-image: URL(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEye3Mu1xH5Pbv-UuFlOKwBrQAacQwydY4jykNgRENXjU6w_2jU_4-CGUc-SPtqA0AYO_sBzNC6QQ52PxNwIAb447vUH9oEhTzIc3MSwu9hHYrN0Bwb_AfSkUU4sKATfy539zqF5jbgxmd/s320/codebg.gif);
padding: 0px; color: #000000; text-align: left; line-height: 20px;">
<code style="color: #000000; word-wrap: normal;">WITH BLOCK1
AS
(SELECT TA.COLA FROM TableA TA JOIN
TableB TB ON TA.COLA1 = tb.ColB1
),
<b>--Note: Except last with block all with block end with , </b>
BLOCK2 AS (
SELECT T1.Col1, T1.col2, T2.col3, T2.col4, T2.col5 FROM Table1
T1 JOIN Table2 T2 ON Col6 = col7
)
--final statement only includes Black name.
SELECT * FROM Block2 B2, Block1 B1 WHERE B2.col6 = b1.COLA
</code></pre>
Hope this help's you
----
<br />
<div dir="ltr" style="text-align: left;" trbidi="on">
<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
</script>
<script type="text/javascript">
try {
_uacct = "UA-9669869-1";
urchinTracker();
} catch (err) { }
</script>
<iframe allowtransparency="true" frameborder="0" scrolling="no" src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fakshaya-m.blogspot.com%2F&layout=button_count&show_faces=true&width=500&action=like&font=arial&colorscheme=light&height=21"
style="border: none; height: 21px; overflow: hidden; width: 500px;"></iframe>
</div>
</div>
Akshaya Mashankarhttp://www.blogger.com/profile/07577627289456606624noreply@blogger.com0tag:blogger.com,1999:blog-3671982017217775565.post-18633208174680700152012-03-14T01:13:00.004+05:302013-02-03T03:39:19.135+05:30Power Shell Command finder links<div dir="ltr" style="text-align: left;" trbidi="on">
Couple of helpful links for Powershell links to refer<br />
<br />
<a href="http://www.microsoft.com/resources/TechNet/en-us/Office/media/WindowsPowerShell/WindowsPowerShellCommandBuilder.html">SilverLight Command Builder</a><br />
<br />
<a href="http://technet.microsoft.com/en-us/library/ff678226.aspx">Index of SharePoint Server 2010 Windows PowerShell cmdlets</a><br />
<br />
<a href="http://autospinstaller.codeplex.com/">Codeplex PS tool (directions on the site)</a><br />
<br />
Finally for Remote Server Execution of powershell commands best mentioned steps:<br />
<a href="http://blogs.msdn.com/b/opal/archive/2010/03/07/sharepoint-2010-with-windows-powershell-remoting-step-by-step.aspx">SharePoint 2010 with Windows PowerShell Remoting Step by Step</a><br />
<br />
Hope this helps you as well.<br />
<br />
<br />
<script src="http://www.google-analytics.com/urchin.js" type="text/javascript"></script><script type="text/javascript">try {_uacct = "UA-9669869-1";urchinTracker();} catch(err) {}</script><iframe allowtransparency="true" frameborder="0" scrolling="no" src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fakshaya-m.blogspot.com%2F&layout=button_count&show_faces=true&width=500&action=like&font=arial&colorscheme=light&height=21" style="border: none; height: 21px; overflow: hidden; width: 500px;"></iframe><a href="http://technet.microsoft.com/en-us/library/ff678226.aspx"></a><a href="http://technet.microsoft.com/en-us/library/ff678226.aspx"></a></div>
Akshaya Mashankarhttp://www.blogger.com/profile/07577627289456606624noreply@blogger.com1tag:blogger.com,1999:blog-3671982017217775565.post-23887227314742067962012-03-04T14:28:00.003+05:302013-03-05T10:17:46.024+05:30Central Administration returns blank page after installation on Windows 7<div dir="ltr" style="text-align: left;" trbidi="on">
Installation of SharePoint 2010 on Windows Server seems to be much easier than installing on Windows-7 machine to be loaded with SharePoint 2010 as a developer machine.<br />
<br />
Now when i click on central admin blank page is returned. <br />
No Error logs in IIS.<br />
However I checked IIS Web-site & Application Pool everything seems to be running fine & was registried with proper service account.<br />
Also check all SQL & Sharepoint Service which were also properly started.<br />
<br />
Overall there was really no way anything was missed. <br />
However after long search and troubleshooting i found windows features are required to be executed <a href="http://msdn.microsoft.com/en-us/library/ee554869(office.14).aspx">Click here to check steps by MSDN</a><br />
<br />
<strong>Following command needs to be executed on Command Prompt as administrator:</strong><br />
<br />
<pre class="csharp" name="code">
start /w pkgmgr /iu:IIS-WebServerRole;IIS-WebServer;IIS-CommonHttpFeatures;IIS-StaticContent;IIS-DefaultDocument;IIS-DirectoryBrowsing;IIS-HttpErrors;IIS-ApplicationDevelopment;IIS-ASPNET;IIS-NetFxExtensibility;IIS-ISAPIExtensions;IIS-ISAPIFilter;IIS-HealthAndDiagnostics;IIS-HttpLogging;IIS-LoggingLibraries;IIS-RequestMonitor;IIS-HttpTracing;IIS-CustomLogging;IIS-ManagementScriptingTools;IIS-Security;IIS-BasicAuthentication;IIS-WindowsAuthentication;IIS-DigestAuthentication;IIS-RequestFiltering;IIS-Performance;IIS-HttpCompressionStatic;IIS-HttpCompressionDynamic;IIS-WebServerManagementTools;IIS-ManagementConsole;IIS-IIS6ManagementCompatibility;IIS-Metabase;IIS-WMICompatibility;WAS-WindowsActivationService;WAS-ProcessModel;WAS-NetFxEnvironment;WAS-ConfigurationAPI;WCF-HTTP-Activation;WCF-NonHTTP-Activation
</pre>
<br />
<br />
Hope this help you too.<br />
-------------------------------------------<br />
<br />
<script src="http://www.google-analytics.com/urchin.js" type="text/javascript"></script><script type="text/javascript">try {_uacct = "UA-9669869-1";urchinTracker();} catch(err) {}</script><iframe allowtransparency="true" frameborder="0" scrolling="no" src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fakshaya-m.blogspot.com%2F&layout=button_count&show_faces=true&width=500&action=like&font=arial&colorscheme=light&height=21" style="border: none; height: 21px; overflow: hidden; width: 500px;"></iframe></div>
Akshaya Mashankarhttp://www.blogger.com/profile/07577627289456606624noreply@blogger.com1tag:blogger.com,1999:blog-3671982017217775565.post-89092833437395542412012-01-05T23:19:00.015+05:302012-01-06T01:01:44.807+05:30Custom entry for Hyperlink Or Picture column in SharePoint using webpartSharePoint provides many columns as input one of which is Hyperlink or picture column which has two fields as entry and is a concern how to have the entry to be made possible from custom web part or via custom coding.<br /><br />Normal out of box form looks like this.<br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhqApZuX_r8uvyMb80y5POEctkpPM2mW8bhtOhM1jt1ihDup7WT52VwJuJhSg8cu-O5u_WUWtDz9HQA-Od4kOj6oS_o8IbEW1Nqhmw7y4Pg9CfW1g269mj3SkvPNdzZhlA5bJgteBRPR2Bk/s1600/inputscreen.png"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 250px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhqApZuX_r8uvyMb80y5POEctkpPM2mW8bhtOhM1jt1ihDup7WT52VwJuJhSg8cu-O5u_WUWtDz9HQA-Od4kOj6oS_o8IbEW1Nqhmw7y4Pg9CfW1g269mj3SkvPNdzZhlA5bJgteBRPR2Bk/s320/inputscreen.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5694211536002921234" /></a><br /><br />I have created a webpart which has needed input holder to accept values from user.<br />Currently I’m using 2 columns Title & Hyperlink column : MyURL for URL<br />Please find the code for the same.<br /><pre name="code" class="csharp"><br />using (SPSite osite = new SPSite(SPContext.Current.Web.Url))<br /> {<br /> using (SPWeb oweb = osite.OpenWeb())<br /> {<br /> //listName<br /> SPList Samplelist = oweb.Lists["ListName"];<br /> SPListItem ListItem= Samplelist.AddItem();<br /> oweb.AllowUnsafeUpdates = true;<br /> ListItem["Title"] = "Akshaya Blog Title";<br /> SPFieldUrlValue HyperlinkURLVal = new SPFieldUrlValue();<br /> HyperlinkURLVal.Url ="http://akshaya-m.blogspot.com";<br /> HyperlinkURLVal.Description = "Akshaya Blog Click Here";<br /> ListItem["MyURL"] = HyperlinkURLVal;<br /> //Update List item<br /> ListItem.Update();<br /> }<br /> }<br /></pre><br /><br />Outcome as needed--<br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgnLU9A_cgHi-P_pqJUBxF1aCoupxJ5Sz7YCuBxKpTis5ujjcGoZ98MtlYn1fgd11izsbgoJO7JGBkkcCjTn4_K4xXJLznArDO3PGdxtQghX_zOoPMB5XPUY2MvOIkB_XwSvnppifFbX6r7/s1600/OutCome.PNG"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 40px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgnLU9A_cgHi-P_pqJUBxF1aCoupxJ5Sz7YCuBxKpTis5ujjcGoZ98MtlYn1fgd11izsbgoJO7JGBkkcCjTn4_K4xXJLznArDO3PGdxtQghX_zOoPMB5XPUY2MvOIkB_XwSvnppifFbX6r7/s400/OutCome.PNG" border="0" alt=""id="BLOGGER_PHOTO_ID_5694225672289520562" /></a><br /><br />Thanks please revert your queries/comments<br /><script src="http://www.google-analytics.com/urchin.js" type="text/javascript"></script><script type="text/javascript">try {_uacct = "UA-9669869-1";urchinTracker();} catch(err) {}</script><iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fakshaya-m.blogspot.com%2F&layout=button_count&show_faces=true&width=500&action=like&font=arial&colorscheme=light&height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:500px; height:21px;" allowTransparency="true"></iframe>Akshaya Mashankarhttp://www.blogger.com/profile/07577627289456606624noreply@blogger.com0tag:blogger.com,1999:blog-3671982017217775565.post-80658069258892203222011-12-16T09:47:00.018+05:302011-12-28T23:24:12.636+05:30Validate Login User with AD/LDAP authentication(Login Page)Validating users against Active Directory/ LDAP. Also many organisation have multiple domains and same application needs to validate accross all domain.<br /><br />This code can be used in SharePoint custom Login form for user Validation for Claim based authentication or Form Based Authentication.<br /><br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjYaL3Gh834xagzc2xYi0g0UqYFo2XJT5gY1_WjGPERPAyRD67LXbABjX5WERfNmFvpJDxfD4hFonhWFm11ZZ-KbniAk6WVSG9oI8XZbZ4zMdOTNP5u-xivFsf9sO5IoiH4E92TEkIashNH/s1600/login.JPG"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 100px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjYaL3Gh834xagzc2xYi0g0UqYFo2XJT5gY1_WjGPERPAyRD67LXbABjX5WERfNmFvpJDxfD4hFonhWFm11ZZ-KbniAk6WVSG9oI8XZbZ4zMdOTNP5u-xivFsf9sO5IoiH4E92TEkIashNH/s320/login.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5687602485816075282" /></a><br /><br /><br />Reference Added :<br /><pre name="code" class="csharp"><br />using System.Runtime.InteropServices; <br /></pre><br />COMException : The exception that is thrown when an unrecognized HRESULT is returned from a COM method call for more simplified error response from LDAP Error: Unknown error (0x80005000).<br /><br /><pre name="code" class="csharp"><br />using System.DirectoryServices;<br /></pre><br /><br />Below is the code sniplet<br /><pre name="code" class="csharp"><br /> using (DirectoryEntry entry = new DirectoryEntry())<br /> {<br /> entry.Username = "DOMAIN\\LOGINNAME";<br /> entry.Password = "PASSWORD";<br /> DirectorySearcher searcher = new DirectorySearcher(entry);<br /> searcher.Filter = "(objectclass=user)";<br /> try<br /> {<br /> searcher.FindOne();<br /> {<br /> //Add Your Code if user Found..<br /> }<br /> }<br /> catch (COMException ex)<br /> {<br /> if (ex.ErrorCode == -2147023570)<br /> {<br /> ex.Message.ToString();<br /> // Login or password is incorrect <br /> }<br /> }<br /> }<br /></pre><br /><br />ErrorCode : -2147023570 suggest the Username or password is not correctly entered.<br /><br />post your questions, comments or suggestion.<br /><br /><br /><script src="http://www.google-analytics.com/urchin.js" type="text/javascript"></script><script type="text/javascript">try {_uacct = "UA-9669869-1";urchinTracker();} catch(err) {}</script><iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fakshaya-m.blogspot.com%2F&layout=button_count&show_faces=true&width=500&action=like&font=arial&colorscheme=light&height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:500px; height:21px;" allowTransparency="true"></iframe>Akshaya Mashankarhttp://www.blogger.com/profile/07577627289456606624noreply@blogger.com2tag:blogger.com,1999:blog-3671982017217775565.post-33281557888820126642011-12-10T07:48:00.001+05:302011-12-10T07:50:12.949+05:30Hide the extension .aspx in the url of page ...<div dir="ltr" style="text-align: left;" trbidi="on">Now a days customers are more concerned with site URL and its relative path displayed on the browser address.<br />
Many Suggest having interceptor/handler or use the existing global.asax (Application_Begin Request handler) for modifying the URL shown in the browser window, <span class="comment-body" data-li-comment-text="">Web Routing is the concept (4.0 framework)</span><br />
<br />
However you can get solution for .Net /sharepoint application there are following ways:<br />
<ol style="text-align: left;"><li>MVC </li>
<li>HttpModule rewrite URL</li>
<li>ISAPIRewrite to enable Extension-less URL Rewriting for IIS5 and IIS6</li>
<li>IIS level extension parsing</li>
</ol>Step by step approaches refer below links:<br />
<a href="http://msdn.microsoft.com/en-us/library/ms972974.aspx" target="_blank">URL Rewriting in ASP.NET</a><br />
<a href="http://weblogs.asp.net/scottgu/archive/2007/02/26/tip-trick-url-rewriting-with-asp-net.aspx" target="_blank">URL Rewriting in Asp.net </a><br />
<a href="http://www.kirsanov.net/post/2011/12/09/URL-Rewriting-and-Routing-in-ASPNET-4.aspx" target="_blank">URL rewrite/Routing (4.0 framework concept) *</a> <br />
<a href="http://forums.iis.net/t/1176695.aspx" target="_blank">IIS Forum for Extension parsing</a> <br />
<div></div><br />
<div> Let me know your comments /feedback for the same</div><br />
<div></div><script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
</script><script type="text/javascript">
try {
_uacct = "UA-9669869-1";
urchinTracker();
} catch(err) {}
</script><iframe allowtransparency="true" frameborder="0" scrolling="no" src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fakshaya-m.blogspot.com%2F&layout=button_count&show_faces=true&width=500&action=like&font=arial&colorscheme=light&height=21" style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none; height: 21px; overflow: hidden; width: 500px;"></iframe></div>Akshaya Mashankarhttp://www.blogger.com/profile/07577627289456606624noreply@blogger.com2tag:blogger.com,1999:blog-3671982017217775565.post-35643908047563249142011-08-16T02:09:00.002+05:302012-01-06T23:40:24.060+05:30ASP .Net Page Life cycle<div dir="ltr" style="text-align: left;" trbidi="on"><br />There are many post related to page life cycle. but the mentioned is really the best provided <br /><a href="http://sites.google.com/site/emanish/Asp.Net2.0Lifecycle.PNG">Graphical View for Page Life Cycle</a><br /><br /><br /><br /><div dir="ltr" style="text-align: left;" trbidi="on"><script src="http://www.google-analytics.com/urchin.js" type="text/javascript"> </script><br /><script src="http://www.google-analytics.com/urchin.js" type="text/javascript"> </script><br /><script src="http://www.google-analytics.com/urchin.js" type="text/javascript"> </script><br /><script src="http://www.google-analytics.com/urchin.js" type="text/javascript"> </script><br /><script src="http://www.google-analytics.com/urchin.js" type="text/javascript"> </script><br /><script src="http://www.google-analytics.com/urchin.js" type="text/javascript">http://geekswithblogs.net/emanish/archive/2006/07/13/85028.aspx</script><script type="text/javascript">try {_uacct = "UA-9669869-1";urchinTracker();} catch(err) {}</script> <iframe allowtransparency="true" frameborder="0" scrolling="no" src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fakshaya-m.blogspot.com%2F&layout=button_count&show_faces=true&width=500&action=like&font=arial&colorscheme=light&height=21" style="border: none; height: 21px; overflow: hidden; width: 500px;"></iframe></div></div>Akshaya Mashankarhttp://www.blogger.com/profile/07577627289456606624noreply@blogger.com0