Posted by: techsavygal | February 2, 2007

ASP.NET 2.0 Troubleshooting tips!

Oflate, while converting our asp.net 1.1 applications to asp.net 2.o, we have encountered common weird errors…. The following are solutions of some common issues in asp.net 2.0 applications :

Error#1 : ” The project file ‘ ‘ has been either renamed or is no longer in the solution”

Solution: We received the above error whenever we made changes to source files of the pages or .cs files which are referred in our asp.net application. Open the property pages under the website and remove all the incorrect references. Add the proper references back and try to compile again.

Error#2: “System.InvalidCastException’ System.Data.SqlClient.SqlInternalConnectionSmi {System.InvalidCastException} ”

Solution: We received the above error when we tried to execute a sql command and retrieve the values of the sql query using data reader.  Type cast the variable with the data type.  For example: string value=(String) datareader1.GetValue(0);

Error#3: “System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it “

Solution: We received the above error when we tried to fetch some data through a webservice in our asp.net application .This means the the sql server database is refusing the connection. There are two solutions to this problem:

a. Replace the data source in the connectionstring with the machine IP Address or

b. Remove the web reference (in case of webservice) and add again.

keep watching this space for more solutions!!!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Categories

%d bloggers like this: