About Me

My photo
a Dynamic and Energetic guy.....

Friday, December 31, 2010

Tuesday, December 14, 2010

TFS build configuration

First we have to install TFS build definition from TFS 2010 installer.
then,
If we try to create a new build using VS we will get following error since we have not configured it.


So, we have to log in to the TFS system
Then open TFS administration console

Stop TFS BUILD service


Set build service properties

Set Build service for TFS Project collection


New controller and new Agent

Create new build definition using VS

Configure Trigger time





Set build output location







If try to have a build, we will get following error,


We should give write permission for that folder in server.



Finally it Succeed.

Friday, December 10, 2010

Sharepoint Central administration 2010

 
Central administration 2010 has been changed significantly. I got this image  from one of main sharepoint site.

Monday, December 6, 2010

Create a textbox watermark using JQuery


<style
type="text/css">


.watermark

{


color: lightgrey;


font-style: italic;

}


</style>


<!--Add JQuery library reference-->


<script
type="text/javascript"
src="Scripts/jquery-1.4.1.js"></script>





<script
type="text/javascript">



     $(document).ready(function () {

     var val = "User Name";





     //assign some watermark value into variable

     if ($("#HeadLoginView_LoginUser_UserName").val() == "") {

     $("#HeadLoginView_LoginUser_UserName").val(val);

     }

     //Check if user and enter into the textbox and remove the class we have assigned on focus event of the text Box

     $("#HeadLoginView_LoginUser_UserName").focus(function () {

     if (this.value == val) {

     this.value = "";

     $("#HeadLoginView_LoginUser_UserName").removeClass("watermark"); //remove class when user focus on the textbox

     }



     });

     // If user did not enter any value in the text box then assign back the watermark value and assign the class

     $("#HeadLoginView_LoginUser_UserName").blur(function () {



     if (this.value == "") {

     this.value = val;

     $("#HeadLoginView_LoginUser_UserName").addClass("watermark"); // Add class to the textbox

     }

     });

     });


</script>

Saturday, December 4, 2010

Importance of Web.Config file

<?xml
version="1.0"?>



<configuration>

<appSettings>

<!-- Have to give write permissions for this folder-->

<add
key="LogFilePath"
value="c:\logs\vonquest.web.log"/>

</appSettings>



<connectionStrings>

<!--We can give one or more conncetion strings-->

<add
name="ConnectionString"


connectionString="Data Source=88.88.88.888,555;Integrated Security=True;user=abc;password=abc123;Database=MyDatabase; Trusted_Connection=no"


providerName="System.Data.SqlClient" />

</connectionStrings>



<system.web>

<!--When user's browser in different culture it is difficult to set one specific ciltute-->

<!--To get rid from that problem we can set UICulture & Culture-->

<globalization
uiCulture="en"
culture="en-AU"/>



<compilation
debug="true"
targetFramework="4.0" />



<pages
theme="Default"
enableEventValidation="false"/>

<!--Set the Time Out period-->

<sessionState
mode="InProc"
timeout="20" />



<!--For dissabling errors to end user, we can redirect to an eror page-->

<customErrors
mode="RemoteOnly"
defaultRedirect="~/Errors/GeneralError.aspx" ></customErrors>



<!--We can pick authentication mode (1)Annonymouse (2)Windows (3)Forms-->

<authentication
mode="Forms">

<forms
loginUrl="~/Default.aspx"
defaultUrl="~/Default.aspx" />

</authentication>



<!--Setting no permission for unwanted users, user should log in to the system to view pages -->

<authorization>

<deny
users="?"/>

</authorization>

</system.web>



<location
path="App_Themes">

<system.web>

<authorization>

<allow
users="*"/>

</authorization>

</system.web>

</location>



<location
path="Images">

<system.web>

<authorization>

<allow
users="*"/>

</authorization>

</system.web>

</location>



<location
path="Scripts">

<system.web>

<authorization>

<allow
users="*"/>

</authorization>

</system.web>

</location>



<location
path="favicon.ico">

<system.web>

<authorization>

<allow
users="*"/>

</authorization>

</system.web>

</location>



<!--Setting pages to access any user, no need to log in-->

<location
path="Account/Register.aspx">

<system.web>

<authorization>

<allow
users="*"/>

</authorization>

</system.web>

</location>



<location
path="Errors/GeneralError.aspx">

<system.web>

<authorization>

<allow
users="*"/>

</authorization>

</system.web>

</location>



<location
path="ContactUs.aspx">

<system.web>

<authorization>

<allow
users="*"/>

</authorization>

</system.web>

</location>



<location
path="News.aspx">

<system.web>

<authorization>

<allow
users="*"/>

</authorization>

</system.web>

</location>





<!--Setting up properties to commiunicate with WCF services-->

<system.serviceModel>

<bindings>

<netTcpBinding>

<binding
name="vqNetTcpBinding"
transferMode="Buffered"
listenBacklog="500"
maxBufferPoolSize="30000000"
maxBufferSize="30000000"
maxConnections="500"
maxReceivedMessageSize="30000000">

<readerQuotas
maxDepth="32"
maxStringContentLength="30000000"
maxArrayLength="30000000"
maxBytesPerRead="30000000"
maxNameTableCharCount="30000000" />

<reliableSession
inactivityTimeout="00:01:00"
enabled="true" />

<security
mode="None">

<transport
clientCredentialType="None">

</transport>

</security>

</binding>

</netTcpBinding>

</bindings>

<client>

<!--A= Address, B=Binding ,C=Contract-->

<endpoint
name="NetTcpBinding_IUser"
address="net.tcp://localhost:6000/UserSvc"
binding="netTcpBinding"
bindingConfiguration="vqNetTcpBinding"
contract="VonQuest.Interface.IUser" />

<endpoint
name="NetTcpBinding_IGame"
address="net.tcp://localhost:6001/GameSvc"
binding="netTcpBinding"
bindingConfiguration="vqNetTcpBinding"
contract="VonQuest.Interface.IGame" />

<endpoint
name="NetTcpBinding_IUtility"
address="net.tcp://localhost:6002/UtilitySvc"
binding="netTcpBinding"
bindingConfiguration="vqNetTcpBinding"
contract="VonQuest.Interface.IUtility" />

</client>

</system.serviceModel>

<system.webServer>

<modules
runAllManagedModulesForAllRequests="true"/>

</system.webServer>

</configuration>

My Masters