Friday, December 16, 2011

The current identity (NT AUTHORITY\NETWORK SERVICE) does not have write access

The current identity (NT AUTHORITY\NETWORK SERVICE) does not have write access

Solution: Type the followinf in Visual Studio Command Prompt (Start->All Programs -> Microsoft Visual Studio 2010 -> Visual Studio Tools ->Visual Studio Command Prompt (2010)

C:\WINDOWS\Microsoft.NET\Framework\v2.0.50215>aspnet_regiis -ga "NT Authority\Network Service"

This solution works perfectly.

Tuesday, August 30, 2011

About Views

Which of the following statements is correct?

Ans1: CREATE VIEW dbo.vEmpSalTotal AS SELECT EmpId, SUM(EmpSal) FROM [Emp] GROUP BY EmpId
Ans2: CREATE VIEW dbo.vEmpSalTotal AS SELECT EmpId, SUM(EmpSal) as TotalSal FROM [Emp] GROUP BY EmpId
Ans3: The sp_HelpText system stored procedure reveals the code which created an object. For Example below code reveals the View text for the View : "viewGetDetails"

sp_HelpText viewGetDetails.

Ans4: You can Encrypt the view using the "WITH ENCRYPT" keyword in the Create View clause:

EmpID, SUM(EmpSal) AS TotalSalFROM [Emp]GROUP BY EmpID

Tips to keep updated in IT field.

Friday, August 26, 2011

update database using sqldataadapter

Following code demonstrates simple update to the database, using SqlDataAdapter

var nw = ConfigurationManager.ConnectionStrings["nw"];
var connection = new SqlConnection();
connection.ConnectionString = nw.ConnectionString;
var cmd = connection.CreateCommand();
cmd.CommandType = CommandType.Text;
cmd.CommandText = "SELECT * FROM Customers";
var da = new SqlDataAdapter(cmd);
var nwSet = new DataSet("nw");
var bldr = new SqlCommandBuilder(da);
da.Fill(nwSet, "Customers");
//Modify existing row
var customersTable = nwSet.Tables["Customers"];
var updRow = customersTable.Select("CustomerID='WOLZA'")[0];
updRow["CompanyName"] = "New Wolza Company";
//Add new row
"AAAAA", "Five A Company");
//Delete a row, note that you cannot delete a
//customer who has orders
var delRow = customersTable.Select("CustomerID='PARIS'")[0];
//send changes to database
da.Update(nwSet, "Customers");
dataGridView2.DataSource = nwSet;
dataGridView2.DataMember = "Customers";
MessageBox.Show("Update Complete");

Back up your data on Facebook,Linked In, Twitter by following simple steps

Back up your data on Facebook,Linked In, Twitter by following simple steps:

you can backup your data on facebook by going to Account at right top corner -> Account settings -> Click on link "Download a copy" above the facebook copyright ->Start my archive.

Export your Linked In contact by following these simple steps:

Go to Contacts Menu
My Connections
Click on Export Connections link at the bottom of the page.
You can select your choice to export to any of the file formats Microsoft Outlook
Outlook Express
Yahoo! Mail
Mac OS X Address Book (CSV file)
VCF file(vCard)
click on export

Back up you twitter data by using the services of any of the below sites:

Sunday, June 19, 2011

automatically detect the language set in the user's browser

Q. How can a page automatically detect the language set in the user's browser ?
Automatic detection of the language preference of the user as set in his browser
In your web.config file, you need to set the following globalization tag with the values that are presented below:
          enableClientBasedCulture="true" />

New features in .Net 4.0

1. ASP.NET 4.0 comes with a new option for compressing the Session data with Out Process Session mode(mode=StateServer). To enable this functionality, we need to add “compressionEnabled=”true” attribute with the SessionMode in web.config.
When Compression mode is enabled in web.config, ASP.NET compresses the serialized session data and passes it to session storage and while retrieving same deserialization and decompression happens in the server side. ASP.NET 4.0 used System.IO.Compression.GZStream class to compress the session mode.

2. We can programmatically change Session State Behavior when required as below:

 //The Session State behaviour can be any of: Default,Disabled,ReadOnly,Required based on the requirement.

HttpContext.Current.SetSessionStateBehavior( System.Web.SessionState.SessionStateBehavior.Default)

Monday, May 2, 2011

readonly properties

There is nothing like readonly properties because readonly keyword is applied only to field members. and readonly members are initialized only in the constructors.

We can have properties which has only get block and no set block which allows only to return the values but not set or assign the value.

private int _i=5;
public int i //this property allows to get the value of _i variable but we cant set the value of _i.
      return _i;

Monday, April 25, 2011

visual studio crashes when adding connection to online database from server explorer.

visual studio crashes when adding connection to online database from server explorer.
I encountered this problem recently and i found that the reason was that my computer c drive has less space(less than 150 mb). i deleted few files from c drive then it was working fine.

Saturday, April 23, 2011

silverlight exception

when i was trying to get the data from a webservice in my silverlight project i got the following exception. It was working few minutes back but when i restarted my visual studio project i got the exception.
An error occurred while trying to make a request to URI 'http://localhost:1285/WebServices/LoginService.svc'. This could be due to attempting to access a service in a cross-domain way without a proper cross-domain policy in place, or a policy that is unsuitable for SOAP services. You may need to contact the owner of the service to publish a cross-domain policy file and to ensure it allows SOAP-related HTTP headers to be sent. This error may also be caused by using internal types in the web service proxy without using the InternalsVisibleToAttribute attribute. Please see the inner exception for more details.

solution: I tried adding the clientaccesspolicy.xml file which is used to access webservice if it is hosted on some other server. but still the same problem. then  I noticed that the random port VS2010 was using earlier had changed from what it was using now(as i restarted my visual studio).  I looked at my service references and it was using the old port number in the service definitions.  I updated the new visual studio port number or you can also delete the service references and then recreate them and everything will work fine - I then checked the web.config and service refs and they now have the new port number.

Friday, April 22, 2011

Time management link has a very good video on Time Management.

Click Here to watch the time management video.

Saturday, April 9, 2011

mysql error: 150

MySQL error no: 150.

I got this error when the primary key column was not unsigned but foreign key column was checked signed. so make sure that both primarykey column in parent table and foreign key column in child table both datatype, range match properly.

set startup page in silverlight

Q. How do I set the Startup page in silverlight?
A: you have to assign one of your .xaml page to the RootVisual element in the App.xaml.cs file in the Application_Startup event as below.
 private void Application_Startup(object sender, StartupEventArgs e)this.RootVisual = new Details();



whichever xaml page you want to display to the user that page object has to be created and assigned here.

Monday, April 4, 2011

connect to mysql from silverlight

In order to use mysql database with silverlight so that you can use entity framework. you need to install mysql connector which is an msi file. Then restart the visual studio then from the server explorer you can connect to mysql database.

Below is the link to download mysql connector for .net

first download button is to download source code and examples.
second download button is to download .msi file to install the mysql connector for .net

Saturday, March 26, 2011

dotnet online training

Online training for dotnet at affordable price. It includes C#,ASP.NET, VB.NET.
Linq, Webservices, ajax, wcf basics also covered.
Money back guarantee if not satisfied.

Saturday, March 19, 2011

how to get job in .net

1. join some .net training.
2. learn all the basics of dotnet.
3. most frequently questions of dotnet include
 a. difference between stored procedure and functions
 b. what are generics what are the benefits of generics and why to go for generics?
c. What are collections?
d. difference between array and array list?
e. difference between arraylist and dictionary
Ans: arraylist is accessed using index whereas dictionary is accessed using keys.
f. difference between interface and abstract classes.
g. what is singleton class?
h. what is the use of static class?
i.what are the advantages of using stored procedure?
j. how many clustered index are possible
k. difference between clustered and non clustered index?
l.what is viewstate? page lifecycle?
n. state management techniques in
o. caching. types of caching?
p.types of joins/
4. learn how to display data in gridivew, update and delete the data using gridivew.

microsoft interview questions

latest Microsoft interview questions. .net technical

1. difference between virual and abstract methods?
Virtual methods must contain implementation whereas abstract methods must not have implementation.
Virtual methods may or may not be overridden in child class whereas abstract methods must be overriden in child class.

2. Can we have virtual constructors?
Ans: No.

3. If we disable the viewstate for the page is the text of textbox retained after postback?
Ans: Yes.

4.What is ViewState?
Ans: ViewState is used to retain property values of control even after postback to the same web form. to prevent instance of a class to be created?
1. make the constructor of the class as private
2. make the class as sealed class.

6. what is the use of constructor?
Ans: To initialize the datamembers of the class.

7. what is abstract class?
Ans: A class with atleast one method declared as abstract and the class must have the abstract keyword.

Sunday, March 13, 2011

when is viewstate data saved and loaded in page lifecycle

LoadViewState event is fired after Page_Init event and before Page_Load event is fired and viewstate data is stored after Page_PreRender and before Page_Render events that is in the SaveViewState event.

Difference between ReadOnly and const keywords

Difference between ReadOnly and const keywords
Readonly fields can be initialized either in the declaration of the ReadOnly fields or in the constructor in the same class.
Const field is different from readonly.
A const field can only be initialized while declaring the field whereas A readonly field can be initialized either at the declaration or in a constructor.
A const field is a compile-time constant. The readonly field can be used for runtime constants

Tuesday, February 22, 2011

Microsoft Interview questions for dotnet

Please find below the interview questions pattern .
company : Microsoft
Technology: dotnet
 for Experienced professionals.
Forms Authentication(1Question)
Exceptions (2Questions)
PageLifeCycle Events(1Question)
Windows Principal, Windows Identity(1Question)
Overriding Example
Referencial Integrity on tables is applied by ???

Friday, February 4, 2011

wipro project manager round

Date: jan 2011
company: wipro
Project manager round interview questions for dotnet

1. What is SDLC?
2. What are different types of testing?
3. If given a task by your project manager? how do you estimate the time for completing the task?
4. Are you ready to work at nights?
5. Are you ready to work on testing projects?

value momentum interview questions

feb 2011
Value momentum, banjara hills, Interview questions

1. What is cyclic reference?
2.Design patterns?
3. What is the use of source safe?
4.Method overloading types?
5.Logical question: get the highest of 1000 integers
6. singleton class
7.Static classes
9.A class with a private contructor. Can this class be inherited? no

value labs project manager round interview questions

Date: 2/4/2011
ProjectManager round
Company: Value Labs

Please find below the latest valuelabs interview questions for dotnet.
1.Difference between assembly and dll?
2.What is XSLT?
3. Implement Dataset functionality using classes.
5.How to assign image from databast to image control?
6.n-tier architecture
7.What are static classes what is its use?
8. Write code showing the DataAdapter functionality?
9.What are the uses of interface? to connect to oracle database from code?
Ans: using oledb provider. Is there any other way of connecting to oracle database.
11.In a page calles page1.aspx, you have 2 textbox. there is a usercontrol with a button which is used in the page1.aspx page. now how to retreive the textbox values in button click event of usercontrol button.

Wednesday, February 2, 2011

value labs interview questions

1. Linq lambda expression
2. statement management techniquest.
3. ways of wcf hosting
4. difference between webservices and wcf.
5. generics
6. difference between statement management techniques, connected and disconected architecture, stored procedure and functions.
7. how to call button click event handler using javascript.
Ans: __dopostback method
8. why use soapfault in wcf
Ans: channel security and to maintain connection between client and server.
9. types of bindings in wcf.
10. design patterns

wipro interview questions for 2 years

Recently I have attended I wipro Interview. Please look at below questions. If it can be of help to someone searching for job.

1. what is csc.exe, alg.exe, rsgen.exe ?
2. String builder is mutable string is immutable ?
3. Static class: Class with static members, methods.
4. Singleton class: class whose constructor is private. and can be instantiated only once.
5.Abstract class its advantages.
6. Interface its advantages.
7. difference between stored procedure and function. Every interview this quesion is asked.
8. Connected and disconnected architecture?
9.Assembly something related answer is build.major.minor.revision.
10. How to get version of assembly?
11.if stored procedure is taking long time for execution what you will do?
12. How to increase performance in c# code.
13. var keyword?
14. all oops concepts
15. forms authentication
16. difference between cookies , sessions, application object, viewstate?
17. statement management techniques. their advantages and disadvantages?
18. Generics and collections . Every interview this quesion is asked.

Friday, January 21, 2011

What is Microsoft Dynamics CRM?

Microsoft Dynamics CRM is a multi-lingual Customer Relationship Management software package developed by Microsoft. It focuses mainly on Sales, Marketing, and Service (help desk) sectors. It is an XRM platform and has we have to use its proprietary .NET based framework to customize it to meet many different demands.

Dynamics CRM is a server-client application, which, like Microsoft Sharepoint, is primarily an IIS-based web application which also supports extensive Webservices interfaces. Clients access Dynamics CRM either by using Microsoft IE 6 or later web browser or by a thick client plug-in to Microsft Outlook. 

Thursday, January 13, 2011

What is Robots.txt file used for ?

Robots.txt file
1. Helps crawl website.
2. It also lets you decide which page to expose to crawler.