an error occurred on the server when processing url

Problem:

When classic ASP errors are nolonger displayed on the browser in your IIS 7.5 on windows server 2008. This error is shown

an error occurred on the server when processing url ……

Solution

Enabling “Send error to browser” in IIS would do the trick. For more step by step info you can visit here 

http://www.iis.net/learn/application-frameworks/running-classic-asp-applications-on-iis-7-and-iis-8/classic-asp-script-error-messages-no-longer-shown-in-web-browser-by-default

 


Could not load file or assembly ‘BasicFrame.WebControls.BasicDatePicker’ or one of its dependencies. An attempt was made to load a program with an incorrect format.

Cause:
For me this error came when i tried to install my ASP.net 2.0 website built on 32 bit on a server which was 64 bit.

Solution:
Open your IIS Manager (in my case it was 7.5) and then right click on application pool to have advance settings and make enable 32 bit application to TRUE.


How to extract Date portion and time portion from a datetime value.

Put this line where you would like to extract the time portion from a date in your SQL query

CONVERT (VARCHAR(10), GetDate(), 108)

and here you go if you wish to extract date part from a datetime value

CONVERT (VARCHAR(10), GetDate(), 110)


Could not determine a MetaTable. A MetaTable could not be determined for the data source ‘SqlDataSource1’ and one could not be inferred from the request URL. Make sure that the table is mapped to the data source, or that the data source is configured with a valid context type and table name, or that the request is part of a registered DynamicDataRoute.

Cause : For me this arrises when i inserted a new column in my gridview .

Soloution : I changed my code from “<asp:DynamicField DataField="Id" HeaderText="Id" />" to "<asp:BoundField DataField="Id" HeaderText="Id" />"

And i was sorted.


SQL query for getting current weeks dates

While working on my organizations intranet, i needed to have current weeks menu and drafted the query whihc will get the current weeks menu from database. This is useful on various places where you may need current week’s dates


SELECT * FROM Menu
WHERE
mdate >= CONVERT(VARCHAR(10),DATEADD(wk,DATEDIFF(wk,0,GETDATE()), 0),111)
AND
mdate <=CONVERT(VARCHAR(10),DATEADD(wk, DATEDIFF(wk,0,GETDATE()), 5),101)

Enjoy!


2012 in review

Dear Readers ‘

The WordPress.com stats helper monkeys prepared a 2012 annual report for my blog.

Here’s an excerpt:

4,329 films were submitted to the 2012 Cannes Film Festival. My blog had 26,000 views in 2012. If each view were a film, my blog would power 6 Film Festivals

Click here to see the complete report.


Error ‘8004020e’

Error ‘8004020e’ come usually on the below line of code

ObjMail.Send

where ObjMail is created with Set ObjMail = CreateObject("CDO.Message")

Causes for this error:

Access to the mail server via email component is denied when valid server and server port are not configured.

How to resolve the error

Make sure you supply a valid SMTP Server in the mail settings while defining ObjMail. You can refer the correct syntax for defining a mail object in ASP in this post of mine.

Make sure you use from and to addresses existing within the domains and also make sure you supply username and password if SMTP server them in your setting.

Hope that helps.


Logon failed. Details: Error Code: 0x Source: ADODB.Connection Description: Provider cannot be found. It may not be properly installed. Error in File : Unable to connect: incorrect log on parameters.

This error can come while  transferring crystal reports from local to external server. To resolve this error make sure you have selected SQLOLEDB provider for the database. SQL native client or  SQLNLCI will not work.


Invalid object name ‘sys.objects’.

My this blog post is about downgrading a database of SQL 2005 to SQL 2000.  This can be done by the option available in MS SQL 2005. 

  1. Just right-click over the desired SQL 2005 database, select Tasks -> Generate Scripts. 
  2. Select the objects needed to be scripted. But make sure you set the option of Script of SQL Version to SQL Server 2000. (see image below) Image
  3. Run the generated Script against the SQL 2000 database.
  4. Ideally this will be all you need but if it gives the error “Invalid object name ‘sys.objects’.” you will need some workaround done manually.
  5. You have to replace object and column names of SQL 2005 database to downgrade the database to SQL 2000. 
  6. Replace sys.objects into sysobjects and 
  7. Replace object_id into id
  8. Now run the script again and that should be all.  

Hope that helps.

 


Could not load file or assembly ‘System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35’ or one of its dependencies. The system cannot find the file specified.

Reason for this error to popup

An application in ASP.net 2.0 at local server uses AJAX.NET and ASP.NET AJAX Control Toolkit  and if production server has not these two things installed.

Easy workaround

  1. Go to this directory C:\WINDOWS\assembly\GAC_MSIL  (replace C with your windows directory).
  2. Copy System.Web.Extensions.dll (C:\WINDOWS\assembly\GAC_MSIL\System.Web.Extensions) and System.Web.Extensions.Design.dll (C:\WINDOWS\assembly\GAC_MSIL\System.Web.Extensions.Design)
  3. Paste it in to bin folder of your application at productions server.
  4. Make sure the bin folder also contains AjaxControlToolkit.DLL