Wednesday, December 03, 2008



Development Environment :
Windows XP, IIS 6, VS 2005 , Framework 2.0 ASP.NET 2.0

Deployment Environment :
Windows Server 2008, IIS 7 , ASP.NET 2.0 and Framework 2.0

Error Message :
Request is not available in this context Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Web.HttpException: Request is not available in this contextSource Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. Stack Trace:
[HttpException (0x80004005): Request is not available in this context]
System.Web.HttpContext.get_Request() +3465893
IIMSMain.Global.Application_Start(Object sender, EventArgs e) in C:\Prabakar\IIMS\Global.asax.cs:27
[HttpException (0x80004005): Request is not available in this context]
System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode(HttpContext context, HttpApplication app) +3385130
System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +125
System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +182
System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +259
System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +245
[HttpException (0x80004005): Request is not available in this context]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +3465475
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +69
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +675
Version Information: Microsoft .NET Framework Version:2.0.50727.1434; ASP.NET Version:2.0.50727.1434




Solution


Change in Global.asax file in the

protected void Application_Start(Object sender, EventArgs e)
{
ApplicationConfiguration.OnApplicationStart(HttpContext.Current.Server.MapPath(HttpContext.Current.Request.ApplicationPath));
Masters.SystemFramework.ApplicationConfiguration.OnApplicationStart(HttpContext.Current.Server.MapPath(HttpContext.Current.Request.ApplicationPath));
}


Then change the application pool to classic .net , this is how i solved my problem

Sunday, November 23, 2008


Error Message :
This error will occur when u try to send mail from your web application
"the smtp server requires a secure connection or the client was not authenticated"

Cause : due to the Network Credential we will receive this error when we use any third pary smtp servers

SOLUTION :


string sMailServer = "smtp.gmail.com";
MailMessage mailmsg = new MailMessage("sampl@gmail.com", "sampl2@gmail.com", "HAI", "Success ! ");
SmtpClient smtpclt = new SmtpClient();
System.Net.NetworkCredential basicauth = new System.Net.NetworkCredential("sampl@gmail.com", "007");
smtpclt.Host = sMailServer;
smtpclt.UseDefaultCredentials=false;
smtpclt.Credentials=basicauth;
smtpclt.EnableSsl = true;
smtpclt.Send(mailmsg);

Error Message :

Failed to update database "D:\HOHRMIS\APP_DATA\ASPNETDB.MDF" because the database is read-only.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Data.SqlClient.SqlException: Failed to update database "D:\HOHRMIS\APP_DATA\ASPNETDB.MDF" because the database is read-only.

Cause of the problem :

when we move the project from the inetpub default folder to some other location we will get this error , this is due to the read / write rights .

Solution :

  • Detach the database
  • Give read / write access to the APP_DATA folder
  • Attach the database then run it

Wednesday, October 08, 2008


Error:
some time while saving the project we may receive this type of error

Error occured saving the project file '' access is denied

Cause:

read only rights is given the project folder

Solutiuon :

Remove the Read only rights for the project and give write rights also
Error:

Auto-attach to process '[4572] aspnet_wp.exe' on machine 'PRABAKAR' failed. Error code 0x8013134b.
OR
Error While Trying to Run Project : Unable to start debugging on the server.


Cause:
there are many reason for this error.the one possiable reason is when u r migrating form one version to another versionwe will get this type of error.

Solution :

select the project in the IIS and go to the properties and select the ASP.NET Tab and change the version,possiable to the previous version.

Monday, August 25, 2008

Error

Error in File C:\Inetpub\wwwroot\IIMS\RptTrialBalance.rpt: Error detected by export DLL:
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: CrystalDecisions.CrystalReports.Engine.ExportException: Error in File C:\Inetpub\wwwroot\IIMS\RptTrialBalance.rpt: Error detected by export DLL:


Cause: Mostly we will face this problem while exporting the report to excel, or to doc , for PDF there wont be problem , the solution is to update the Crystal report


Solution:

ftp://ftp1.businessobjects.com/outgoing/CHF/crnet11win_en.zip

update the hot fix so there that the problem will be solved

Monday, July 28, 2008

Error Message


Parser error

Cannot load type admin.web.login


Cause and Solution

This error will occur when the assembly for the project is not created. Check whether the assembly is created or not, some time the assembly will be created in the project folder not in the solution folder, for that change the project output location

Sunday, July 27, 2008

Error Message


Configuration Error

Access is denied ‘Web’


Cause and Solution


Start --> Administrative Tools --> Computer Management --> Services and Application --> Indexing Services -->

Stop the Indexing services and restart it ,

This Error is caused due to the access denial for the temp location if we restart the services this location will set if the problem still exists go the system link and create new directory and add the specific location

Wednesday, July 23, 2008

Error Message




Parameter count does not match parameter value count

Cause and Solution


This error will occur when you make any changes in the stored procedure i.e. like adding new parameter to the procedure .The reason is in the SQL catalog the old sp will be there , even if you drop the Sp it will show the same error , the solution is


1. First drop the sp
2. Then if its is web application reset the application
3. Then open the application now it will show the sp not found error now you run the Sp this problem will be solved
Error Message


Arithmetic overflow error converting numeric to data type numeric


Cause and Solution


Arithmetic overflow will occur when you try to set the larger value in the lesser length variable , Just increase the length the field. This problem will be solved
Error Message

String or binary data would be truncated. The statement has been terminated.


Cause and Solution


Some time we will receive this kind of error from procedure while retreving data this is due to the overflow of any filed value , so just Turn of the Warnings using the System Variable as give below


SET ANSI_WARNINGS OFF
Error Message

Tables or functions 'bspl_detail' and ‘bspl_detail' ' have the same exposed names. Use correlation names to distinguish them. ...



Cause and Solution

This type of error will occur when you use the same table more then once in the join with out alias name,

Give the Alias name to the table so that it will be solved

Friday, June 27, 2008




Bill Gates' last day
At CES 2008, Microsoft Chairman and CEO Bill Gates and some of his closest friends debuted a comical look at what life would be like as Bill's last day approaches. Many of entertainment's biggest heavyweights, such as Bono from U2, actor George Clooney, and director Steven Spielberg, got some laughs..

Copied from : builderau

Tuesday, April 29, 2008

Find Colum present in the table or not

Hi,
 
if((select @count=count(*) from sysobjects tab,syscolumns col where col.id=tab.id  and tab.Name=<tablename> and col.name=<columnname>)>0)
begin
              print 'Column present'
end
else
begin
                  print 'Column not present'
end
 
Regards,
Sasikumar D
 
Direct - +91 80 41041751
Mobile - +91 9986080299



iGATE is Ranked No. 3 in DQ-IDC best IT employer survey and Ranked No.6 
by Business Today-Mercer Human Resource Consulting-TNS  in a cross industry survey of Best Companies to work for in India
----------------------------------------------------------------DISCLAIMER---------------------------------------------------------
Information transmitted by this EMAIL is proprietary to iGATE Group of Companies and is intended for use only by the individual 
or entity to whom it is addressed and may contain information that is privileged, confidential, or exempt from disclosure under 
applicable law. If you are not the intended recipient of this EMAIL immediately notify the sender at iGATE or mailadmin@igate.com 
and delete this EMAIL including any attachments

Monday, April 21, 2008

System restarts after i install Windows XP Service Pack 3

Good news is that Microsoft had released a service pack 3 for windows xp. as usual it comes with some problem . a week before i installed the service pack 3 after that it ask me restart then the problem starts it will boot and come till the welcome screen and then it will restarts .... even when i try thought the safe mode and all other modes which they had given nothing works .. then as usual gooooogleeee.. and found the solution , that’s is due to versioning problem to solve this

Put your windows cd and boot in repair mode and then copy the file gdi32.dll from c:\windows\servicepackfiles\i386\ to c: \ windows \ system32\ before coping this file make a backup of this file in c: \ windows \ system32\ this location and reboot it It works

Tuesday, March 25, 2008

Last week I got a chance to go to the VS 2008 Launch event in Abu Dhabi, It’s a nice time to be there. the event starts with all the basic formulates and the launch is for VS 2008, SQL Server 2008 , Server 2008 , there were 2 sessions one is for developer and another is for Professional , so I went for developer session . first they start with the features in framework and then they explained about the other features in asp.net and they are more concentrated on team server , that’s the very important feature, there is lot new in SQL server 2008 also with more features for reporting and charting . they had included chat and reports in SQL 2008 , I remember in my previous company we bought that , and its very powerful with gadgets with dashboard and they also launched a new product called expression suit , it has expression blend, expression media, expression web media and another one I forget it ..

We had a good breakfast in the morning and very good lunch … at last they gave a trial pack for VS 2008, SQL Server 2008, Server 2008 and expression suit , in the next once I will write deeply about the technologies

Monday, February 18, 2008

Writing the Error or any log message to Event log of the OS

string sSource, sLog, sEvent;
sSource = "Error Occur While Inserting Employee Record";
sLog = "Application";
sEvent = "Insert";

if (!EventLog.SourceExists(sSource))
EventLog.CreateEventSource(sSource,sLog);
EventLog.WriteEntry(sSource,sEvent);

Tuesday, February 05, 2008

Error Message
The Current time on this computer adn the current time on the network are different for moreinformation about Date/Time Propertoes, see Help and Support . To log on , Contact your system administrator


Cause : This error will occuer when you convert you client PC to the Domain sever . There is the date / time difference between the server and the client .

Solution : ASk your administrator to check the correct time in the server and the client or if your are the administrator log in to the client and set the time as if in the server

Sunday, January 20, 2008

Specified argument was out of the range of valid values. Parameter name: 9

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values. Parameter name: 9

Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
Parameter name: 9]
System.Web.UI.WebControls.ListControl.set_SelectedValue(String value) +152
Masters.Web.LedgerMasterAddEdit.Display() +32
Masters.Web.LedgerMasterAddEdit.Page_Load(Object sender, EventArgs e) +1710
System.EventHandler.Invoke(Object sender, EventArgs e) +0
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +731

________________________________________
Version Information: Microsoft .NET Framework Version:1.1.4322.573; ASP.NET Version:1.1.4322.573

Reason: Inadequate master record. This type of error will usual occur in the dropdown list / list boxes, for example if we have 3 records which need to be bind to the dropdown list
1 – India
2 – UAE
3 – USA

Now we had bind to the control and we had select (UAE) and saved in the transaction file after that we had removed UAE from that list and now when we try to edit the record from the transaction file , it will look the record UAE . if it is not there in the list we will get this error

Solution: Add the record UAE to the list

Saturday, January 19, 2008

Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

Compiler Error Message: BC30560: 'Global' is ambiguous in the namespace 'IIMS'.

Source Error:


Line 31: _
Line 32: Public Class Global_asax
Line 33: Inherits IIMS.Global
Line 34:
Line 35: Private Shared __initialized As Boolean = false

Source File: C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET Files\iims\6d858d13\228f9de0\y2eps_v4.0.vb Line: 33


Reason: There is an assembly in the project with the same class name; we can find the assembly in the bin folder

Solution : Just delete the assembly from the bin folder and rebuild the solution .This kind for error occur some time when we may change the assembly name for some reason and forget the delete the assembly from the bin folder

Wednesday, January 16, 2008

It’s a Great News from Microsoft that they had given provision to see the source code of the .Net Framework libraries. It had been announced on October and now it has been released , and its only for VS2008 . for detailed view you can see that in Scott’s Blog
What are the stages in Software release, what does it actually mean?

Alpha: Alpha refers to the very early release, which is typically very buggy and only released to few people internal to the organization. It is helpful, in development,

Beta: Its is the first version released out side the Organization with bugs.

Gamma or Release Candidate:
At this phase the product is also most completed and up to release with very minimum bugs. When the product reached this stage it means that, there won’t be any further change or update in the code

Gold or Release: It’s the final finished product, with only few fixes. After this stage the product will be stable for release in the market